13.4 to 14.2 boot code question

Hiya,

I upgraded from 13.4 to 14.2, upgraded all packages, rebooted, then did the zpool upgrade. Then I searched around about gptzfsboot and it seems I may have catastrophically put the cart in front of the horse. I'm seeing that other folks who did this have put their system into an unbootable state.

Now I'm afraid to reboot before asking about it here.

From gpart list here is my boot partition:

Code:
1. Name: vtbd0p1
   Mediasize: 262144 (256K)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 20480
   Mode: r0w0e0
   efimedia: HD(1,GPT,70788061-74a4-11e7-a3de-e1d60355ccad,0x28,0x200)
   rawuuid: 70788061-74a4-11e7-a3de-e1d60355ccad
   rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f
   label: (null)
   length: 262144
   offset: 20480
   type: freebsd-boot
   index: 1
   end: 551
   start: 40

I believe the proper command, before zpool upgrade, would have been:

gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 vtbd0

However, I don't want to do that and reboot before getting a consensus here.

My searching around told me to check /boot/efi which is empty:

Code:
# ls -lart /boot/efi
total 9
drwxr-xr-x   2 root wheel  2 Jun  1  2021 .
drwxr-xr-x  15 root wheel 76 May 28 08:05 ..
 
I believe the proper command, before zpool upgrade, would have been:
Yep. Doesn't matter if you do it before or after the zpool upgrade, as long as you do it before you reboot after the zpool upgrade ;)

My searching around told me to check /boot/efi which is empty:
Would have required an efi partition on disk too, the /boot/efi directory is going to exist even if there's no efi partition.

And you can double check with sysctl machdep.bootmethod to see how the system booted. But regardless of how the system booted, if you have both freebsd-boot and efi partitions it would be wise to update both.
 
Yep. Doesn't matter if you do it before or after the zpool upgrade, as long as you do it before you reboot after the zpool upgrade ;)
This has always been the sticking point; it's bitten veterans and newbies alike. That's why I have sticky notes "do bootloader then zpool upgrade" because new bootloader is always compatible with older zpool.
 
Seems you did the right thing as p1 is a freebsd-boot type partition. It remains to know your boot method with the command SirDice gave you. If it's BIOS, you're ok, and that's probably the case. If not, give the output of gpart show.

You can also use sysutils/loaders-update.
 
Back
Top