[Bug 1321335] Re: Build failure when ZFS support is enabled
Rjvbertin
1321335 at bugs.launchpad.net
Sat May 24 13:53:56 UTC 2014
Of course it's a patch :)
Here's an update:
Even with the posted patch that allows the build to succeed, not all FS
tests succeed, in particular zfs_test. It fails with a TIME_FAIL error
(which is probably benign as it appears to concern a subsecond
difference).
I thus had to disable the build checks in order to be able to build my
.deb packages.
Worse, update-grub2 will not generate a proper grub.cfg for ZFS roots:
{{{
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-b927688a3f8a6e13' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
insmod part_msdos
insmod btrfs
set root='hd2,msdos4'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd2,msdos4 --hint-efi=hd2,msdos4 --hint-baremetal=ahci2,msdos4 2def3c9f-2a12-41e0-911f-7de7cc142a99
else
search --no-floppy --fs-uuid --set=root 2def3c9f-2a12-41e0-911f-7de7cc142a99
fi
linux /vmlinuz-3.13.9-ck1-kubuntu-ck-amdf10-rjvb root=ZFS=zPatux/ ro
initrd /initrd.img-3.13.9-ck1-kubuntu-ck-amdf10-rjvb
}
}}}
In other words, the required zfs modules are not loaded, and the kernel isn't informed about the fact it's booting off ZFS. A more correct entry should read:
{{{
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-b927688a3f8a6e13' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
insmod zfsinfo
zfs-bootfs ($root) bootfs
insmod part_msdos
insmod btrfs
set root='hd2,msdos4'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd2,msdos4 --hint-efi=hd2,msdos4 --hint-baremetal=ahci2,msdos4 2def3c9f-2a12-41e0-911f-7de7cc142a99
else
search --no-floppy --fs-uuid --set=root 2def3c9f-2a12-41e0-911f-7de7cc142a99
fi
linux /vmlinuz-3.13.9-ck1-kubuntu-ck-amdf10-rjvb root=ZFS=zPatux/ ro boot=zfs $bootfs
initrd /initrd.img-3.13.9-ck1-kubuntu-ck-amdf10-rjvb
}
}}}
but even that gives an "invalid label" error upon boot and then tries to import the default pool name, rpool, instead of the right one.
For reference, here's a menuentry from a different system (using the exact same kernel) which boots OK:
{{{
menuentry 'LinuxMint GNU/Linux' --class linuxmint --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-7c11ad880751a42a' {
load_video
gfxmode $linux_gfx_mode
insmod gzio
insmod zfsinfo
zfs-bootfs ($root) bootfs
insmod part_msdos
insmod ext2
set root='hd0,msdos7'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos7 --hint-efi=hd0,msdos7 --hint-baremetal=ahci0,msdos7 39ff79e1-e153-490f-b302-4ba8e71fe643
else
search --no-floppy --fs-uuid --set=root 39ff79e1-e153-490f-b302-4ba8e71fe643
fi
linux /vmlinuz-3.13.9-ck1-kubuntu-ck-amdf10-rjvb root=ZFS=Patux/ ro boot=zfs $bootfs
initrd /initrd.img-3.13.9-ck1-kubuntu-ck-amdf10-rjvb
}
}}}
And finally, even when I import the right pool at the GRUB prompt and
get the boot process to continue, it will halt (freeze, block) during
the initial systemd run, typically during or just after mounting the
initial encrypted disks. If I disable that systemd entry, the process
will freeze during network initialisation. Ctrl-Alt-Del will then no
longer allow the system to be rebooted.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to grub2 in Ubuntu.
https://bugs.launchpad.net/bugs/1321335
Title:
Build failure when ZFS support is enabled
Status in “grub2” package in Ubuntu:
New
Bug description:
I downloaded the GRUB2 sources from Launchpad, version 2.02~beta2-9
for "Trusty", in order to understand why grub-probe would not deal
correctly with ZFS pools.
It turns out that even the original source, without the Ubuntu
patches, fails to build when libzfs is present (and/or --enable-zfs is
used) because the zfs libraries are missing from the grub-ofpathname
utility's link command.
Consequently, I think that the grub-probe error I reported in the
linked question is due to missing ZFS support in the binary GRUB2
packages distributed via Launchpad.
After correcting Makefile.util.def, everything builds OK and grub-
probe correctly reports that ZFS pools are of type zfs .
A patchfile for the correction is attached, and an upstream bug report
created (https://savannah.gnu.org/bugs/index.php?42392).
I'm currently building an updated set of Ubuntu/Debian packages; I'll
modify this ticket (or file a new one) if there are additional issues
booting off a ZFS root.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1321335/+subscriptions
More information about the foundations-bugs
mailing list