Closed wrouesnel closed 8 years ago
@wrouesnel, I was going through some old tickets and noticed this one. Thanks for the submission.
I don't currently integrate GRUB for recent Ubuntu releases, but this fix can be added if somebody gives it a rundown and puts it into a PR for the zfs-initramfs package.
Note, however, that creating device links in postinst.d/ instead of something like a udev rule could be a DPM violation.
@dajhorn I have used the method described above and it works, but I am now very scared to update my system as it is remote (12 hours driving distance) from where I live.
It would make installation easier if GRUB could be fixed to recognize the real zpool output. I haven't tried the latest version of zfs-grub to see if it works due to what I mentioned above.
I found (or maybe I made, I can't recall) a small initramfs hook to replace the above fake zpool executable with the real zpool executable:
#
# Add ZoL filesystem capabilities to an initrd, usually for a native ZFS root.
#
# This hook installs udev rules for ZoL.
PREREQ="zfs"
RC=0
case $1 in
prereqs)
echo "$PREREQ"
exit 0
;;
esac
cp -p "/sbin/zpool_true" "$DESTDIR/sbin/zpool"
@Clete2, this GRUB solution is now fully deprecated. The zfs-grub packages will not be updated in the near term except for security issues.
ZoL was imported to Ubuntu and could become a first-class component in the Ubuntu 16.04 LTS release. You should track the Xenial series and decide on an upgrade strategy when the alpha happens in January.
ZoL is a first-class package in distro as of the Ubuntu 16.04 LTS release, so I will close this ticket.
There are a couple of persistent issues with grub in how it searches for ZFS devices on Ubuntu which seem related to the distro-grub searching in the wrong location (/dev).
Putting a script like the following in
/etc/kernel/postinst.d
fixes the problem in a seamless way, and makes running with a ZFS root less fragile when doing kernal upgrades.Something like this should probably be included in the Ubuntu ZFS packages until upstream grub learns how to properly find ZFS boot disks on these systems to make it easier for desktop users.