Goals: Install FreeBSD 6.2 as a partition to a drive that currently runs XP Pro. Use XP's bootloader to choose the OS.
I spent a frustrating day yesterday performing this installation and there a point when I thought I might never recover from a corrupted partition table. After all this, I'll summarize the steps involved in getting this working and hopefully save someone else some time.
0. Confirm you have your Windows XP Setup Disk. If anything bad should happen, you may need this to go to the Recovery Console and fixmbr.
1. Create an Ultimate Boot CD
2. Create a FAT32 partition on your hard drive of about 2GB.
3. Create an unformatted partition where you want to install FreeBSD (mine: 20 GB).
4. Download the boot-only ISO image from ftp.freebsd.org and burn it to CD. (eg: link
5. Create a folder on the root of your new FAT32 partition called "freebsd" (eg. G:\freebsd)
Note: If you have a wired connection to the internet you can skip step 6 and then in step 13 choose an FTP installation. At the time I performed this installation, I only had wireless adapter and so had to resort to downloading the FTP tree ahead of time to my FAT32 partition.
6. Go to the releases section of ftp.freebsd.org (eg. link
) and patiently download the entire contents of your release into the freebsd folder on your FAT32 partition, preserving the directory structure.
7. Insert the FreeBSD boot-only CD and reboot. Change your BIOS to allow you to boot to CD if you haven't already.
8. Choose 1 from the FreeBSD menu. Look at all that system info... Select your country. Choose (S)tandard installation. Don't get worried about disk geometry messages.
9. In the FDISK-like screen, highlight your target partition and choose C to Create Slice. Keep the 165 partition type (FreeBSD native). And type Q to finish.
10. In the Boot Manager screen, select (S)tandard to create a MBR with no boot manager.
11. In the Disk Label Editor screen, select (A)uto Defaults. Look for the Part that has DOS as its Newfs. Highlight it and select (M)ount Pt. For the mount point name call it "/mnt". Press Q to finish.
12. Choose (A)ll for a full installation. Say yes when asked whether to install Ports collection. Select OK.
13. Choose (5) DOS as your installation media. Proceed with installation. You may want to note any packages that aren't installed in case you want to get them later.
14. Set up whatever final configurations you like and create any usernames, set the root password. Finally, exit installation, causing a reboot to your new FreeBSD installation.
15. Login as root. Edit /etc/fstab set your /mnt label to Options: rw (couldn't find how to do this during installation).
16. shutdown -r now
to reboot to FreeBSD once more.
17. Now that /mnt is read-write, we need to copy the boot sector of FreeBSD so that XP's bootloader can find it. Execute the following as root:
dd if=/boot/boot1 of=/mnt/bootsect.bsd bs=512 count=1
18. Insert your Ultimate Boot CD and reboot to it. Select Filesystem Tools: Partition Tools: Free FDISK. Click OK to everything. When Free FDISK executes, Answer Y to "Do you want to enable FAT32 suppport". Click 2 to set active partition. Set partition #1 (your XP partition) as the active partition. Esc, Esc, Esc, reboot.
19. In Windows XP, copy the bootsect.bsd file (eg. G:\bootsect.bsd) to C:\
20. Edit your boot.ini adding the new line under [operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Micro soft Windows XP Professional" /fastdetect
Now you should be able to reboot to either OS.