Been searching this for a while and finally gave up. Is there a way to take an existing GPT freebsd-boot and replace/convert that partition with a UEFI boot (without destroying/brick the current ufs filesystem it is supposed to boot into)?
gpart show
If you have some free space on disk, you can add the UEFI partition withBeen searching this for a while and finally gave up. Is there a way to take an existing GPT freebsd-boot and replace/convert that partition with a UEFI boot (without destroying/brick the current ufs filesystem it is supposed to boot into)?
gpart add -t efi -a 4K -i <your efi part #> <your disk>
and after that add the UEFI bootcode gpart bootcode -p /boot/boot1.efifat -i <your efi part #> <your disk>
. And you will have both methods to boot It's even an install option. The nice thing about having both is that you can switch back and forth between EFI and CSM boot.I didn't know I could have both.
dice@chibacity:~ % gpart show
=> 40 625142368 ada0 GPT (298G)
40 409600 1 efi (200M)
409640 1024 2 freebsd-boot (512K)
410664 984 - free - (492K)
411648 8388608 3 freebsd-swap (4.0G)
8800256 616341504 4 freebsd-zfs (294G)
625141760 648 - free - (324K)
machdep.bootmethod
sysctl you can tell how the system was booted:dice@chibacity:~ % sysctl -a | grep UEFI
machdep.bootmethod: UEFI
dice@williscorto:~ % sysctl machdep.bootmethod
machdep.bootmethod: BIOS