# UEFI installation



## 6502 (Jan 7, 2023)

I installed FreeBSD. The installation started in UEFI mode (selected UEFI USB flash to boot) but when finished after reboot I am not sure that OS is loaded in UEFI mode. Is there a way to verify it?


----------



## ondra_knezour (Jan 7, 2023)

`sysctl machdep.bootmethod`


----------



## 6502 (Jan 7, 2023)

It seems UEFI boot is not available. Installed with Auto (ZFS) and GPT (BIOS+UEFI). Is it necessary to run manual command to fix/init uefi boot?

`machdep.bootmethod: BIOS`


----------



## Alexander88207 (Jan 7, 2023)

I do also use ZFS with GPT UEFI but it seems that is method dont create an FreeBSD EFI entry as for example using UFS for installing.

My current mainboard can detect the EFI partition and boot it as UEFI OS.

I can remember that some older mainboards do support UEFI but can only work with normal entries.

However you can use efibootmgr() to create such an entry.


----------



## SirDice (Jan 7, 2023)

6502 said:


> It seems UEFI boot is not available. Installed with Auto (ZFS) and GPT (BIOS+UEFI). Is it necessary to run manual command to fix/init uefi boot?


You may need to mess around with efibootmgr(8) to add a UEFI boot entry. But you need to be UEFI booted to use it. As the install media apparently correctly booted with UEFI you could use that, just pick the shell option.



Alexander88207 said:


> I can remember that some older mainboards do support UEFI but can only work with normal entries.


Some older boards have a 32 bit UEFI, that won't work. But then the OP wouldn't be able to UEFI boot the install media either.


----------



## 6502 (Sunday at 4:00 PM)

UEFI boot is now working after using efibootmgr:

`efibootmgr -c -l /mnt/EFI/BOOT/BOOTX64.EFI -L FreeBSD`

I had 2 Boot Variables from old installations (ubuntu and debian).


----------

