How To: Dual Boot Windows 7 and FreeBSD

After some extensive reading and trial and error, I was able to successfully install FreeBSD alongside Windows 7 in a dual boot configuration. I chose to create this How-To, since some others were not specific, and had left me without the proper steps in mind.

My computer is a Compaq Presario 2.2Ghz laptop with 4GB of Ram, a 250GB HDD with Windows 7 Home Premium preinstalled. I made sure to have a back up of my Windows 7 installation prior to repartitioning.

Software Used:

1) GParted
2) FreeBSD 8.2 AMD64 ISO file
3) FreeBSD 8.2 AMD64 ISO DVD
4) ImgBurn
5) EasyBCD
6) Windows 7 Home Premium 64bit DVD

While the need for the Windows 7 Installation DVD may not be necessary, since partioning through Windows is possible and "shrinking" the existing Windows disk, I had already deleted my partition with GParted in the process of finding a solution. So with that in mind, and a clean HDD, I was able to boot the computer with GParted, and created (2) partitions. The first is a size of about 158GB formatted in NTFS, and the second of 80GB was left unformatted.

After reinstalling Windows 7 on the first partition, and completed some general needs, such as current updates, and installing antivirus, I downloaded EasyBCD for installation.
EasyBCD completed its install with no issues.

I had a copy of FreeBSD on a DVD disc with the help of ImgBurn. The iso image of FreeBSD was also needed to boot into the install menu; will explain later.

So with Windows 7 and EasyBCD, I configured the second partition of the HDD to use a BSD/PC-BSD Master Boot Record, and to boot the iso image file (left on the Windows partition).

After the change to the MBR for the BSD partition was successful, I rebooted. The EasyBCD setup was successful and displayed both labels I had applied in the EasyBCD setup, which were:

Windows 7
FreeBSD

After selecting the FreeBSD option from the menu, the install setup menu was booted without error. I had received previous "memlist1", "memlist2", and "zfree panic" messages in the past without using EasyBCD during boot time of the FreeBSD install disc.

I proceeded to install FreeBSD with the normal selection. No custom install was selected. During HDD allocation, I selected the unformatted partition (Partition 2) for FreeBSD install, and selected the first partition (NTFS Partition 1) as bootable.

!!!!MAKE SURE TO SET THE WINDOWS PARTITION TO REMAIN BOOTABLE AT STARTUP!!!!

I discovered the hard way about setting the BSD partition as the bootable slice, and had dyer consequences. Failing to do so locked my machine up at startup, and no keyboard or mouse response. I was able to remove my HDD from my computer and use my PS3 to format the drive, and then reinstall the drive for use with GParted. Be careful.

Next I setup the Swap File Sizes, and proceeded.

!!!!MAKE SURE TO SELECT NO BOOT MGR WHEN ASKED (3rd Option)!!!!

This "NO MBR" will allow the Windows partition and EasyBCD to remain in control over the MBR.

This is where the FreeBSD DVD disc comes in. The install will ask from where you would like to install the distribution from (CD/DVD, FTP, etc.). I inserted the FreeBSD DVD into the tray and selected the "CD/DVD" option.

!!!! I WAS NOT ABLE TO COMPLETE THE INSTALL FROM THE ISO IMAGE IN WINDOWS 7 !!!!

After all of this and some initial settings, the install was complete. Next after rebooting FreeBSD, I went back into Windows and EasyBCD, and changed the MBR settings within EasyBCD for the BSD partition. Since the FreeBSD ISO Image was set to boot at startup from the MBR settings, the MBR needed to be reconfigured for just a standalone BSD/PC-BSD setup without loading of the ISO Image.

After this was done I was able to select the "FreeBSD" option from the OS menu selection, and successfully logged into FreeBSD on my second partition.

I hope this helps those that are confused, and down the same road I had ended up following in hopes of dual booting with FreeBSD and Windows 7.
 
Good job!

I have two hard disks, one is for FreeBSD and the other is for Windows 7. And FreeBSD can boot Windows, however, Windows 7 can't boot FreeBSD...
 
BSD_User said:
...
So with that in mind, and a clean HDD, I was able to boot the computer with GParted, and created (2) partitions. The first is a size of about 158GB formatted in NTFS, and the second of 80GB was left unformatted.

Probably should point out that these were MBR partitions.
 
One point I would like to add which I have found out to my peril is the if you are installing FreeBSD 9 and use the 'Manual' method of partitioning you dont get the 3rd option to select No Boot manager! It may be necessary at this point in the installation to drop to the shell and sysinstall or manually fdisk and bsdlabel.
 
BSD_Addict said:
One point I would like to add which I have found out to my peril is the if you are installing FreeBSD 9 and use the 'Manual' method of partitioning you dont get the 3rd option to select No Boot manager! It may be necessary at this point in the installation to drop to the shell and sysinstall or manually fdisk and bsdlabel.

Further investigation has led me to find this post by nsth which has fixed my problem, panic over:

nsth said:
You'll notice bsdinstall has overwritten the MBR without asking any questions during the install, so for a scary few minutes you won't be able to access Windows.

Login to root (or login with a user and su to root), and then bearing in mind you should replace 'ada0' with your HDD's device if different, execute
Code:

boot0cfg -B ada0

to install the bootselect code to the MBR.
 
Back
Top