Solved Can't boot FreeBSD 12.1 after install on UEFI motherboard

Hello.
I'm quite new to FreeBSD and BSD world as well. Had a little time testing FreeBSD 12.1 on VirtualBox on Debian. Worked fine in uefi mode.
I've just installed the system on my real hardware twice: the first time with auto ufs partitioning, the seconds time with zfs-on-root guided. Both times i've got the same result - a strange efi record (see attachment). If i choose this record my PC is starting to reboot for three times and then boot Debian. I've tried to remove ssd with Debian system, but this doesn't change anything.
During the installation i chose default options except in case of setting up zfs-on-root (i chose UEFI mode instead of default LEGACY).
Any ideas?

P. S. Motherboard is ASROCK b450 Gaming K4. Both fast boot and secure boot are turned off.
 

Attachments

  • bootmenu.jpg
    bootmenu.jpg
    497.7 KB · Views: 507
So, my situation may be different but I have had to always follow the instructions (partially) on the FreeBSD wiki in order to get UEFI to work on my motherboard (MSI z240A-Pro).

I always use UFS because to me ZFS is pointless for a desktop. That's my opinion so no flames please :). I set up a small (500 mb) partition of type "efi" and then create my normal partitions for the OS and user's home. I do the install then when it asks to reboot, I choose the "drop to a shell" option and do the following (adjust for your device designations obviously)


newfs_msdos -F 32 -c 1 /dev/da0p1
mount -t msdosfs /dev/da0p1 /mnt
mkdir -p /mnt/EFI/BOOT
cp /boot/loader.efi /mnt/EFI/BOOT/BOOTX64.efi


I got this info from FreeBSD Wiki UEFI
 
I set up a small (500 mb) partition of type "efi" and then create my normal partitions for the OS and user's home. I do the install then when it asks to reboot, I choose the "drop to a shell" option and do the following (adjust for your device designations obviously)
Thanks for your reply. I should have told that i've checked ESP partition and bootx64.efi file for existing. They exist. Here how it looks like from Debian system:

Code:
lsblk  /dev/sdb
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sdb 8:16 0 232.9G 0 disk
├─sdb1 8:17 0 200M 0 part
├─sdb2 8:18 0 8G 0 part
└─sdb3 8:19 0 224.7G 0 part

mount /dev/sdb1 /mnt

tree /mnt/
/mnt/
└── efi
        └── boot
                ├── BOOTx64.efi
                └── startup.nsh

/dev/sdb is the disk where i've installed FreeBSD.
 
From my perspective this situation is strange. I have "UEFI only" option turned on in BIOS, so if FreeBSD can't boot on my motherboard in UEFI mode for some reason i guess my boot usb drive couldn't as well. But i 've successfully installed FreeBSD after booting in UEFI mode.
 
Not sure it matters but the wiki shows the BOOTX64.efi in all caps except ".efi". May not make a difference and I have never dual booted so like I mentioned, our situations are different.
 
Not sure it matters but the wiki shows the BOOTX64.efi in all caps except ".efi". May not make a difference and I have never dual booted so like I mentioned, our situations are different.
According to this information, FAT file system is not case sensitive. So as far as efi file locates on FAT partition i guess it doesn't matter which case was used for a file or part of a file name.
 
It's very strange. You successfully boot on the FreeBSD image that contains the installer (I guess an USB stick) but you can't on your ssd with FreeBSD installed? Do you boot the FreeBSD installer in UEFI mode or in legacy BIOS?

Your partitions seem Ok. The 200M sized is the EFI one, The 8G is the swap, I think and the last is freebsd-ufs or freebsd-zfs.
 
Good point, correct. I have just always used that procedure verbatim and it has always worked.
I don't have any ideas so i took your advice. Unfortunately nothing has changed. Still can't boot :(.
I wonder if it's software incompatibility of some sort and i just wasting my time trying to make it work myself.
 
It's very strange. You successfully boot on the FreeBSD image that contains the installer (I guess an USB stick) but you can't on your ssd with FreeBSD installed? Do you boot the FreeBSD installer in UEFI mode or in legacy BIOS?

Your partitions seem Ok. The 200M sized is the EFI one, The 8G is the swap, I think and the last is freebsd-ufs or freebsd-zfs.
As i mentioned before in BIOS i have option 'UEFI only' turned on. I believe it means that only UEFI images can be loaded. It's strange for me as well that i can't boot into newly installed system.
 
Thanks everybody for your support and advices. I found magic that works :) I've just update BIOS from 2018 version to latest and... FreeBSD finally booted! I hope it was the biggest problem of my journey with FreeBSD.
 
Back
Top