Closed reefland closed 1 year ago
You could try placing a zfsbootmenu pre-built EFI executable in the ESP and see if your firmware recognises it? The zbm team has made the prebuilt EFI available for download on its GitHub page, with instructions on use in its readme.
You could also try switching rEFInd for systemd-boot and see if that makes a difference.
What hex code does the standard Ubuntu installer assign to the ESP? For example, is it EF00?
Some other things to try are suggested on the following stack exchange thread. https://unix.stackexchange.com/questions/360305/uefi-not-recognising-efi-partition-no-booting-options
I tested putting the prebuilt package into /boot/efi/EFI/zfsbootmenu
same result.
Tried to rename as /boot/efi/EFI/boot
instead of zfsbootmenu
same result.
Ubuntu installer (ZFS with Encryption) assigns code EF00
to the ESP partition
Oddly, both /boot/efi
and /boot/grub
directories are empty, these are the only 2 locations referenced in /etc/fstab
.
I did a find / -name grubx64.efi
and one match located in /usr/lib/grub/x86_64-efi/monolithic/ directory
.
You could try moving the zbm efi executable to the following location as recommended on one of the stack exchange replies. /EFI/boot/bootx64.efi
Tested your script from a Ubuntu 22.04.1 ISO. Update the variables, run the script, gets to the end. Reboot and it as if no ESP partitions are found. Goes right into my BIOS. I tied with Secure Boot enabled and disabled same results.
The reason I tried your script is because, I got the exact same results with my own scripts (which works fine in Virtual Box).
So I was glad I could reproduce the problem. But I have no idea how to troubleshoot this. I'm not sure if this is a rEFInd issue or not. I was hoping you had some thoughts based on your personal script testing. There is no error message or any indication of it trying. It seems like ESP partitions created do not meet what the UEFI BIOS is looking for. If I press F7 for the boot menu, my only option is to enter setup, it finds nothing unless the USB is inserted... see's that fine.
FYI - I also tested using the standard Ubuntu installer and selected ZFS with encryption. And that booted just fine. So the older ZFS on Root with pool/rpool seems to be fine. So I suspect it is related to rEFInd, but I can't come up with an intelligent question to ask.
I have 2 brand new PCs - Minisform UM560 AMD Ryzen 5 5625U 6 core 12GB RAM, 1TB NVMe (will be small home servers). Same results on both of them. Brand new AMI BIOS dated from July 2022. Nothing to update.