# Dual Boot Window 10



## peterwkc (May 13, 2019)

Dear All, 
I have installed FreeBSD 12 but it corrupted my MBR and now i cannot even boot into windows 10. What can be done to rescue it?
Please help. Thanks.


----------



## Martin Paredes (May 14, 2019)

Do you have only 1 disk?
Paste the output of `gpart show ada0`


----------



## twllnbrck (May 15, 2019)

Can you boot into FreeBSD? Which bootloader do you use?


----------



## mfaridi (May 15, 2019)

if you have familiar by FreeBSD use this links to solve your problem








						Need help fixing MBR - FreeBSD works, but boot menu doesn't
					

Hi,  I've just made my first ever install of FreeBSD 9.0, and although the install has been successful and FreeBSD boots properly, something appears to be wrong with the MBR, as I get no boot menu and therefore can't get into Windows XP anymore. I'm having trouble fixing the issue.  System...




					forums.freebsd.org
				











						Solved - How to restore boot loader?
					

In the event that the boot loader were wiped out, how would one restore it?  Thanks.




					forums.freebsd.org
				



you can solve this problem by Linux LiveCD.


----------



## drhowarddrfine (May 15, 2019)

peterwkc said:


> I have installed FreeBSD 12 but it corrupted my MBR


FreeBSD would do no such thing.


----------



## peterwkc (May 16, 2019)

After installation, need to go to cmd and issue gpart show ada0. Then, configure bootloader right.


----------



## peterwkc (May 18, 2019)

twllnbrck said:


> Can you boot into FreeBSD? Which bootloader do you use?


There is no bootloader menu.


----------



## mfaridi (May 18, 2019)

peterwkc said:


> There is no bootloader menu.





peterwkc said:


> There is no bootloader menu.


I send you two links to solve this problem.
Did you use them?


----------



## Martin Paredes (May 20, 2019)

You do not give us enough information to be precise with the commands you need

I suppose that every time you turn on the PC, it starts FreeBSD, that you have 1 disk, Windows 10 in partition 1 and FreeBSD in partition 2.

You claim that your disk uses MBR, so it is possible that all you need is to activate the Windows partition to boo it again.

To activate the partition 1, use the command `gpart set -a active -i 1 ada0`

Before you issue the command, read the manual gpart(8) to make sure that the parameters are correct

If you plan to have 2 OS (dual boot), you will need a boot manager to select which OS boot every time you boot your PC.

You can use the boot manager that comes with FreeBSD (BootEasy), to activate it, use `gpart bootcode -b /boot/boot0 ada0`


----------



## arunpt (Jun 6, 2019)

I have similar problem also.
I installed FreeBSD 12 along with Windows 10. My laptop usage MBR.
After installation used below command
boot0cfg -B ada0
boot0cfg -m 0x5 ada0
After restart below option appears.
F1 Win
F3 FeeBSD
F6 PXE

*FreeBSD does not boot/hangs when pressing F3* but Windows10 boots when pressing F1.

Even tried gpart bootcode -b /boot/boot0 ada0 but still same problem. Please help.

gpart showcommand info



Sector partition during installation


----------



## drhowarddrfine (Jun 6, 2019)

I had always heard that, when Windows is installed, it always thinks it's the only OS on the disk and will wipe out everything else so it needs to be installed first but I don't know about today. I always consider dual booting silly.


----------



## twllnbrck (Jun 6, 2019)

If you are on UEFI it may also be worth using a boot manager like rEFInd.

Or you can try to use the Win boot loader to boot FreeBSD. Take a look at https://forums.freebsd.org/threads/dual-boot-with-windows-10.61199/#post-365839


----------



## arunpt (Jun 6, 2019)

twllnbrck said:


> If you are on UEFI it may also be worth using a boot manager like rEFInd.
> 
> Or you can try to use the Win boot loader to boot FreeBSD. Take a look at https://forums.freebsd.org/threads/dual-boot-with-windows-10.61199/#post-365839


I am not on UEFI so rEFInd can't be use.
Thanks for answer. Can I use above method mentioned in post-365839 for MBR/legacy BIOS boot system?


----------



## macondo (Jun 6, 2019)

My wife wanted Netflix, so I had installed 2 SSDs (128 gigs each) on my box (dual core), I put devuan on one, and freebsd on the other. I'm using UEFI Legacy BIOS, each one on its own ssd. Works fine for me, I am too old, to be monkeeing around. To boot just press F11 at boot time and choose the one you want. Just a thought...

P.S. I got devuan as the default so she can go straight to netflix, and then I choose when it's my turn: freebsd. clear as mud?


----------



## twllnbrck (Jun 7, 2019)

arunpt said:


> Can I use above method mentioned in post-365839 for MBR/legacy BIOS boot system?


No, I don't think so. It would surpise me.

If you're using MBR slices you can use the FreeBSD boot loader and boot0cfg(8) to dual boot Windows 10 and FreeBSD.
E.g., if Windows is slice 1 and BSD is slice 3 on ada0 try

```
boot0cfg -B -s 1 -s 3 /dev/ada0
```


----------

