This is almost certainly not the “right” way to set up a dual-boot system. But: it’s quick-and-dirty, and it works. Tutorials on setting up dual-boot often get you to create a boot floppy, but as I don’t have a floppy drive in my laptop, after a few iterations, I ended up doing it this way. The process set out below is adapted from that described in an article from the Ubuntu forums.
- Install Windows. I recommend that any dual-boot system should be set up with a 24 Mb (that’s as low as you can go) FAT partition as C: drive for the boot files, with Windows set up on D: drive. And since you can never be sure whether or not you’re going to want dual boot a machine in the future, I recommend that all machines are set up this way to save hassle when you eventually decide you want to stick Ubuntu on your box as well.
- Once Windows is setup, use Ghost or some other drive imaging tool to take an image of your boot partition.
- Install Linux. When it comes to the boot loader setup, let it install itself to /dev/hda0
- Once Linux is going, grab the boot sector like this:
dd if=/dev/hda0 of=bootsect.lnx bs=512 count=0
This gives you a file called bootsect.lin. Move that to a FAT partition on your hard disk, to USB mass storage or somewhere else that you can get to it from within Windows.
- Boot your machine from your boot CD and apply the image you took of your boot partition back to your boot partition. Now you should be able to boot back into Windows, but not into Linux.
- Finally, put your bootsect.lnx file onto your C: drive and edit boot.ini to include a line like the following:
And when you reboot you should be able to select Linux from the boot menu.