cannot find loader.efi on installer

Hi I understand from various instructions I have seen that manually setting my system to boot FreeBSD from EFI GPT partition involves a step of placing a copy of loader.efi file from the installation media to the target system's efi partiton (ESP). I only see repeated references to the assumption that I can find /boot/loader.efi when I have gone into the shell option from the installer (FreeBSD 14.2 Release memstick image) in order to manually setup the partitions (avoiding letting the installer auto format an entire drive). The problem I am running into is that the installer does not have any
/boot/loader.efi that I can copy over to the ESP, and the /boot/efi dir is empty

I see other loader referenced names for files in /boot, just not anywhere is there any file named loader.efi that I can try to copy.
google-AI reports that I need to select the installer's "UEFI" option when I start it, but there is no such thing I can find.
I do know that my BIOS is able to boot in UEFI mode from other already installed systems on other partitions, so that tells me the BIOS is not needing to be set to UEFI mode, though it does not actually show me any control in the BIOS UI to switch boot modes between UEFI and BIOS/legacy

nowhere with google can I find any reference to being able to download the loader.efi bin file that is missing, theoretically from the FreeBSD site, which would have been helpful

Similarly, I see advice to update the loader.efi file after any major FreeBSD version upgrades, but then the same question, how are such people able to do so?

what am I missing here? is there some way I can make the installer boot into a EFI mode that will then provide the missing loader.efi file?
 
The problem I am running into is that the installer does not have any /boot/loader.efi that I can copy over to the ESP
Sure about that? Maybe you have the wrong image?
Code:
root@hosaka:/vm/.iso # mdconfig -a -f FreeBSD-14.2-RELEASE-amd64-memstick.img
md0
root@hosaka:/vm/.iso # mount /dev/md0s2a /mnt/
root@hosaka:/vm/.iso # ll /mnt/boot/loader.efi
-r-xr-xr-x  2 root wheel 660992 Nov 29 13:51 /mnt/boot/loader.efi*
and the /boot/efi dir is empty
You'll need to mount the efi partition yourself, doesn't have to be mounted on /boot/efi but that's where it normally gets mounted on an installed system. I'm fairly certain the install media doesn't mount it (thus /boot/efi remains empty) as it may or may not be the first partition on disk. Heck your disk may not even have an efi partition. If the install media boots and /etc/fstab tries to mount something that doesn't exist, or the wrong partition, the boot process will stop and you'll be stuck in single user mode. So the install media simply doesn't even attempt to mount it.

With regards to /boot/efi, nothing actually needs to be mounted there. I would actually recommend not mounting it on your freshly installed system. The OS doesn't need to access those files, nothing really does. I've set mine to noauto so I can easily mount it when I need to update loader.efi, but other than that it'll just stay unmounted.
 
There's more to this story, also see uefi(8). When all else fails you should consider falling back to the generic default: /efi/boot/bootx64.efi (note: this is for AMD64, other architectures use other names).
 
Thanks all, both of you. I did at least get to see the presence of loader.efi on the installer image, after following your provided example & looking in the AMD64 memstick image. It seems that the critical mistake I made was misinterpreting that the i386 image was what I needed because my CPU is Intel, not AMD. Curiously now it appears the AMD64 image is what I needed for my system, even if the CPU is Intel i-5. I'll look for more documentation to explain why. I wish the engineers could make the installer more friendly to people who have not learned more of the subtle aspects of how this is all put together, and allow it to automatically install VFS pool spanning just one GPT partition or create necessary partitions out of free space, so that it could very easily be added next to an existing Win or Linux OS installation on the same drive, instead of how it appears to jump right to the step of reformatting and using the entire drive. It could even handle just adding the FreeBSD system as an option on any encountered grub2 boot loader menu, without what right now appears to require a bunch of manual steps. it looks like it is trying to add itself to the BIOS boot menu on my system, but it doesn't work when I select that boot item. Maybe if I try more with the correct image it will actually work, but for now I will try the manual setup steps to place it in free space next to an existing linux and manually add it to the grub menu, chain loader, since there is now hope for me to be able to copy over the loader.efi to the EPS (which is apparently the same file as bootx64.efi). Is my architecture truly AMD64, even though it is Intel I-5 CPU?
 
x86-64 (also called x86_64, x64, or amd64) is the 64-bit CPU architecture that is used in Intel and AMD processors. It is an extension to the 32-bit x86 (i386) architecture. The x86-64 architecture is used in most CPUs for home computers and servers in use today.
(if AI says it, it must be true)
 
Back
Top