Configuring Microsoft and Linux on the Same Computer

Installing Microsoft Windows and Linux on the same computer can be a good idea for many reasons. Good software is available that, as of this writing, works only on Microsoft Windows. The software that runs many businesses was written to work only on Microsoft Windows. Users who are making the transition to Linux are more comfortable when the old familiar Microsoft operating system is there, just in case.

You have alternatives. Using two separate computers is one option. You could try the software created as part of the WINE (Wine Is Not an Emulator) project, which allows you to use some Microsoft software on Linux. You could try related software, such as that offered by Xandros, Lindows, or CodeWeavers (CrossOver Office). You could even install Microsoft Windows inside a Linux third-party proprietary virtual machine application, such as VMWare or Win4Lin.

However, the most commonly used option is still a dual-boot configuration. In other words, you can set up two different operating systems on the same computer. For example, Figure 2.1 shows the standard GRUB menu, configured to start either Red Hat Linux or a Microsoft Windows server operating system.

click to expand
Figure 2.1: A dual-boot configuration

You can set up a dual-boot with operating systems on separate physical hard drives . Alternatively, you can reconfigure the available free space on an existing hard drive. In this case, follow the procedures described in the Step-by-Step section later in this chapter carefully .

Whatever you do, start by backing up your data. Mistakes happen, and you want to be able to recover from a disaster.

The Easy Way: A New Hard Drive

In this section, we describe the easiest way to install Linux on an existing computer. Your BIOS should detect the second hard drive automatically. When it does, you know that the Red Hat installation program, Anaconda, should also detect that drive automatically.

As long as you limit the changes to the new empty drive, the risks are minimal. You can configure and format partitions with fewer risks to your Microsoft Windows data on the existing hard drive.


The default settings for a Red Hat Linux server installation will remove all data on all hard drives, even if it includes Microsoft Windows.

As of this writing, Red Hat Linux can be installed directly only on a regular IDE or SCSI hard drive. While you can use hard drives connected through USB, IEEE 1394, or parallel ports to store Linux directories, Anaconda may not support the installation of Red Hat Linux on these drives.


IEEE 1394 systems are also known by their proprietary names , FireWire (Apple s trademark) and iLink (Sony s trademark).


One more reason to add a new hard drive: Anaconda will not install Red Hat Linux 9 on hard drives with bad blocks.

The Cheaper Way: An Existing Hard Drive

Not everyone can get a second hard drive. Even if you do, you may not have room inside your computer for that drive. Many people who want to set up Linux and Microsoft Windows in a dual-boot configuration will need to use the free space on an existing hard drive.

If you want to install Red Hat Linux on the available free space on your hard drive, follow this basic procedure. Keep in mind that deviations can put your current data at risk. These are basic steps; the next section describes the dual-boot configuration process in detail.

  1. Make room on your Microsoft Windows physical hard drive. In most cases, you can use Microsoft s Disk Defragmenter program for this purpose. To learn about the space you need for Linux, see Chapter 03 .

  2. Split the partition with your Microsoft Windows data. This is possible with FIPS.EXE , available on the first Red Hat Linux installation CD. If you prefer, third-party tools are also available. Be sure to leave enough room for Microsoft Windows virtual memory.


    FIPS, the First Interactive Partition Splitter, can split only primary partitions. And as of this writing, it cannot split partitions formatted to Microsoft s NTFS filesystem.

  3. If desired, use fdisk to organize the new partitions. You can also do this when you run Anaconda. If you use Microsoft s FDISK.EXE program, you ll be able to create only one primary partition.

If you want to use the free space on an existing hard drive, some planning is required. Make sure that the free space is sufficient for all the Red Hat Linux programs and packages that you want to install. Remember to include additional free space for your data and for any applications that you might install at a later date. We discuss space requirements in more detail in Chapter 03 . And make sure that there is sufficient space for your Microsoft Windows operating system and its virtual memory requirements.

As an example, look at Figure 2.2. This is a view of a 20GB hard disk. You have 5GB of files for Microsoft Windows. You could easily split this hard drive into two partitions of 10GB each. The first partition would include enough free space for the Microsoft Windows files and virtual memory. The second partition would include enough room for installing everything from the Red Hat Linux installation CDs.

click to expand
Figure 2.2: Hard disk dual-boot scenario

Microsoft Windows requires significant free space for virtual memory. Linux does not require this kind of free space, because Linux virtual memory is normally contained in a separate swap partition. In my experience, a Microsoft Windows partition doesn t work well if it s more than 60 percent full of files. But this is just a guideline; this is not a book on optimizing Microsoft Windows. If you want more information on this topic, Sybex has some excellent books in this series, including Mastering Windows 98, Mastering Windows 2000 Professional (Second Edition), Mastering Windows XP Home (Second Edition), and Mastering Windows XP Professional (Second Edition).


