You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've just embarked on setting up a UEFI home machine to boot Ubuntu 25.04 with ZFS root. I've had experience on BIOS/legacy boot before since 19.10 that has been rock solid.
I am following the 22.04 guide with the appropriate changes for 25.04. I also used a simplified structure that I had been using on a different server (with BIOS/legacy booting), rather than rpool/ROOT/dataset/bpool/BOOT/dataset pattern in the guide.
Datasets
ℹ️ boot, ubuntu, ubuntu/var containers have canmount=off
/dev/nvme0n1p1 on /boot/efi type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/nvme0n1p1 on /boot/grub type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
The mistake
I made a bit of a mistake following an old markdown guide I wrote for Ubuntu 19.10 by marking my boot (/boot) ZFS dataset as legacy and trying to mount it with fstab. This resulted in the system booting, starting grub, but entering maintenance recovery mode with a hard lock (unable to login to troubleshoot). Editing fstab and commenting out the /boot mount got it starting correctly, but then the boot dataset wasn't mounted.
I then attempted to boot off the Live USB key again, then imported my zpools with altroot set to /mnt.
I then mounted all my datasets, FAT32 EFI partition to /boot/efi, Grub bind /boot/efi/grub->/boot/grub mount. When I zfs get mountpoint at this stage, I see all my datasets are prefixed with the altroot path.
I then chroot in after binding /dev, /proc, /sys. When I zfs get mountpoint at this stage, all my datasets are still referencing the /mnt prefixed paths, the same as outside of chroot.
When I try to update-grub after setting boot/boot to a non-legacy mount and commenting out the /boot mount in /etc/fstab I get the following error:
update-grub
Sourcing file /etc/default/grub'
Generating grub configuration file ...
Warning: didn't find any valid initrd or kernel.
filesystem 'boot/boot' cannot be mounted using 'mount'.
Use 'zfs set mountpoint=legacy' or 'zfs mount boot/boot'.
See zfs(8) for more information.
Warning: didn't find any valid initrd or kernel.
Adding boot menu entry for UEFI Firmware Settings ...
done
I've tried to adjust my /etc/zfs/zfs-list.cache files removing the /mnt prefix as per the guide, but nothing I seem to do allows me to successfully update-grub.
ℹ️ I seem to remember when I created the ZFS pools and datasets in the first instance with altroot set, that these paths in chroot were referencing the expect non-/mnt prefixed paths. Maybe I was mistaken.
I can blow everything away and start again, and that will probably fix my issue, but I am concerned that I am unable update-grub from a Live USB boot in the event I require future troubleshooting. Wondering if I'm missing something simple that will allow ZFS to see the correct mount points and allow grub to succeed. Obviously, I've stepped away from some of the core strategies in the guide and it's not clear where I should be focusing my efforts.
I will also add I'd prefer to stay using grub as the bootloader, so avoiding using ZFSBootManager etc.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I've just embarked on setting up a UEFI home machine to boot Ubuntu 25.04 with ZFS root. I've had experience on BIOS/legacy boot before since 19.10 that has been rock solid.
I am following the 22.04 guide with the appropriate changes for 25.04. I also used a simplified structure that I had been using on a different server (with BIOS/legacy booting), rather than
rpool/ROOT/dataset
/bpool/BOOT/dataset
pattern in the guide.Datasets
ℹ️ boot, ubuntu, ubuntu/var containers have
canmount=off
EFI mounts
The mistake
I made a bit of a mistake following an old markdown guide I wrote for Ubuntu 19.10 by marking my boot (
/boot
) ZFS dataset as legacy and trying to mount it withfstab
. This resulted in the system booting, starting grub, but entering maintenance recovery mode with a hard lock (unable to login to troubleshoot). Editingfstab
and commenting out the/boot
mount got it starting correctly, but then the boot dataset wasn't mounted.I then attempted to boot off the Live USB key again, then imported my zpools with altroot set to
/mnt
.I then mounted all my datasets, FAT32 EFI partition to
/boot/efi
, Grub bind/boot/efi/grub->/boot/grub
mount. When Izfs get mountpoint
at this stage, I see all my datasets are prefixed with the altroot path.I then chroot in after binding /dev, /proc, /sys. When I
zfs get mountpoint
at this stage, all my datasets are still referencing the/mnt
prefixed paths, the same as outside of chroot.When I try to
update-grub
after setting boot/boot to a non-legacy mount and commenting out the/boot
mount in/etc/fstab
I get the following error:I've tried to adjust my
/etc/zfs/zfs-list.cache
files removing the/mnt
prefix as per the guide, but nothing I seem to do allows me to successfullyupdate-grub
.ℹ️ I seem to remember when I created the ZFS pools and datasets in the first instance with altroot set, that these paths in chroot were referencing the expect non-
/mnt
prefixed paths. Maybe I was mistaken.I can blow everything away and start again, and that will probably fix my issue, but I am concerned that I am unable
update-grub
from a Live USB boot in the event I require future troubleshooting. Wondering if I'm missing something simple that will allow ZFS to see the correct mount points and allow grub to succeed. Obviously, I've stepped away from some of the core strategies in the guide and it's not clear where I should be focusing my efforts.I will also add I'd prefer to stay using grub as the bootloader, so avoiding using ZFSBootManager etc.
Any help would be greatly appreciated 🤗
Beta Was this translation helpful? Give feedback.
All reactions