zpool upgrade change bootcode (RESOLVED)

Hi,

We've done a zpool upgrade but we have a question:

Should we do a gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0 or a gpart bootcode -p /boot/boot1.efifat -i 1 ada0 on both disks to do a correct boot upgrade?


manual-zfs.png



one_shoot.png


Many thanks
 
Regarding the first command it should be -i 2 because this is where freebsd-boot resides. Without EFI it is most likely -i 1. The examples you can find with a search engine often come from the pre-EFI times. About the second command -i 1 should be ok. But I am not sure if this is necessary.

Please check the meaning of the parameter i in gpart(8) and wait for an advise regarding the second command before updating the boot code and the EFI stuff. I am just a hobbyist :).

EDIT: removed the = between i and the number and added a - because this is how it ends up in the command.
 
If I've understood, to upgrade correctly bootcode in my zfs mirror:

first:
#gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 2 ada0
#gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 2 ada1

Second:
#gpart bootcode -p /boot/boot1.efifat -i 1 ada0
#gpart bootcode -p /boot/boot1.efifat -i 1 ada1


am I right?

PS: Second pass is mandatory? <-- It's deprecated, don't do it

Thanks again to all
 
gpart bootcode -p /boot/boot1.efifat -i 1 ada0
Don't do that, boot1.efifat is deprecated (IIRC removed on FreeBSD 13).

Mount your EFI partition and copy /boot/loader.efi over EFI/BOOT/BOOTx64.efi instead.

PS: Second pass is mandatory?
Your partitions support both UEFI and CSM boot. Best update both bootloaders. You can learn which method you are currently using with sysctl machdep.bootmethod, but anyways it doesn't hurt to have both bootloaders up to date.
 
  • Thanks
Reactions: 0mp
I didn't know how to find it out, thanks again

root@crucoli:~ # sysctl machdep.bootmethod
machdep.bootmethod: UEFI

Thanks to all, specialy to Emrion (and his manual) and Zirias. I've doing some tests with a spare machine and I think I have understand something I didn't have very clear:

GPT table, BIOS boot only

screenshot_1.png



GPT Table, UEFI boot only

screenshot_3.png



GPT Table, UEFI and BIOS boot

screenshot.png




Thanks again and happy sunday to everybody
 
Back
Top