# How to install a boot loader



## paldepind (Mar 30, 2010)

Hi 

I'm trying to install FreeBSD along with Windows 7 on the same computer. To do that I first I installed Windows on 60GB of my hard disk and then FreeBSD 8.0 on the rest of it. After that I had a boot loader where I could choose between booting Windows and FreeBSD. Booting into FreeBSD worked just fine but when I tried to boot Windows, Windows told me it was broken and that I needed to repair it with a repair CD. I then owerwrote my 60GB Windows partition with another Windows installation. Now Windows is working fine but I no longer have a boot loader and therefore cannot acces my FreeBSD partition.

How do I install a bootloader that is capable of booting both Windows and FreeBSD without screewing any of them up?


----------



## FBSDin20Steps (Mar 30, 2010)

Your topic has been discussed several times here on the forum...


----------



## paldepind (Mar 30, 2010)

Well, then I'm sorry but I can't find any of them..


----------



## DutchDaemon (Mar 30, 2010)

Search for multiboot, dual boot, etc.


----------



## paldepind (Mar 30, 2010)

That's what I've already done..


----------



## Beastie (Mar 30, 2010)

`# boot0cfg -B ad0`, provided the boot disk is the first ATA disk.


----------



## paldepind (Mar 30, 2010)

Beastie said:
			
		

> `# boot0cfg -B ad0`, provided the boot disk is the first ATA disk.


So I'll have to run that command in FreeBSD? Then in the installation of FreeBSD what option am I going to choose when it asks about installing a boot loader?

Btw, I don't want to use the Windows boot loader..


----------



## Beastie (Mar 30, 2010)

Since you haven't touched the FreeBSD slice, it's still there, so you don't have to reinstall it.

Unless the Windows setup overwrote the partition table, just installing the boot manager using the above command will be enough to dual-boot. If it did overwrite it, then the easiest solution will be to reinstall FreeBSD and choose the boot manager.


----------



## paldepind (Mar 31, 2010)

Beastie said:
			
		

> If it did overwrite it, then the easiest solution will be to reinstall FreeBSD and choose the boot manager.


 That's what i did the first time, but it screwed Window up, so it could not boot.


----------



## paldepind (Mar 31, 2010)

paldepind said:
			
		

> That's what i did the first time, but it screwed Window up, so it could not boot.


I just tried doing it again and this time it worked just fine. I don't know what went wrong the first time but it's working now, and it's sweet!!


----------

