No boot device after zfs-upgrade

So I did an upgrade in VM, from 12.1 to 12.2. Then I did the zfs upgrade as you did. The expected bootloader message was shown. I did nothing, rebooted the VM and I was able to boot. In other words I was not able to reproduce this.
But when I look on the sector0 on my disk:
Code:
root@fbsd:~ # hd -n 512 /dev/da0
00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000001c0  02 00 ee ff ff ff 01 00  00 00 ff ff 7f 02 00 00  |................|
000001d0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000001f0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 55 aa  |..............U.|
00000200
root@fbsd:~ #
I truly see no MBR boot code. You may have pushed some when you were executing gpart bootcode. This could potentially confuse BIOS that has legacy fallback.
Once you're booted in 12.2 FreeBSD (while it may work to have different versions stick to the version you're trying to boot) try to recreate the EFI partition back (as you were trying to do before).
Code:
newfs_msdos /dev/nvd0p1
mkdir /newefi /curefi
mount -t msdosfs /dev/da0p1 /newefi
mdconfig -a -t vnode -f /boot/boot1.efifat
mount -o ro -t msdosfs /dev/md0 /curefi
cp -rp /curefi/* /newefi/
mdconfig -d -u 0
reboot
 
When you install boot code (pMBR) and overwrite the ESP with zfsboot your Bios no longer detect those disk as bootable as they don't have the default .efi and startup.nsh . Then even if you restore the ESP partition you still need to create a boot record or use efi shell to boot from those nvme disk. The actual zfs upgrade doesn't cause that.
 
VladiBG True. But in all the answers mentioned here gpart bootcode was executed only on partition 1, sector 0 was not touched. So if OP didn't do anything else it could be enough. I also agree, this has nothing to do with the pool upgrade.

My idea I didn't check out was if actually free space between EFI and freebsd-swap is placeholder for additional bootcode.
EDIT: I tested it, no.
 
When you install boot code (pMBR) and overwrite the ESP with zfsboot your Bios no longer detect those disk as bootable as they don't have the default .efi and startup.nsh . Then even if you restore the ESP partition you still need to create a boot record or use efi shell to boot from those nvme disk. The actual zfs upgrade doesn't cause that.
Agree. Seems that maybe startup.nsh is missing in the EFI folder.

The pool upgrade itself has nothing to do with this issue.
 
I'd recheck these again though:
- BIOS is using UEFI mode only (you had this initially).
- Make sure your MBR (start of the /dev/nvd0, sector 0 or LBA0 if you will) defines one partition (UEFI standard does require to have it defined. It's a fake entry, but it has to be there ; my hd output above is an example of such entry)
- You've created proper FAT FS for partition 1 (nvd0p1). There's no such thing as 200MB FAT32 FS. Some tools do allow to overwrite this but it breaks MS standard. Some BIOSes may be sensitive to this (newfs_msdosfs, drop all switches, let the command decide on parameters)
- make sure you are able to mount/umount the fat FS in livecd. Verify the structure and presence of the efi/boot/BOOTx64.efi
 
Thank you for all your inputs. Unfortunately I am unable to continue working on this system for the next few days.
I'll get back to you guys!
 
Back
Top