|From:||Joost Roeleveld <joost@××××××××.org>|
|Subject:||Re: [gentoo-dev] udev and /usr|
|Date:||Thu, 15 Sep 2011 22:06:31|
|In Reply to:||Re: [gentoo-dev] udev and /usr by "Robin H. Johnson"
On Thursday, September 15, 2011 08:31:51 PM Robin H. Johnson wrote:> On Thu, Sep 15, 2011 at 10:03:53PM +0200, Joost Roeleveld wrote: > > On Thursday, September 15, 2011 09:27:06 AM Zac Medico wrote: > > > On 09/15/2011 09:04 AM, Joost Roeleveld wrote: > > > > Thank you for your response, however, I do have a few questions > > > > about > > > > this. Where will this default initramfs actually need to be > > > > placed? > > > > > > It should be similar to how sys-apps/v86d is used for uvesafb > > > support. > > > It installs /usr/share/v86d/initramfs and when you configure your > > > kernel, you set CONFIG_INITRAMFS_SOURCE="/usr/share/v86d/initramfs" > > > in > > > order to have in included in your kernel image. > > > > Will this be set somewhere globally to the initramfs automatically? > > And doesn't this mean that a new kernel will need to be build just to > > satisfy this? > > > > I'm trying to think of how best to avoid users who are not aware to get > > caught with non-booting systems. > > > > Wouldn't automatic inclusion into grub.conf be a better approach? Not > > sure if grub.conf can handle a "global" setting for initramfs. > > Grub doesn't support a global initramfs setting, but you can build a > static initramfs for v86d if needed.Ok, was afraid there wasn't. If there was, it would make things easier.> > > > Also, how will > > > > we be able to deal with situations where this script fails? > > > > > > It should drop you to a minimal shell. > > > > But, with udev then failing, will there be the /dev-entries to mount the > > different partitions to fix the environment? > > Yes, /dev is provided by devtmpfs already, and that is populated by the > kernel.If /dev is already populated by devtmpfs with the stuff for mounting what can currently already be mounted without an initramfs. Won't that be sufficient to have udev started *after* localmount? Eg. the following configuration: Kernel has the "devtmpfs" option localmount mounts the local filesystems using the devtmpfs /dev-tree udev is configured to start after localmount> > > > If Gentoo does decide to follow the initramfs-route, why not > > > > simply > > > > implement /etc/init.d/localmount in the initramfs? > > > > > > I think that's pretty close to what we have planned, since the plan > > > is > > > to have the initramfs mount configuration stored on the root > > > filesystem.> > > But still require a seperate configuration file for this? > > The configuration file isn't actually required, but it's there in case > you want to specify MORE filesystems to mount before switching to the > rootfs init. > > There are two files to load from the rootfs: > 1. /etc/fstab > 2. /etc/minimal-filesystems.cfg [exact name undecided] > > The list is in the second file, just one mountpoint per line. > Defaults to /usr, /var > If the file is not available, the default is also /usr, /var. > > For each filesystem for the minimal list, use the line from fstab to > mount it. This covers getting the device, mountpoint and mount options.Why not try to mount all the filesystems in /etc/fstab in the minimal script automatically unless there is a list (not commented out) in /etc/minimal- filesystems.cfg ?> There is a catch to this: > If those non-root filesystems live on LVM or something complex, you're > going to need to use a more advanced initramfs, > genkernel/dracut/roll-your-own.This means that on a system where I currently don't need an initramfs, I suddenly need a full-grown initramfs.> > On my desktop, that would mean the following list: > > /usr/ > > /var/ > > Only these two should be needed to early-boot the system successfully. > > > True, but I don't have any scripts configured for udev on my desktop. > > My server has some scripts related to Xen, and those are all under > > /etc/xen/... > > > > In this case, would it still be necessary to use an initramfs? > > Where is /usr, and do you have any udev rules that need /var?I followed the following guide: http://www.gentoo.org/doc/en/gentoo-x86+raid+lvm2-quickinstall.xml I have /usr on LVM which is on top of mdadm-raid1 on the server. My desktop has the same, except for the raid1-part. I don't have any udev-rules needing anything outside of /. Eg. they don't need /usr or anything else that is not part of the root- filesystem. The xen-scripts might, but those devices only appear when starting the PV- domains. And those don't start until well after everything else. -- Joost