Dual boot to Windows10 and FreeBSD in UEFI

# install and others reference to install freebsd by zfs, and when we create boot that we follow my method as follows.

mount -t msdosfs /dev/ada0p1 /media # /dev/ada0p1 Windows10's EFI whose size is better 512M

cd /tmp
fetch https://nchc.dl.sourceforge.net/project/refind/0.13.1/refind-bin-0.13.1.zip
unzip refind-bin-0.13.1.zip

cd /media/EFI/Boot
mv bootx64.efi bootx64-windows10.efi
cp /boot/loader.efi bootx64-freebsd.efi
cp -a /tmp/refind-bin-0.13.1/refind/icons .
cp -a /tmp/refind-bin-0.13.1/refind/refind_x64.efi bootx64.efi
cp /tmp/refind-bin-0.13.1/refind/refind.conf-sample refind.conf

# vim refind.conf, append:
menuentry "FreeBSD/amd64 -CURRENT" {
loader \EFI\Boot\bootx64-freebsd.efi
icon \EFI\Boot\icons\os_freebsd.png
}

menuentry "Windows 10 Professional x64" {
loader \EFI\Boot\bootx64-windows10.efi
icon \EFI\Boot\icons\os_win.png
}

# create reFind boot
efibootmgr --create --activate --label "FreeBSD" --loader "/media/EFI/Boot/bootx64.efi"
umount /media
exit
 
Why would anyone want to boot their system with a completely unknown and vague EFI bootmanager which hasn't even left the beta stage? For all I know that thing could do tons of nasty stuff to my setup.

Not to mention that FreeBSD also supports EFI as well as the option to boot other operating systems. ... and the same can be said about the Windows boot manager (see for example programs like 'msconfig').

(edit)

Here, UEFI secure boot: https://freebsdfoundation.org/freebsd-uefi-secure-boot/
 
Why would anyone want to boot their system with a completely unknown and vague EFI bootmanager which hasn't even left the beta stage? For all I know that thing could do tons of nasty stuff to my setup.

Not to mention that FreeBSD also supports EFI as well as the option to boot other operating systems. ... and the same can be said about the Windows boot manager (see for example programs like 'msconfig').

(edit)

Here, UEFI secure boot: https://freebsdfoundation.org/freebsd-uefi-secure-boot/
It's little hard to me. I'm a new studant for FreeBSD. I have made it this far with a lot of effort.😂
 
It's little hard to me. I'm a new studant for FreeBSD. I have made it this far with a lot of effort.😂
You tried it harder than me. I ended up bought another SSD to install FreeBSD, my current SSD is preserved for Linux and I press F11 each boot to choose the OS I want to boot into 🤣
 
You tried it harder than me. I ended up bought another SSD to install FreeBSD, my current SSD is preserved for Linux and I press F11 each boot to choose the OS I want to boot into 🤣
You can try this method, just instead Windows10 with Linux in refind.conf, it should be OK.
 
There's no need to manually create menuentry sections in refind.conf as rEFInd will automatically scan for and detect bootloaders, and in most cases it will even automatically pick an appropriate icon for each one. You can control what drives are scanned for bootloaders by setting up scanfor in refind.conf. Similarly if you want to exclude certain paths from being scanned, you can set up dont_scan_dirs. Just create a directory EFI/FreeBSD and copy /boot/loader.efi to it, and rEFInd will find it automatically. No need to mess with the files in EFI/Boot. If you installed Windows 10, the file EFI/Boot/Bootx64.efi is just a copy of EFI/Microsoft/Boot/bootmgfw.efi, and there's a distinct possibility that Windows updates could eventually replace this file. Instead of replacing EFI/Boot/Bootx64.efi with rEFInd you could set up your UEFI to boot EFI/refind/refind_x64.efi by default.
 
# install and others reference to install freebsd by zfs, and when we create boot that we follow my method as follows.

mount -t msdosfs /dev/ada0p1 /media # /dev/ada0p1 Windows10's EFI whose size is better 512M

cd /tmp
fetch https://nchc.dl.sourceforge.net/project/refind/0.13.1/refind-bin-0.13.1.zip
unzip refind-bin-0.13.1.zip

cd /media/EFI/Boot
mv bootx64.efi bootx64-windows10.efi
cp /boot/loader.efi bootx64-freebsd.efi
cp -a /tmp/refind-bin-0.13.1/refind/icons .
cp -a /tmp/refind-bin-0.13.1/refind/refind_x64.efi bootx64.efi
cp /tmp/refind-bin-0.13.1/refind/refind.conf-sample refind.conf

# vim refind.conf, append:
menuentry "FreeBSD/amd64 -CURRENT" {
loader \EFI\Boot\bootx64-freebsd.efi
icon \EFI\Boot\icons\os_freebsd.png
}

menuentry "Windows 10 Professional x64" {
loader \EFI\Boot\bootx64-windows10.efi
icon \EFI\Boot\icons\os_win.png
}

# create reFind boot
efibootmgr --create --activate --label "FreeBSD" --loader "/media/EFI/Boot/bootx64.efi"
umount /media
exit
It was really helpful for me as a beginner. Thanks a million.
 
Back
Top