how to install uefi boot loader

Questions about the installation of FreeBSD
Post Reply
nandi
Posts: 3
Joined: Sun Dec 31, 2023 7:42 am

how to install uefi boot loader

Post by nandi »

I was able to load ghost bsd manually after install by copying loader.ufi manually to the uefi
partition from linux. But no freebsd boot
loader in the Bios option in the past i
managed to fix it in Freebsd by creating
a second uefi partition 10 mb in size
freebsd copied the boot loader there
and i transferred the files to the main
uefi partition. Dont know how to do
it in this Ghost bsd installation.
wb7odyfred
Posts: 206
Joined: Sat Nov 12, 2016 5:44 pm

Re: how to install uefi boot loader

Post by wb7odyfred »

I will look at this more closely, Nandi. I am learning these details myself. You can use Linux GUI gparted command to view the disk partition.
sudo fdisk -l
sudo gdisk /dev/sda or sudo gdisk /dev/sdb
print
https://forums.FreeBSD.org/threads/wha ... ost-583240
Oct 3, 2022 _Martin says:
Actually yesterday I realized that boot1.efi is important part of my desktop/dev setup. One of my disks is shared between Linux and FreeBSD. I'm using grub, FreeBSD is chainloaded from it. I can't chainload loader.efi, it as to be boot1.efi. So this file is very important in this setup.

https://github.com/tianocore/tianocore. ... /wiki/UEFI
https://uefi.org/ UEFI org information


FreeBSD commands:
camcontrol devlist
geom disk list
gpart status
gpart show -lp
efibootmgr -o

Will update when I have more knowledge. Assume /dev/da0 is your booting GhostBSD image disk. Could be /dev/ada0 /dev/da1 or other name.
su -
mkdir /mnt/esp
mkdir /mnt/rootfs
mount_msdosfs /dev/da0p1 /mnt/esp

pkg install tree
tree /mnt/esp

What every is in the /EFI/BOOT directory is the default bootloader.EFI image that the GPT UEFI BIOS selects to default boot image.
/EFI/BOOT/BOOTX64-REFIND.EFI is the refind boot manager image
/EFI/refind /BOOTX64-REFIND.EFI is the refind bootloader files location
/EFI/refind/icons Icon png images for many different operating systems
/EFI/mxlinux/BOOTX64-mxlinux.efi
/EFI/ghostbsd/BOOTX64_GHOSTBSD.EFI

the UEFI BIOS (not MBR BIOS) works with scheme GPT partitioned disk example command (gpart create -S GPT /dev/da1)
The GPT UEFI BIOS, will find the first ESP EFI FAT32 primary partition and then find either the /EFI/BOOT/bootx64_xyza.EFI
https://wiki.freebsd.org/UEFI WIKI on FreeBSD UEFI
https://freebsdfoundation.org/freebsd-uefi-secure-boot/ FreeBSD Foundation article on UEFI secure boot setup
https://forums.freebsd.org/threads/what ... for.86466/ What are all those EFI binaries?
https://forums.FreeBSD.org/threads/what ... ost-583240 _Martin comment Oct 8, 2022
nandi
Posts: 3
Joined: Sun Dec 31, 2023 7:42 am

Re: how to install uefi boot loader

Post by nandi »

Thank your for your informative comment
you would not belive what happened
the Ghost Bsd installer installed
the freebsd and refind uefi files
and disabled them.
I had to enable them from Windows
with a program called easy uefi.
I could not find any information
how to enable them from Ghost Bsd.
I tried to chainload from linux the Ghost
Bsd Uefi boot loader after 2 days i give up
none of the online suggestion worked for me.
I know most people just make the boot loader
default and dont bother with dualboot.
Post Reply