grub2 – Installing Grub on btrfs /boot when root is on ZFS

I’d like to use Grub for booting my Linux system. The system has its root filesystem on a ZFS dataset, it has the usual EFI boot partition, and a btrfs partition that can be used as /boot. When the system is booted up and I have both /boot and /boot/efi mounted, running update-grub prints the following error and then only installs the fallback “UEFI Firmware Settings” entry:

Found linux image: vmlinux-5.15.0-101-generic in rpool/UBUNTU
Found initrd image: initrd.img-5.15.0-101-generic in rpool/UBUNTU
/usr/sbin/grub-probe: error: unknown filesystem.

I understand that Grub doesn’t have complete ZFS support, but that’s exactly why I have this extra btrfs partition for /boot! I am baffled why the ZFS stuff even factors into booting here — I thought Grub would load the initrd from /boot and then the rest of the process would be taken care of by Linux itself.

What am I doing wrong and how do I fix it?

Read more here: Source link