Dual Booting Linux With Windows
The situation: You've got only one computer at home, running MS Windows.
You would like to set up a dual boot system between two operating systems, so you can use both on one machine.
For this exercise we will be using Red Hat Linux 7.1 and Windows XP Professional SP1.
These instructions will work with all NTFS-based operating systems, including NT, 2K, XP and 2003.
Users need to be familiar with Disk Partitioning and Linux Installation before continuing.
A quick note about a phenomena known as the "1024 Cylinder Limit". In a nutshell, this means that most operating systems must be within the first 8.5GB of the beginning of the physical disk, otherwise they may not boot. The reasons for this are fairly technical and beyond the scope of this article. For more information go here. In order to comply with these possible limitations, my Windows partition will be 5GB and the Linux partition wil be 2GB.
Step 1 Install Windows on a 5GB Primary Partition. This is basically a normal install, but not using all of the hard disk. The rest of the hard disk is left as free space.
Step 2 Install Linux in the free space. Select a 'Custom Install' and manually partition with Disk Druid. Here Windows is installed on hda1 and Linux goes on hda2 and hda5. Note that everything fits within 8GB of the beginning of the disk:
Tick 'Create Boot Disk' and put the boot files on the 'First sector of Boot Partition'. If you overwrite the Master Boot Record [default] you will kill the Windows XP install:
For a basic dual boot, this is all you need to do. The machine will boot to MS Windows by default. If the Linux Boot Disk is inserted, the system will boot to Linux.
Dual boot without a floppy
Linux will happily dual boot with Win98, as it is able to read 98's FAT32 partition. However Linux usually has difficulty reading NTFS, so is unable to pop any boot files in XP's primary partition. There are several ways of overcoming this, not least just using the Linux boot disk when required. However, some users may wish to add the Linux boot option to XP's boot menu, so they don't have to arse around with any floppy disks.
One solution is to use third party software and for this example I will use a great little freebie utility from way back. Bootpart comes from the same chappy who produced the fine Winimage utility and its one I've used myself for many years, initially to dual boot Windows NT and Windows 95 on a laptop.
Using Bootpart is as simple as running an executable from the command prompt. The app will allocate a number to each partition and, when run with the correct parameters, will modify XP's boot.ini to reflect a new boot option to the Linux partition. A small file is placed in XP's root directory, to help XP find the relevant partition from its boot menu [you can't just modify boot.ini, XP can't see the Linux partition without help].
This is how Windows XP's Disk Manager sees the partitions..
..and this is how Bootpart represents the same drives:
To make it all happen, run bootpart.exe from a command prompt window as shown above. This will indicate the numbers allocated to the different partitions, starting from 0. The one we're interested in is the second partition, number1, which is the Linux primary.
Then run the bootpart command thus:
BOOTPART 1 LINUXBOOT RED HAT LINUX
Where "1" is the number of the partition to boot to, "Linuxboot" is the name of the file which will sit in the root of the Windows partition and "Red Hat Linux" is the name which will appear in the Windows XP boot menu - bootpart automatically adds the entry to the Windows boot.ini file.
Note boot.ini is by default read only and this attribute must be removed beforehand to allow bootpart to modify the file..
And that's about it. Don't forget to change boot.ini back to read only afterwards, to help keep it safe. When the system is rebooted, the XP menu will show the extra operating system in its boot menu. Cool bananas..