# Restoring Windows bootloader



## balanga (Feb 2, 2018)

I have a Windows 7 disk which had 170GB of free disk space on which I've just installed FreeBSD 11.1.  After installing it, I ran `boot0cfg -B ada0`.

On booting the system shows 

```
F1 Win
F2 Win
F3 FreeBSD
F4 FreeBSD

F6 PXE
```

F1 
Windows is loading files.... 
quickly followed by reboot

F2  
BOOTMGR is missing
Press Ctrl+Alt+Del to restart

F3
FreeBSD boots up normally

F4
Invalid Partition
No /boot/loader

FreeBSD/x86 boot
Default:0 :ad(0,a)/boot/kernel/kernel
boot:

This isn't supposed to happen...

How do I reinstall the Windows boot loader?

Does boot0cfg make a copy of the original mbr somewhere?


----------



## tingo (Feb 2, 2018)

From a working FreeBSD shell you can do `gpart show -p ada0`, this will tell you a few things, like which partition(s) are active and so on. This can help you to diagnose the problem.
boot0cfg doesn't make a backup copy, sorry.
To reinstall Windows bootloader, you will have to use Windows tools. What such tools are in the age of Windows 10, I don't know. Ask in a Windows forum.


----------



## xchris (Feb 2, 2018)

you can recover the win7 boot by booting the win7 CD and then go to recovery mode


----------



## Snurg (Feb 2, 2018)

`fdisk /mbr` from dos/win command line was the way some time ago.. Dunno if this is the case today.


----------

