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. 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. Please note, however, that dual booting requires 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 have a single disk with Windows already loaded. If you have a large disk, there is a good chance that it already has two partitions: the C: drive and the D: drive. Erase the D: drive, and use it for Linux instead. 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 resizing your partitions. Click the Start button, and then select 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 and SUSE, 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.
Say you've already run your defragmenter and 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):
FORMAT A: /S
The /S tells DOS/Windows to transfer the system to the boot diskette. You will also want to have a second boot diskette handy, so 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 CD-ROM drive to the first diskette:
COPY D:\DOSUTILS\FIPS20\*.* A:
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 displays a partition table showing you how the disk space has been allocated and asks which partition you want to split. Because you have only one partition in this example, the answer is 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 requires 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)? Because you just inserted the diskette, press <Enter>.
Now the fun begins. FIPS displays your partition table again. Using the Left and Right 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 asks you to confirm the changes. You can still change your mind at this time. If everything looks good, press the <c> key to continue, then answer Y when asked if you are ready to write the new partition scheme to disk.
When FIPS completes, 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
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 it for you, not every distribution can shrink a Windows XP NTFS partition. Of the distributions covered in this chapter, SUSE 9.0 and Mandrake 10.0 can both do the job. Fedora cannot.
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 a quarter) of your disk is 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.