NVMe FreeBSD boot, take 2

Continuing from previous post, I looked around a bit more and discovered that rEFInd – which I skipped before – is simpler.

The documentation is way better as well and its configuration format is not XML and easier to understand. And it doesn’t have much in the way of hackintosh options as it’s more of a general use boot manager.

The default package is missing the all-important NVMe driver but the one from Clover can be reused. The same with shell console option. In the end, my efi directory looks like this:

boot/refind.conf
boot/bootx64.efi
boot/drivers/NvmExpressDxe.efi
tools/shell.efi

That bootx64.efi is the renamed refind_x64.efi and the other .efi files are taken from Clover (with shell.efi from Shell64.efi).

The config is also really simple:

timeout 5
textonly
use_nvram off

Shorter timeout, disable fancy graphics, and use filesystem instead of nvram for storing boot loader variable. The rest are correctly configured including booting to the closest (or previously used) EFI bootloader – in this case FreeBSD EFI.

That’s great, and only took me less than an hour to configure everything.

Oh, and the FreeBSD boot options are now showing properly as well. It was gone when I tried Clover.

As a bonus, I moved around some RAM sticks and now it is running at 1600 Mhz instead of previous 1333 Mhz. The capacity stayed the same though at 16 GB. I wanted to have a bit more RAM but the only 1600 Mhz sticks I have are 8 GB and I kind of want to have a bit more RAM for dev server.

I’m not sure why I’ve never mentioned it but I just stick those efi files in a small flash drive and tell the BIOS to boot from it. MBR/GPT doesn’t seem to matter.

4 thoughts on “NVMe FreeBSD boot, take 2

  1. This is useful, however my supermicro X10SLL-F doesn’t see the nvme drive. Boots into shell. There is a BLK0 device which corresponds to the nvme drive but FS0 is not present, ie doesn’t mount the filesystem.
    I know the drive works because the Truenas installer (Freebsd) sees it no problem and writes to it with no issues, but no boot. I tried both legacy and uefi options in bios, no change. Tried various options in config file as well: no luck.

    • That’s the whole point of using refind. Put the refind in usb stick (or other storage recognized by the uefi bios) and boot off it (which then will load its own nvme driver and boot from it).

      • Yes, I have refind on usb but it doesn’t recognize freebsd loader that is on the nvme (Truenas install). Just for testing I installed Win 10 on the same nvme and refind was able to see it and boot to it but no luck with freebsd. The truenas installer asks if you would like to do traditional Bios or UEFI boot. Tried both with zero success.

        • Figured it out. Enabling this option made it recognize the freebsd loader.
          #scanfor internal,external,optical, manual

Leave a Reply

Your email address will not be published.