Gentoo Archives: gentoo-genkernel

From: Zachary Bedell <zac@××××××××××.org>
To: gentoo-genkernel@l.g.o
Subject: Re: [gentoo-genkernel] Genkernel / Dracut / ZFS, where to start?
Date: Sun, 03 Jul 2011 19:09:01
Message-Id: 7D220D60-C6D6-4626-9005-109D95B94054@thebedells.org
In Reply to: Re: [gentoo-genkernel] Genkernel / Dracut / ZFS, where to start? by "Amadeusz Żołnowski"
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA1
3
4 I've managed to make a bit of progress with getting Genkernel/Dracut/ZFS to all play nicely together. I'm running into some trouble with devices after the initramfs is actually done, and I'm not sure if I'm just hitting the current limitations of the Genkernel/Dracut branch or if there's something silly I might be doing. My first suspicion is that Dracut's using udev while the rest of my system is setup for mdev is probably the source of my issues, but my knowledge of the various device manager packages is pretty limited at this point.
5
6 Here's what I've managed to do thus far:
7
8 I did git-fork most of what I'm working on, not for worries of lack of collaboration, but just because I like to always run everything through Portage so I know it all JustWorks(TM), and I haven't manually hacked something that I forgot to checkin later. So forks all around, and a Layman overlay later, I'm in business. I ended up using a public Github for everything just to avoid having to setup a local Git server.
9
10 Genkernel (dracut branch): https://github.com/pendor/genkernel-zfs
11 Originally forked from the dracut branch on git.overlays.gentoo.org. So far, all I've had to change was the command line/conf file logic to add ZFS plus adding zfs to the list of modules in gen_dracut.sh.
12
13
14 Portage Overlay: https://github.com/pendor/gentoo-zfs-overlay
15 Git-based ebuilds for ZFS and Genkernel. There's one for SPL as well, but I'm using stock upstream of that now.
16
17
18 ZFS itself: https://github.com/pendor/zfs
19 Haven't changed the driver at all, but the Dracut module currently lives in there.
20
21
22 As for Dracut itself, I've just used the stock sys-kernel/dracut-010-r3 package from Portage without any forking necessary.
23
24
25 I've brought the Dracut module in ZFS up to date (committed to my branch) which took a bit of work. The module does manage to detect the proper ZFS pool & root fs, mount it, pivot to it, and hand off to init successfully.
26
27 Where things start going wrong is when the init scripts inside the real root try to load the first module which requires firmware (a cx88/xc5000 video encoder). Boot hangs there for a minute before the module load fails, and dmesg shows errors about loading the firmware. Past that, the attempt to start MD (for the RAID-1 boot partitions -- haven't got ZFS/Grub working natively yet...) also hangs for a moment and complains about /dev/md0 missing. Once past that, the system is usable (sans video hardware of course). /proc/mdstat shows that the MD is in fact loaded and sync'd, but the node for it is missing in /dev, so mounting it fails.
28
29
30 So as I speculated above, I'm guessing udev in the initramfs and mdev in the live system aren't a winning combination. Is this something that's known for the Dracut branch at this point? Is there any way to work around the problems to get the live system's module & firmware loading functioning?
31
32 I do have a full capture of both boots (old genkernel versus dracut/genkernel). They're video screen captures from remote KVM hardware, so I tossed them up on YouTube in case they're of any help.
33
34 Classic Genkernel: http://youtu.be/u97my0qYitU?hd=1
35
36 Genkernel/Dracut: http://youtu.be/WA8Q6wlrH6U?hd=1
37
38 I'm going to brush up a bit on the [mu]dev packages, but any pointers would be much appreciated.
39
40 Best regards,
41 Zac Bedell
42
43
44 On Jun 21, 2011, at 1:52 AM, Amadeusz Żołnowski wrote:
45 Hello,
46 >
47 > Excerpts from Zachary Bedell's message of Tue Jun 21 01:34:07 +0200
48 > 2011:
49 >> Is there anything resembling an "official" repo for Dracut work at
50 >> this point? Likewise, is there a good set of ebuilds that I should
51 >> use as a starting point?
52 >
53 > You should work on official Dracut's repo [0]. I'm contributing to this
54 > one and there's no need for a fork because of great collaboration with
55 > upstream. When you're ready, module should be posted to
56 > <initramfs@×××××××××××.org> as a git-formatted patch against HEAD. You
57 > can do a fork as well and post pull-request on this mailing list.
58 >
59 > alexxy is working on bringing ZFS to Gentoo, but afaik he's lacking
60 > someone interested in updating dracut module from repo [0] you've
61 > forked.
62 >
63 > [0] http://git.kernel.org/?p=boot/dracut/dracut.git
64 > [1] https://github.com/behlendorf/zfs/
65
66 -----BEGIN PGP SIGNATURE-----
67 Version: GnuPG v1.4.8 (Darwin)
68
69 iEYEARECAAYFAk4QmccACgkQq+EtLVpY/F5DlwCg1w3weVvIDNE5uyhCjP/48ggg
70 McoAn0uLPQWBk7/slcnK2mQjttQqSYHk
71 =CqzA
72 -----END PGP SIGNATURE-----

Replies

Subject Author
Re: [gentoo-genkernel] Genkernel / Dracut / ZFS, where to start? Zachary Bedell <zac@××××××××××.org>