Gentoo Archives: gentoo-dev

From: Mike Gilbert <floppym@g.o>
To: Gentoo Dev <gentoo-dev@l.g.o>
Subject: Re: [gentoo-dev] Re: Dropping static libs support from cryptsetup and lvm2
Date: Fri, 02 Aug 2013 14:41:55
Message-Id: CAJ0EP40zkkCb3geL70-RiKrYtGM6q4Esvzhhq=Evts4hB=YJ0Q@mail.gmail.com
In Reply to: [gentoo-dev] Re: Dropping static libs support from cryptsetup and lvm2 by Duncan <1i5t5.duncan@cox.net>
1 On Fri, Aug 2, 2013 at 8:06 AM, Duncan <1i5t5.duncan@×××.net> wrote:
2 > Steven J. Long posted on Fri, 02 Aug 2013 12:31:08 +0100 as excerpted:
3 >
4 >> As Rich said, lvm doesn't link outside rootfs so it's not an issue: you
5 >> only really need an initramfs if rootfs is on lvm/encrypted/raid, or you
6 >> need udev to get through localmount.
7 >
8 > Or, unfortunately, for root on mult-device btrfs[1], since the usual
9 > kernel commandline rootflags=device=/dev/whatever doesn't seem to work
10 > for some reason.[2]
11 >
12 > Tho hopefully that bug will be fixed before the "experimental" label is
13 > stripped from btrfs...
14 >
15
16 Passing rootflags=device= is a little fragile anyway, since it depends
17 on the kernel detecting your devices in a certain order. Having a
18 multi-device btrfs root without an initramfs is asking for trouble.
19
20 > ---
21 > [1] Yes, as appropriate for running on an experimental fs, I have
22 > backups, tho the dual-device raid1 mode I'm using is /reasonably/ stable,
23 > now. I switched to btrfs when I upgraded to ssd, both for the ssd
24 > support and for checksummed data/metadata with a second copy to retrieve
25 > from if the first fails the checksum.
26 >
27 > [2] I tried with a btrfs raid1 and could mount either device with root=
28 > and rootflags=degraded, so it was definitely parsing rootflags, but no
29 > way was it taking rootflags=device= to mount them undegraded without a
30 > userspace btrfs device scan first, and that requires an initr*. Maybe it
31 > was a problem with the kernel splitting at the second = instead of the
32 > first, I don't know, but it definitely wasn't working. So now I'm
33 > running dracut with several of its default modules stripped via
34 > INSTALL_MASK including the one pulling in kmod since I'm running
35 > monolithic kernel and have kmod package.provided, and USE=btrfs plus
36 > adding it to the module config.
37 >
38
39 If you just want a minimal initramfs that calls btrfs scan on boot
40 without hacking the crap out of dracut, feel free to use my little
41 homegrown project. Just adjust the paths, make sure your busybox is
42 static, and you should be good to go.
43
44 https://bitbucket.org/floppym/initramfs/src