Gentoo Archives: gentoo-dev

From: Rich Freeman <rich0@g.o>
To: gentoo-dev@l.g.o
Cc: chithanh@g.o
Subject: Re: [gentoo-dev] Warn users not to do separate /usr partition without proper initramfs in the handbook?
Date: Tue, 02 Aug 2011 14:48:06
Message-Id: CAGfcS_kuzY+bPUyi7jG2OM4xqrTWYxCB1JpyBOD9eUJdLz62Hw@mail.gmail.com
In Reply to: Re: [gentoo-dev] Warn users not to do separate /usr partition without proper initramfs in the handbook? by "Michał Górny"
1 On Tue, Aug 2, 2011 at 4:02 AM, Michał Górny <mgorny@g.o> wrote:
2 > BTW doesn't encrypting rootfs require initramfs anyway?
3 >
4
5 Yup.
6
7 On a side note. I've been experimenting with Dracut+LVM+RAID5 and
8 have found that it actually works pretty transparently. Now, I
9 haven't tried it with /usr not on the rootfs - I can tell that Dracut
10 is definitely parsing my /etc/fstab to mount my root, but I'm not sure
11 if it tries to mount anything else by default. It is fairly slick -
12 it mounts root any way it can read-only to get to the fstab, and then
13 remounts it following the options in fstab. (Which means that you
14 need to make sure fstab is accurate since it actually gets used for
15 the rootfs now.)
16
17 I also found that the dracut initramfs is MUCH faster than the
18 genkernel one - it does a good job of only loading drivers necessary
19 to find the root, and it can take hints to speed that up. It also
20 required less configuration - the only required kernel parameter even
21 for mdadm+lvm is root= (which takes device, UUID, or label).
22
23 I got it working with an old-metadata /boot (probably need to mess
24 with grub v2 to avoid that, assuming that even works), and then
25 everything else including root on mdadm-raid5+LVM.
26
27 So, my feeling is that while we should support minimal (ie
28 non-gnome/etc) configurations that follow FHS and don't require an
29 initramfs, I don't really see leveraging dracut as a big problem as
30 long as we update our documentation to make the preferred approach
31 clear.
32
33 Everybody should also read that Fedora link earlier in the thread:
34 http://fedoraproject.org/wiki/Features/UsrMove
35
36 I'm not suggesting that we should do this, but this does seem like a
37 legitimate use-case. It is a bit more suited to binary distros with
38 release cycles, but I could see in a datacenter how it might be nice
39 to NFS-mount just about everything including /usr, /bin, /lib, etc.
40 Such a setup would actually be pretty easy to accomplish with Gentoo -
41 in theory you can just create symlinks for the various root
42 directories into /usr and let the package manager install the files
43 into them. In practice it might run into issues (I know that symlinks
44 for some of the top-level directories were not liked by some of the
45 package managers in the past - I had to use bind mounts to accomplish
46 this, and that might be a better solution though I have no idea if
47 Dracut can figure that out in fstab).
48
49 Rich