openzfs-docs icon indicating copy to clipboard operation
openzfs-docs copied to clipboard

grub-install doesn't work with ZFS pools installed on partitions

Open cyphar opened this issue 6 months ago • 3 comments

I opened an issue for this in the zfsonlinux/grub project, but given that all of the OpenZFS documentation tells you to configure ZFS on separate disk partitions (bpool, rpool, and the ESP partition), it is kind of important to note that grub-install will fail to install on any such /boot (based on my testing this happens even if /boot is not ZFS -- grub2-install will effectively grub2-probe all of the filesystems on the disk).

It appears that someone has made this work recently, but they used LVM-managed RAID to configure the device for /boot (which then used XFS, not ZFS) and that appeared to work for grub2-install.

Unless I'm missing something, it seems that the only really practical solution is to use systemd-boot (though I'm still working on testing this), which means storing the kernels and initrd in the ESP partition (/boot/efi) and skipping all of standard /boot grub shenanigans entirely. Maybe there should be some kind of caution about this issue, as debugging this took me quite a long time and there really isn't any documentation about how painful this all actually is. Another option is ZFSBootMenu but I'm not sure how I feel about using something completely unsupported by distros to boot them.

cyphar avatar Jun 14 '25 08:06 cyphar