Gentoo Archives: gentoo-dev

From: Fabio Erculiani <lxnay@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Making systemd more accessible to "normal" users
Date: Sat, 04 May 2013 13:12:51
Message-Id: CAN3AtvqYJaHBygz8nuFeRwy+9VRYTLZNTXHjmY=F-TB96nRA2w@mail.gmail.com
In Reply to: Re: [gentoo-dev] Making systemd more accessible to "normal" users by Fabio Erculiani
1 On Sat, May 4, 2013 at 3:05 PM, Fabio Erculiani <lxnay@g.o> wrote:
2 >
3 > Scenario:
4 > - you have an initramfs with mdev, your pivot_chroot system runs udev.
5 > - you have a LVM volume group, containing the lvm volume for / and
6 > /home, and perhaps you also have swap on another volume.
7 > - you boot using the current genkernel initramfs, which uses mdev and
8 > comes with lvm support
9 >
10 > The initramfs code activates your lvm volumes, lvm itself may or not
11 > may be compiled with udev support. In the former case, nothing gets
12 > written onto /run/udev (and devtmpfs), in the latter case, lvm writes
13 > metadata that are useful to lvm itself to udev.
14 > mdev is not udev, doesn't deal with udev rules so the metadata is
15 > either pristine or completely unavailable.
16 > busybox switches root and the boot starts: you obviously have lvm
17 > compiled with udev there, since you're using udev (or systemd-udevd,
18 > or gudev). The lvm there is either unable to find valid metadata so it
19 > doesn't automatically activate the volumes (note: /home does not get
20 > activated by the initramfs code) or, until some time ago but now
21 > defaulted to off, lvm itself creates the device nodes (which should
22 > have been created by udev + udev rules if lvm is compiled with udev
23 > support).
24 > If it's not enough, our current genkernel initramfs code (I fixed this
25 > as well, it's in the systemd-love overlay) doesn't mount --move /run
26 > to /newroot before switching root, so /run/udev is not ported over,
27 > which means that even if mdev would have been able to do do all the
28 > udev magic, things wouldn't work anyway.
29 >
30 > Long story short, we should:
31 > 1) give up with cross compiler support in genkernel, which has been
32 > anyway in a broken state for ages. Nobody is using it anyway.
33 > 2) make possible to optionally use udev in the initramfs (compiling
34 > just for it is a pita and the trend here [dracut and others do this]
35 > is to copy udevd from the system)
36 > 3) default to udev?
37 >
38
39 I just forgot the tricky part.
40 If future lvm versions are going to use udev more extensively (for eg:
41 storing more critical metadata in it), the net result will be that
42 mdev won't work anymore. This is why I wrote that lvm is working "by
43 miracle for now".
44 mdev is not future proof wrt lvm support.
45
46 >
47 > --
48 > Fabio Erculiani
49
50
51
52 --
53 Fabio Erculiani

Replies

Subject Author
Re: [gentoo-dev] Making systemd more accessible to "normal" users Luca Barbato <lu_zero@g.o>