Dual Booting Revisited

In the last chapter, I mentioned dual-booting, a means by which you can run both Linux and Windows on one machine. At boot time, a menu lets you start one or the other. Let's pretend for a moment that you still want to run Windows from time to time. Perhaps you want the comfort of knowing that you can go back to your old operating system to do certain things. This is where dual-booting comes into play. There are a couple of ways to do this and I will get to those in a moment. Please note, however, that doing this will require a little more up-front work.

One dual-boot scenario involves a completely separate disk that you can dedicate to a Linux installation. Although this is an ideal situation, most people will have a single disk with Windows already loaded. If you have a large disk, there is a good chance that there are already two partitions. One will be a C: drive and the other a D: drive. What you want to do is erase the D: drive and use it for Linux. If you are going to follow this route, make sure you back up any documents or copy them into folders on your C: drive.

Unfortunately, Windows is just as likely to be taking up the entire partition table. The trick is to shrink the existing Windows partition, thereby creating some space on which to install Linux. To do this, you must defragment your disk in Windows before going ahead and resizing your partitions. You do this by clicking the Start button and then selecting Programs | Accessories | System Tools | Disk Defragmenter.

Resizing the partition is your next step. Once again, there are two ways of doing this. Some recent distributions such as Mandrake or SuSE will automatically detect a Windows-only disk and offer to shrink the partition for you. Alternatively, you can do this with a little DOS program called FIPS, which you can find on your Linux distribution CD. On Debian, check the tools directory. On Red Hat or SuSE, check the dosutils directory.

In most cases, there will probably be a directory called FIPS or FIPS20 with a number of files inside, including the FIPS.EXE program itself.

A Sample FIPS Session



When doing anything this drastic with your drives, always make a backup. In fact, no matter what you do with your system, always make regular backups.

Let's pretend that you've already run your defragmenter and that you have plenty of space on your hard drive. Start by creating a DOS/Windows boot diskette. This is generally done by typing the following command from the DOS/Windows command prompt (after inserting a blank diskette into the diskette drive).


The "/S" tells DOS/Windows to transfer the system to the boot diskette. You will also want to have a second boot diskette handy in order to do this a second time. You'll need it to back up your boot sector. I'll explain why in a moment. Next copy the FIPS.EXE utility and its associated files from the CDROM drive to the first diskette:


Remember that the path to the FIPS20 directory may vary depending on your distribution CD. Now, shut down Windows and boot from the FIPS diskette. When the boot completes, you should be at a DOS prompt. This is where the split occurs. Now, run the FIPS command:


FIPS will display a partition table showing you how the disk space has been allocated. FIPS will ask which partition you want to split. Given that we are taking these steps, there is only one partition; that makes it easy. Enter the partition number and press <Enter>. As a precaution, FIPS will ask you whether you want to make a copy of your boot sector on the remote chance that disaster strikes. You probably want to answer Y (yes) to the question. This will require a second, pre-formatted diskette. Put in your second diskette and answer Y to the next question; "Do you have a bootable floppy disk in drive A: as described in the documentation (y/n)?" Since you have just inserted the diskette, press <Enter>.

Now the fun begins. FIPS will display your partition table. Using the left and right cursor (arrow) keys, change the size of the partition (you'll see the numbers changing each time you press the keys). When you are happy with your changes, press <Enter>. FIPS will ask you to confirm the changes. You can still change your mind at this time. If everything looks good, press <c> to continue, then type y when asked if you are "Ready to write the new partition scheme to disk?".

When FIPS completes, you will reboot your system. You might want to reboot into Windows first just to make sure that things are working properly. If everything looks as you want it to, pop in your Linux installation CD, shut down Windows, and reboot the system.

Windows XP Considerations

Before we get into those details, please take note of the following statement.

Important Note


Although the install tools included on the distribution CDs are very good at determining the presence of a Windows 95, 98, or ME partition and shrinking those for you, most can not shrink a Windows XP NTFS partition. At the time of this writing, there was one exception to the rule?Mandrake 9.1 included a tool that could resize NTFS partitions, but it was the only one.

What that means, unfortunately, is that FIPS and the magical tools included as part of the Linux install CD won't work here. Once again, there are two possibilities. One is to get your hands on a product called PartitionMagic (http://www.partitionmagic.com/), an alternative to using FIPS. It's a nice, friendly, commercial package that enables you to modify partitions on the fly, including NTFS partitions such as those found on Windows XP systems.

The second option is to back up your data, reformat your hard drive, and reinstall Windows XP from scratch, this time making sure that only half (or a third or quarter) of your disk has been allocated to Windows. Please be sure that you are completely comfortable with the idea of reinstalling XP before you proceed.

There is a third option, of course. Install Linux and forget about XP.