Some Linux users prefer a different utility, parted . You can use this GNU program to add, delete, resize, and format partitions. I m hopeful that eventually it will incorporate the functionality of mkfs , fips , and fdisk . As of this writing, it makes changes to disk immediately, and therefore I consider it a riskier tool than fdisk . The one advantage is that, like Partition Magic or System Commander, it can resize existing partitions. More information on parted is available from the GNU project at .

Step-by-Step Procedure

With the big picture in mind, you re ready to go through the step-by-step procedure of preparing your hard drive for Linux. We ve assumed that you want to install Linux on the same physical hard drive where you already have Microsoft Windows installed.


This section uses FIPS. Use it at your own risk. FIPS explicitly comes with ABSOLUTELY NO WARRANTY. I ve used it frequently without problems; however, it is fairly easy to accidentally destroy your data with FIPS.

We ve assumed that your hard drive is organized as only one partition, with all space allocated to the Windows C: drive. Alternatively, you could use these steps if the other drives don t provide enough room.

If you already have a hard disk with two or more partitions, you ll probably see this in Microsoft Windows as at least a C: and a D: drive. If you can move all of your files to the C: drive and still have enough room for Windows virtual memory, you can skip this process. Just make a note of the size of each of these drives, to help you identify them during the Linux installation process.

To prepare your hard disk for Linux, follow these steps:

  1. Find the capacity of your hard disk and the amount of space occupied by existing files. Determine the amount of room that you want to allocate to Microsoft Windows and Red Hat Linux.

  2. Defragment your hard disk. Use the Disk Defragmenter, which is typically available from the Windows Start menu in the Programs ˜ Accessories ˜ System Tools folder. The exact steps and location vary depending on your version of Microsoft Windows.

  3. Prepare a partition splitter. If you want to use FIPS.EXE , copy it, along with RESTORRB.EXE and ERRORS.TXT , to a Microsoft Windows or MS-DOS boot disk. Alternatively, you can use the boot disk that comes with a third-party partition splitter such as Partition Magic or System Commander. In the remaining steps, we assume that you re using FIPS.


    You can create MS-DOS boot disks from downloads available from .I prefer the Microsoft Windows 98 boot disk.

  4. Reboot your computer with the boot floppy. When you see the DOS A:\ prompt, run the FIPS command.

  5. After you see the warning about not using FIPS in a multitasking environment, you see directions to Press any key to continue.

    If you have more than one hard drive, you are asked to choose; they re listed in boot order, similar to what is shown here. Drive 1 should be either the first IDE or SCSI hard drive on your computer. Select a drive.

     Which Drive (1=0x80/2=0x81) 
  6. Next, you see a partition table (see Figure 2.3), listing the four primary partitions. If all four primary partitions are used, FIPS will fail, because it can split only primary partitions. If you have more than one partition that you can split, you are asked to select it, by number.

    click to expand
    Figure 2.3: The FIPS partition table

  7. If you see the following message, this means you have to select from among the available primary partitions. Make your selection and continue. (If you select an extended partition, FIPS won t be able to handle it and will abort.)

     Which Partition do you want to split (1/2/3)? 
  8. Your selected partition is scanned. You re shown basic information about the partition, and then you re asked whether you want to write backup copies of the boot and root sectors to a bootable floppy disk. This is an excellent idea. Answer YES to both questions. You see a message similar to Writing file a:\rootboot.000 . Make a note of this file. If you have a problem, you can restore the original partition table by using the RESTORRB.EXE command.

  9. Now you can define how you re going to split the partition. Using the arrow keys, you can change the size of the existing and new partitions. Make a note of the size of the new partition.

     Old partition          Cylinder         New Partition  2075.3 MB               280              932.8 MB 
  10. When you re ready, press Enter to confirm the two new partitions. The old partition should contain the existing data. Next, FIPS tests the space to be occupied by the new partition. If it s empty, FIPS presents you with a new partition table similar to Figure 2.3. Next you must decide whether you want to continue or re-edit the partition table (c/r)? If you press r , return to step 6. If you like your changes, press c to continue.

  11. Finally, you re asked whether you want to proceed (y/n)? to write the new partition scheme to disk.

  12. Once the new partition scheme is written, you re ready to install Linux. The new partition should show up during the Red Hat Linux installation process. If all goes well, it should show up as empty, and it should be the size you created with FIPS.

More information is available on FIPS from its website at .


Mastering Red Hat Linux 9
Building Tablet PC Applications (Pro-Developer)
ISBN: 078214179X
EAN: 2147483647
Year: 2005
Pages: 220 © 2008-2017.
If you may any questions please contact us: