# Successful dual-boot/multi-boot of FreeBSD 11.1 (by accident)



## Ren608 (Apr 13, 2018)

Hi,
I thought I would share my experience here, in case it might become useful someday.
I was trying to dual-boot FreeBSD and Windows 10; I couldn't get Wine to work on FreeBSD and I don't have enough memory to run Windows 10 as a virtual machine.
Anyway, here's my story, formatted and ordered:
1. Installed FreeBSD 11.1 at the end of my GPT disk, using freebsd-boot, freebsd-ufs and freebsd-swap partitions.
2. Entered shell before rebooting:
    2.1. "gpart bootcode -b /boot/pmbr ada0"
    2.2. "gpart bootcode -p /boot/gptboot -i 1 ada0"
    2.3. "gpart set -a bootme -i 11 ada0" (My freebsd-ufs partition was ada0p11)
    2.4. Reboot.
3. FreeBSD working fine.
    FreeBSD became the only bootable OS.
4. Installed 'Windows 10 Professional 64-bit' in UEFI mode at the start of my GPT disk.
    Windows became the only bootable OS.
5. Installed 'The rEFInd Boot Manager' on the ESP partition under Windows. The software and instructions can be found here: www.rodsbooks.com/refind/
6. After rebooting, rEFInd detected 'Windows 10' and my Linux distributions on the HDD, but not FreeBSD. (Moment of disappointment.)
7. The discovery:
    7.1 When booting, if I selected 'Windows Boot Manager (P4: TOSHIBA something)', it would boot into rEFInd and I could boot into Windows or my Linux distributions.
    7.2 When booting, if I selected my hard drive in Legacy mode (P4: TOSHIBA something, it would boot into FreeBSD. O_O
8. Now I can use Windows, FreeBSD or my Linux distributions!
Okay, that's about it. I think it might be useful for those (like me) looking forward into dual-booting or multi-booting FreeBSD. However, I'm too spent to reproduce this and see if it works twice. Anyway, have a nice day!


----------

