Chapter 31. Multibooting Windows XP with Other Operating Systems

Why Multiboot?

In today's world of advanced operating systems and low hard disk prices, it certainly is not uncommon for many users to want to experiment with different operating systems. The world of consumer computing is ripe with many different options. With the proliferation of the Internet and its accompanying high-bandwidth needs, whole operating systems are available for free download, in particular numerous versions of the UNIX and Linux operating systems.

Along with just plain curiosity and experimentation, there are some other good reasons for wanting to switch between operating systems:

  • Many users use two or more operating systems because of application compatibility issues. Hardware support issues arise too: Windows 98 might have drivers for old hardware that Windows XP doesn't support. And, I know people who still have to use some old and esoteric hardware devices that work only under MS-DOS.

  • Some users want to run specific applications or games in the optimal environment.

  • A developer might swap between Windows XP Professional and Windows 9x or NT 4.0 to test application compatibility.

  • Web site developers need to use different OS versions to see how their pages look with the corresponding different Web browser versions.

  • As an author, I need several operating systems functioning on a single computer to meet my testing and writing needs.

Other than buying multiple computers, there are two ways of accommodating these needs. You can multiboot, that is, select your desired operating system at bootup time. Or, you can run another operating system in a “virtual” computer; that is, in a special application program that lets the alternate OS think it's running on a PC of its own. The “virtual” approach is very useful, and we'll cover it later in the chapter.

NOTE

You should read, or at least skim, this entire chapter before beginning to implement a complex multiboot arrangement. We have not reiterated some considerations under each scenario. Pay particular attention to the issues of file formats, as well as applications and data sharing between operating systems. Then be sure to see “Tips from the Windows Pros: Living with More Than One OS” at the end of the chapter, which covers third-party multiboot solutions.

And although this chapter provides some solid fundamentals, an in-depth discussion of the topic could—and in fact does—fill an entire book. For additional details on setting up multiboot scenarios, we recommend that you pick up a copy of The Multi-Boot Configuration Handbook, published by Que.

Windows XP Professional directly supports multibooting with the following operating systems:

  • Windows XP Home Edition

  • Windows 2000 Professional

  • Windows NT 3.51 or Windows NT 4.0

  • Windows 95, Windows 98 and Me

  • Windows 3.1 or Windows for Workgroups 3.11

  • MS-DOS

  • OS/2

Multibooting with UNIX and Linux is also possible, although it takes some extra effort.

Preparation

As discussed in Chapter 2, “Getting Your Hardware and Software Ready for Windows XP” and Chapter 3, “Installing Windows XP Professional,” it is certainly possible, with a bit of work, to run multiple operating systems on your Windows XP Professional computer. Whatever the operating system on your machine at the moment, you've no doubt spent hours and hours fine-tuning it and learning all the little quirks, and you probably have all the settings, applications, and data files arranged to your liking. Well, take heart—you can probably make it live harmoniously with Windows XP Professional.

CAUTION

Installing a new operating system is not always a smooth procedure, as you probably know. I strongly recommend that you create a backup, or at least an emergency repair disk before you install another operating system on your computer. That way, you can revert to it in case of catastrophe.

Depending on your current or planned system, running multiple operating systems can be as simple as installing your new copy of Windows XP alongside your current operating system. But if you're like me, that will not be the perfect choice. Either way, I'll try to cover all the common methods so you can make the choice that's right for you. After all, if you were the type who settles for things the way they were, you would skip this chapter because a single operating system is all you need.

File System Specifics

Your goal in creating a multiboot system is to have all the operating systems coexist in such a manner that they will be capable of sharing files with each other. Nothing is more frustrating than realizing that you must reboot to retrieve a file, copy it to a floppy, and reboot again to copy into your other operating system. A little bit of knowledge about file systems can save you many headaches down the road.

Not all operating systems use hard disks in the same manner. There are several different file system formats out there, which determine how file space is allocated, where directory information is stored, and so forth. The problem is that each operating system has its own list of supported file system types. Table 31.1 lists the various file systems supported by the operating systems discussed in this chapter. Note that in the table, RO stands for read-only, RW stands for read/write, and NS stands for not supported. Be sure to read the footnotes for any operating system you want to use.

Table 31.1. Relationships Between File Systems and Operating Systems

OS

Fat16

Fat32

NTFS4

NTFS5

Extended2

MS-DOS 6.22

RW

Windows 95

RW

NS

RO[1]

RO[1]

RO[2]

Windows 95b

RW

RW

RO[1]

RO[1]

RO[2]

Windows 98

RW

RW

RO[1]

RO[1]

RO[2]

Windows NT 4.0

RW

NS[3]

RW[4]

RW[4]

RO[6]

Windows 2000

RW

RW

RW[7]

RW

RO[6]

Windows XP

RW[5]

RW

RW[7]

RW

RO[6]

Linux

RW

RW

RO[8]

RO[8]

RW

[1] Windows Me/9x can read the NTFS file system via a free utility called NTFS For Windows 98. Although NTFSWIN98 is read-only, it works very well and is highly recommended. A version with limited write capability can be purchased. You can obtain these products from http://www.sysinternals.com.

[2] Windows Me/9x can gain read-only access to Linux's extended2 file system by using the free utility FSDEXT2. This utility can be found at http://www.yipton.demon.co.uk.

[3] You can use the FAT32 utility for Windows NT 4.0 to read and write to FAT32 file systems from Windows NT 4.0. This utility can be obtained from http://www.sysinternals.com. This utility is not free.

[4] If an NTFS partition is to be shared with Windows 2000 or XP, you must use Windows NT 4.0 Service Pack 4 or later.

[6] Windows NT 4.0, Windows 2000 and Windows XP can read extended2 file systems by using the free utility Explore2FS. This utility can be found at http://uranus.it.swin.edu.au/~jn/linux/explore2fs.htm.

[7] Windows 2000 and XP automatically convert NTFS version 4 volumes to NTFS version 5.

[5] You can't format a new partition with FAT16 during XP's installation process or disk manager. Another OS must create it.

[8] Although Linux kernels from 2.2.x on up provide a read/write driver for NTFS, you should use the driver only in read-only mode. The write portion of the NTFS driver is still in the very early stages of development and is safe to use only under very limited circumstances (see linux-ntfs.sourceforge.net).

Understanding the interplay between these various file systems is key in creating an efficient multiboot system. To the greatest extent possible, you should choose a format that's compatible with all the operating systems you'll want to use, on at least one disk partition. This will give a place to store files that can be read no matter which OS you're using.

Where you have the choice of several different candidate file systems, you must decide which is best, based on your hardware and the application for which you are creating your multiboot system. The following sections quickly recap file system descriptions, with an eye toward multibooting issues.

FAT16

FAT16 is the oldest file system mentioned in this chapter. It was originally intended for file systems based on the DOS operating system. As such, it is quite antiquated and not often used today. FAT16 might be your only choice in some situations due to its two major advantages:

  • FAT16 is supported by almost all operating systems, including all versions of Windows, OS/2, MS-DOS, and Linux. FAT16 is the only format supported by MS-DOS 6.22 and earlier.

  • The structure of the FAT16 file system is much simpler than the others, giving it much less software overhead. This gives FAT16 increased speed on volumes less than 1GB in size.

One big limitation of FAT16 is the fact that it cannot be installed in primary partitions greater than 2GB in size with MS-DOS and Windows 9x/Me; 4GB is the limit for FAT16 with Windows NT/2000/XP. To use the full capacity of a disk beyond those limits, an extended partition can be created, but it must be broken into non-bootable logical drives of no more than 2GB/4GB in size each. For example, a 10GB drive prepared as a FAT16 drive for use with both Windows Me and Windows XP would need to be divided into five drive letters, C: through G:. Also, the larger the partition, the less efficient FAT16 is in allocating space to small files—more disk space is wasted. As explained later in the chapter, this limitation has been overcome by FAT16's new brother, FAT32.

NOTE

If you are using the first edition of Windows 95, you can use only the FAT16 file system. Versions of Windows 95 prior to Windows 95 OSR2 cannot use FAT32 partitions. A prompt upgrade to Windows 98 is recommended for this as well as for many other reasons.

Also, keep in mind that Microsoft frequently uses the term FAT to refer to both FAT16 and FAT32 file systems. The Disk Management program, in particular, only formats hard drive partitions with FAT32, not FAT16.

FAT32

The FAT32 file system was introduced with Windows 95 OSR2. FAT32 was essentially the answer to most of the shortcomings of FAT16. The following are among FAT32's strengths:

  • FAT32 supports partitions up to 2TB in size (that's 2,048GB to you and me).

  • FAT32 increased the number of clusters (decreasing the cluster size) on the hard disk, making the storage of small files take up less room than it did previously with FAT16.

  • The structure of FAT32 remains very small, providing a notable speed increase over FAT16.

Of course, with all changes come pain and compatibility issues. To this day, Windows NT 4.0 does not natively support FAT32. The addition of FAT32 file support into Windows 2000 and XP is a welcome one, especially for multibooting users. However, neither FAT versions support the advanced security and reliability features of NTFS, as explained in the following section.

The versions of MS-DOS that ran underneath Windows 95 OSR2, 98, and Me can read and write FAT32 partitions, so you can use the command line mode of these operating systems if you need MS-DOS access to FAT32 partitions. The “standalone” versions of MS-DOS up to and including Version 6.22 cannot use FAT32 partitions.

NTFS

The New Technology File System, or NTFS, brought with it many welcome additions to the world of Microsoft computing, including the following:

  • Permissions—NTFS brought with it a concept used in the Novell and Unix worlds for quite some time. Permissions enable you to configure files and folders to be accessible only by specific users, user groups, or both. This is imperative for networked multiuser operating systems.

  • Compression—You can transparently compress folders or files on an NTFS volume.

  • Reliability—NTFS is much more reliable, and as such is suited to a server environment. Disk repair applications seldom need to be run on an NTFS file system.

  • Large volumes are accessed much quicker with NTFS—Although FAT still rules the below-1GB world, NTFS excels at accessing files and folders in very large disk partitions.

  • Encryption came with the version of NTFS supplied with Windows 2000 and XP (also known as NTFS 5). Now you can lock individual files or folders for high levels of security.

  • Dynamic disk arrangements enable you to group separate physical drives into one large virtual drive (see Chapter 29, “Managing the Hard Disk,” for a full discussion). However, be careful with dynamic disks—only Windows 2000 and XP Professional support it, and other operating systems can't boot from a drive that's been set up for dynamic disk partitions.

A disadvantage of NTFS, however, is that it can't be read directly by DOS, OS/2, UNIX, or Windows Me/9x. You can download a free utility to read NTFS disks from http://www.sysinternals.com, and you can purchase a program with limited writing ability. Still, this isn't as straightforward as having support built into the operating system. Likewise, Linux has only limited support for NTFS—reading works but writing is dangerous. So, NTFS is not a generally useful format for a shared partition on multiboot systems.

By the way, there are now two versions of NTFS: versions 4 and 5. Version 4 was used by Windows NT version 4.0. The updated version 5 is used by Windows 2000 and XP and supports additional capabilities such as encrypted files and dynamic disk partitions that can be rearranged while Windows is running. These capabilities aren't directly accessible with XP Home Edition, but Home Edition still uses the newer disk format.

The version difference will only affect you if you share an NTFS-formatted disk volume between Windows NT 4.0 and Windows XP or 2000. The newer OSes will update your NTFS partitions to version 5, so you must update Windows NT 4.0 to Service Pack 4 or later so that it can read the new format.

Application Considerations

Along with all the file system considerations of a multiboot system, application installation problems also can arise unless you install each operating system and its applications in a separate partition. This is particularly true of the Microsoft operating systems because some of them share some of the same fixed directory names (“Program Files” is a notable example). Because of these potential problems, the following list of precautions is particularly useful:

  • It's good practice to isolate operating systems whenever possible to minimize the impact of any catastrophic events such as system crashes, crunched file allocation tables, or applications that run amok. In other words, good disk partitioning is one way to increase protection for all the operating systems you run.

  • Putting different OSes on separate partitions minimizes the chances that applications running on the different platforms will dump on one another's settings in unexpected ways.

  • Many applications install files in the Windows or other common folders, and it's necessary to reinstall these applications under each OS to make sure that all files are copied where necessary. If you can tolerate the trouble, it's best to install the application into a different folder (on a different partition) each time. A common “Program Files” folder shared by multiple OSes brings the chance that OS-specific settings might give you trouble with other OSes.

That last bit of advice is a contentious one. Even your authors disagree. Bob thinks it's usually safe to use a single folder for an application's common files, and saves disk space, while Brian thinks that disk space is cheap, and having to chase down installation conflicts is an expensive waste of time. You may have to decide on a case-by-case basis after some experimentation.

If you find that an application acts erratically when installed into the same folder on several different OSes, reinstall it into a separate directory from each operating system. That is, install it onto the separate OS-specific partitions, or create a special application folders for each operating system (for example, program fileswin98adapp and program fileswinXPadapp, and so on) and install the problem apps there.

The Windows XP Boot Loader

As mentioned earlier in this chapter, one of the great advantages of the approaches we're advocating in this chapter is that we're using the Windows XP boot loader. It gives you a menuing system that lets you choose which OS to start every time you boot up your computer. The following sections explain the functioning of the boot loader.

The Master Boot Record

The master boot record (MBR) is the portion of the disk that tells your computer where to find the partition boot sector. All operating systems must be started up by some type of master boot record, whether this contains the system's native code or a multiboot utility. When your system is booted, a chain of events ensues, based on your currently installed operating systems. The following is a simplified version of this chain of events for an installation containing Windows XP:

  1. After POST (power on self test), the system BIOS reads the master boot record (MBR).

  2. Control is passed to the master boot record, which then looks for the partition listed as the “active partition” in the partition table of the startup disk, as defined in your BIOS.

  3. After the active partition is found, the master boot record loads sector 0, the partition's boot sector, into memory and executes it.

  4. The partition boot sector points to NTLDR (NT loader) in the root of the partition and executes that.

  5. NTLDR reads the contents of BOOT.INI, located in the partition's root folder. BOOT.INI lists the locations and names of the computer's bootable operating systems. If more than one OS is listed, NTLDR displays a menu of OS choices. If only one is listed, which is the usual case, NTLDR fires it up directly.

At this point, the user can select the operating system to boot up. Windows 2000 and NT use this same system. In the next few sections, we'll explain how to set up multiple operating systems so that they all end up as choices in BOOT.INI.

Note

The Master Boot Record

If you want to remove the Windows boot loader, see Removing the Windows XP Boot Loader” in the “Troubleshooting” section at the end of this chapter.

The BOOT.INI Settings File

BOOT.INI handles many options for booting your system. For now, you can see your current BOOT.INI by selecting Start, Run and entering C:oot.ini, which opens the BOOT.INI with Notepad.

The BOOT.INI file has two sections.

The [boot loader] Section

This section defines two specific settings:

  • Timeout—This setting defines how long the system will wait until it boots into the default operating system. This value is in seconds. A value of -1 makes the system wait indefinitely until you make a manual selection. A value of 0 makes the system boot immediately into the default operating system.

  • Default—This is the default operating system that will boot up, unless there is user intervention. The value of the Default entry must match the location part of one of the operating systems entries, which are described in the next section.

The [operating systems] Section

This section contains a list of operating systems installed on your computer. You can see the option for Windows XP your BOOT.INI file if you've successfully completed an installation.

Each entry in this section is of the form

location="OS Name" /options

where location specifies the drive and folder on which the operating system is stored, “OS Name” is a text description of the OS, and options is an optional list of operating system load modifiers. For Windows NT, 2000, XP Home Edition and Windows XP Professional, an entry might look like this:

multi(0)disk(0)rdisk(0)partition(1)WINDOWS="Windows XP Professional"

(This strange format is a throwback from the days when Windows NT ran on the Alpha and MIPS processors. The format for Windows XP 64-bit Edition is different, and equally obtuse.) In most setups, the rdisk number indicates the physical hard drive (0 = first), and partition indicates the partition number on the drive (1 = first). The entry is followed by a folder name.

Non–NT-based operating systems are loaded through files that contain images of the master boot record that the OS is usually loaded by. For example, when you install Windows XP on a system that was previously running MS-DOS, the original MS-DOS boot sector is saved in a file, and the resulting BOOT.INI entry is

C:="MS-DOS"

Multiboot Scenarios

The possibilities for multibooting are nearly endless when you consider that a system can have multiple drives, each drive can have multiple partitions, and each partition can have an operating system on it. However, the scenarios discussed next represent the most common and usable configurations. When you understand the scenarios offered here, you should be able to effectively conquer any multiboot setup.

We recommend that you at least read through the first scenario fully, regardless of your own designs. This will give you a better understanding of the overall process. We'll also refer to that scenario so we can reduce repetition. All these configurations assume that you already have a working computer with at least a CD-ROM drive and hard disk.

NOTE

Always be careful to consider file system compatibility between all these operating systems. Use Table 31.1 as a reference before forging ahead with your installations. This will save you many of the common problems associated with setting up a multiboot system.

TIP

All the following scenarios work on the assumption that you are able to boot from your CD-ROM drive. Most modern computers have this capability. A little-known fact is that some of the older operating systems in these examples are capable of booting from their respective CD-ROM installation discs. Windows NT 4.0, 2000, and XP can and will boot from your CD-ROM drive, as will OEM versions of Windows 98 and most modern versions of Linux. This method is much quicker and less error prone than the traditional method of booting from a floppy disk.

Booting from the CD-ROM is usually enabled simply by changing the boot sequence from within your system's BIOS so that it checks the CD for an operating system before checking the hard drive. Consult your computer's operating manual for the proper method to enable this feature for your specific system BIOS. Chapter 3 has more ideas on how to boot from a CD-ROM in case you're having trouble in this department. Look for the troubleshooting tip at the end of the chapter titled “My Existing OS Won't Recognize the CD-ROM Drive.”

Dual-Booting Windows XP Professional and Windows Me/9x

Many people want or need to run Windows XP and Windows Me, 95, or 98 in the same computer. Because Windows 95, 98, and Me behave almost identically in this situation, for the remainder of this section, I'll use 9x to refer to all three of these older versions.

The following sections discuss two ways of dual booting:

  • In the same partition

  • In separate partitions

Putting Windows XP Professional and Windows 9x in the Same Partition

If you already have a Windows 95/98 installation, you can simply install Windows XP beside it for a dual-boot arrangement from the same partition. I don't recommend this setup, however. Because this arrangement will mix Windows XP and Windows 9x programs in one Program Files folder, you could end up with serious software version conflicts:

  • Dual-booting Windows XP and Windows 9x from the same partition is ill advised. In this configuration, for example, both operating systems will use the same Program Files folder, which can result in version conflicts.

  • Be aware, also, that Registry settings for an application on Windows 9x will not follow you into the Registry of Windows XP, and vice versa. You might have to reinstall some applications in order for them to function correctly in both operating systems. In some instances, you might even have to purchase separate Windows 9x- or Windows XP- specific versions of some applications. Finding out which ones you need to do this with is simply a matter of experimenting with each respective operating system.

TIP

Don't worry about the Registries from the two OSes stepping on each other. Windows 9x stores user Registry info in Windows or windowsprofiles, while Windows XP stores user Registry data in Documents and Settings<username>.

Despite this, if it's absolutely necessary, you can follow these steps to install both Windows XP and 9x on the same partition:

  1. Assuming you have successfully installed Windows 9x on your system, begin the Windows XP Professional installation wizard by inserting the CD-ROM.

  2. If the wizard does not autorun, you can initialize it by choosing Start, Run and then typing D:i386winnt32, where D: is the letter of your CD-ROM drive.

  3. After Windows Setup has launched, choose New Installation as the Installation Type. This will install Windows XP into a new system folder called WINNT. From here, simply continue the Windows XP installation as usual.

  4. When asked if you want to update your hard drive to use the NTFS format, choose No (leave the partition alone). If you upgraded to NTFS, Windows 9x would not be able to read the disk.

  5. When the Windows XP installation has concluded, you should be able to successfully boot into either Windows XP or Windows 9x via the Windows XP boot menu presented at system startup.

Putting Windows XP Professional and Windows 9x in Separate Partitions

As you have no doubt gathered by now, the preferred approach uses separate partitions. This arrangement is more flexible and foolproof in the long run.

First, you must plan the installation from a file system standpoint. This will give you a better foundation from which to proceed:

  • The Windows 9x partition should be a FAT32 file system with C:WINDOWS (the system directory), along with C:Program Files contained in it.

  • Windows XP will reside on the second partition, containing the Windows XP %SystemRoot% directory (typically D:WINNT), along with D:Program Files. You can format this partition with NTFS or FAT32.

  • You might want to reserve a third and final FAT32 partition solely for sharing data between the two operating systems. You can use drive C for this, too, of course.

NOTE

Wherever I suggest that you might want multiple partitions, remember they don't all need to be placed on the same drive. You can add additional hard drives and install partitions there. The setup procedure remains the same, however. Just select the additional drive when you're choosing a partition to set up, format or install.

If you format the Windows XP partition with NTFS during installation, remember that it will not be visible to Windows 9x. Any FAT16 or FAT32 partitions located after the NTFS partition will still be visible to Win9x. This can have the odd effect of making these extra partitions appear with different drive letters in the different operating systems, as each OS assigns letters to the partitions it recognizes, in order. I'll give you a concrete example of this later in the chapter under “Avoiding Drive Letter Madness.”

Using FDISK to Define Partitions

Chapter 3 covered the fact that Setup will enable you to use unpartitioned free space to create a second partition (either NTFS or not) for installing Windows XP. You also learned about using a third-party program such as PartitionMagic to more flexibly help in that process, especially if you don't have any “free” (meaning unpartitioned) space on your hard disk, which is likely the case. If you already have a free partition or two for installing Windows XP after Windows 9x/Me, you can skip ahead to the section titled “Installing Windows XP Professional into the Second Partition.” If you need to define partitions before starting the Windows XP setup process (for example, to set up versions of Windows 9x or other operating systems), this section will give you an overview of the FDISK partitioning program that comes with DOS and Windows 9x.

CAUTION

Using the FDISK editor is a permanent process. If you have any disk partitions currently defined on your system, be sure to have a backup of all your important data because it might be damaged in this process. Unless you are partitioning your disk for the first time, you might find PartitionMagic more suited to the task of configuring your disk partitions. PartitionMagic also has the added advantage of being able to actually resize your existing partitions for a maximum amount of flexibility. More information on PartitionMagic can be found at

If you need to set up partitions on a new disk, in lieu of using PartitionMagic (for whatever reason), you can opt to use the trusty old Microsoft-supplied FDISK program to do the job. It works okay in a pinch (especially on an unpopulated drive or one you're going to wipe), and a knowledge of FDISK can sometimes come in handy.

The following discussion shows how to start with a blank hard disk, use FDISK to create the partitions, and then install Windows 9x and Windows XP. The following explains how to define partitions for each operating system:

  1. First, boot from the Windows 9x CD-ROM and select the second option, Boot from CD-ROM. If you are booting from a Windows 9x installation floppy, just proceed to step 2.

  2. Select Start Computer with CD-ROM Support.

  3. After finally booting into DOS, run the FDISK program, which will give you the opportunity to partition your disk so that each operating system can occupy a different partition. This is simply done by typing fdisk at the prompt:

    A:>fdisk
    
  4. When FDISK is loaded, you are asked whether to enable large disk support. Select Yes, which enables you to later format the disk with the FAT32 file system. (If you selected No here, you would only be able to create a partition of 2048MB or less using the FAT16 file system.)

  5. Next, you will be presented with a menu of options for partitioning your hard disk, as shown in Figure 31.1. For the purposes of this installation, select option 1, Create DOS Partition or Logical DOS Drive. This option enables you to create the first partition for installing Windows 9x.

    The FDISK main menu screen.

    Figure 31.1. The FDISK main menu screen.

  6. Select Create Primary DOS Partition to create a bootable primary partition.

    NOTE

    All Microsoft operating systems must be bootable from the first primary partition on the primary IDE bus. The only exclusion to this is a SCSI-based system, which must be bootable from the first primary partition of the SCSI controller-assigned boot disk. This does not mean the system and other files must be installed here; it only means that the Windows boot information must be installed in the MBR (master boot record) of this partition.

  7. When asked whether you would like to use the maximum available size for this partition, select No. You will need additional space to be left on the disk for the other two partitions that will house the Windows XP system and the shared data partition.

  8. Next you are asked for the size of the first partition. This particular setting will vary depending on the operating systems involved and the amount of disk space available.

    Table 31.2 (immediately following this set of steps) shows the minimum and recommended sizes for each operating system. You can make the partition larger than the recommended size, if you have the space.

    Table 31.2. Recommended Hard Drive Capacity for Each Operating System

    Operating System

    Minimum Size

    Recommended Size

    MS-DOS 6.22

    1 MB

    40MB

    Windows 98

    225MB to 400MB

    2048MB

    Windows NT 4.0

    124MB

    1024MB

    Windows 2000 Professional

    650MB

    2000MB

    Windows XP Home Edition

    1500MB

    2000MB

    Windows XP Professional

    1500MB

    2048MB

    Linux

    135MB to 1.8GB[*]

    2048MB

    [*] Disk space requirement depends on installation options selected. Choosing both the Gnome and KDE desktop environments requires at least 1.8GB. Installing source code pushes the space requirement up quite a bit more.

  9. Use the backspace key to erase the size that FDISK has filled in. Using the information in Table 31.2, enter the desired size for your first primary partition, in MB. For a 2GB partition, enter 2048.

  10. Next, you must define the first partition as being the active partition so that the computer knows from which partition it should try to boot from. Press Esc to return to the main FDISK menu. Select option 2, Set Active Partition, to pick the first partition and set it as active.

    CAUTION

    If more than one primary partition is listed (as might be the case with some Compaq models that use a special diagnostic partition for their BIOS setup program and testing software), make sure you select the partition you just created.

  11. If you want to create the XP and data sharing partitions during the XP install procedure, you can leave the remainder of the disk unpartitioned and skip ahead to step 15.

    Otherwise, you may now create the logical partitions to house your remaining two file systems. This can be done by selecting option 1, Create a DOS Partition or Logical DOS Drive, and then selecting option 2, Create Extended DOS Partition.

  12. FDISK adds all additional FAT partition entries inside what it calls an Extended DOS partition. Therefore, you should allocate enough space for the Extended DOS Partition to hold your Windows XP volume and your shared data volume. If you need no other partitions, you can allocate all remaining space to the Extended Partition. Select a size, press Enter, and then Esc.

  13. FDISK will prompt you for the size of the first FAT partition to create inside the extended partition—FDISK calls this a Logical DOS Drive. Select a size in MB for the Windows XP partition, and then press Enter and Esc.

  14. FDISK will prompt you for the size of the next Logical DOS Drive. Allocate the remaining space to your data drive and press Enter.

  15. Press Esc to exit FDISK. Finally, press Ctrl+Alt+Delete to restart the computer.

NOTE

Microsoft and others' discussions of disk space requirements in particular and hard disk storage in general are often confusing because MB (Megabyte) and GB (Gigabyte) have two different meanings. Hard drives and similar storage devices are normally rated in decimal MB, in which 1MB equals one million bytes, and decimal GB, in which 1GB equals one billion bytes. However, disk utilities such as FDISK and most system BIOSes rate drives in binary MB/GB; a binary MB is 1,024x1,024 (the value of a kilobyte times a kilobyte), for a total of 1,048,576 bytes, and a binary GB is 1024x1024x1024, for a total of 1,073,741,824 bytes. Thus, there are substantial differences in the size of decimal versus binary MB/GB. Recently, the term Mebibyte (Mi) has been developed to refer to binary MB and Gibibyte (Gi) to binary GB, but this usage is not yet widespread.

Installing Windows 9x into the First Partition

After you've defined at least two partitions, you are ready to install Windows 9x into the first one. After that we'll install Windows XP in the second one.

  1. If you are installing Windows 9x (and you have a bootable version of the installation CD) you can install it by booting from its installation CD-ROM. Select Start Windows 9x Setup from CD-ROM.

    NOTE

    If you're having trouble accessing the CD-ROM drive, check the BIOS settings, or as a good little trick, many systems will boot up from a Windows 9x emergency startup disk with CD-ROM support (even one made on another machine). You can boot into DOS this way, with CD-ROM drivers loaded. Then run the Setup program located on the CD.

  2. When you're in the Windows 9x installation program, you will be given the option to format drive C: and continue with the installation. Setup may also require that you format partition D:. It's okay to do this.

  3. Continue with the Windows 9x installation, making sure that Windows is placed in the WINDOWS folder on the C: partition by accepting the default.

CAUTION

If you've been booting from your CD-ROM installation disc, be sure to change the boot sequence in your BIOS so that your hard disk boots before your CD-ROM. This is essential for a successful installation.

TIP

Windows 9x is installed first for a very important reason. Windows 9x will always write its own master boot record to make the system boot into it after an installation. You'll want to make sure that Windows XP has the last say in what gets installed at the master boot level so that you can take advantage of its versatile boot loader.

Installing Windows XP Professional into the Second Partition

Continue your multiboot pursuit with the installation of Windows XP. Per Microsoft's recommendations, you should run the Windows XP installation program from within Windows 9x.

  1. Insert the Windows XP disc. The Windows XP Installer should auto-run. If it doesn't, select Start, Run, and type D:SETUP, where D: is your CD-ROM drive letter.

  2. Select Install Windows XP. When asked what type of installation you want to perform, select New Installation (Advanced) and click Next, as shown in Figure 31.2.

    Choose New Installation here to install XP into a separate partition.

    Figure 31.2. Choose New Installation here to install XP into a separate partition.

  3. Proceed through the License Agreement and Product Key pages to the Setup Options page. Click Advanced Options and check I Want to Choose the Install Drive Letter and Partition During Setup. This gives you the opportunity to select the D: partition as well as convert it to the NTFS file system later on in the setup. Click OK, and then Next.

  4. After the Windows Setup Wizard copies some files to your hard disk, it will reboot your system and continue the installation from a text-based setup. From this setup, you will have the option to select where you'd like to install your Windows XP system, as shown in Figure 31.3. If you didn't create the XP and data partitions earlier, you can use this menu to create new partitions by pressing C. Finally, select the second partition as the Windows XP install procedure and press Enter.

    Selecting the location of the WINDOWS install directory from within the text-mode Windows XP Setup. Windows 2000 and NT Setup offer a similar choice.

    Figure 31.3. Selecting the location of the WINDOWS install directory from within the text-mode Windows XP Setup. Windows 2000 and NT Setup offer a similar choice.

  5. Next, you will be given the option to select the type of file system to use. You can keep your already formatted partition intact, select a new file system format, as shown in Figure 31.4.

    Here, you can choose to leave the original file system intact, or select a different file system for the Windows XP partition.

    Figure 31.4. Here, you can choose to leave the original file system intact, or select a different file system for the Windows XP partition.

    The “Quick” versions of these choices do not test the drive as it formats. Testing takes some time but it's worthwhile, so I recommend that you not use the Quick format options.

    TIP

    Remember, you can convert a FAT partition to NTFS at any later time using a Windows command-line utility. Windows can't convert NTFS back to FAT, however. Also, remember that Windows 9x can't read NTFS partitions. If in doubt, use FAT for now.

  6. After making your choice, Setup will proceed to do its thing and install Windows XP. During setup, there will be one or two restarts and you'll see the multiboot menu. Ignore it and let the default “Windows XP Setup” choice start up. This choice will be removed when Setup has completed successfully.

  7. When you subsequently restart your computer, you should see the options shown in Figure 31.5.

    The final result—The Windows XP boot loader now shows both operating systems at boot time.

    Figure 31.5. The final result—The Windows XP boot loader now shows both operating systems at boot time.

Formatting the Data-Sharing Partition

On some of our machines, we're quite content with two partitions only, with data placed either on the Windows 9x partition if it is nonsensitive, or on the Windows XP NTFS partition (and optionally in an encrypted folder) if it is sensitive. However, I recommend using a third partition to give you a place to store files that you want to keep whilst installing and uninstalling operating systems on the other two. I used such a partition while writing this book to hold my screen-capture program and notes; the main OS partitions needed to be erased and reinstalled dozens of times.

If you did create an extra data partition as I described in the previous section, the final installation step is to format this remaining partition. This can be done by using the Windows XP Disk Administration program, or the FORMAT command from a Command Prompt window in either OS.

Note

See Chapter 29, “Managing the Hard Disk,” for more about formatting partitions with Disk Management.

Avoiding Drive Letter Madness

As I mentioned earlier, when you use file formats that are not compatible among all the operating systems you're using, logical drive letters will likely shift around based on which operating system you're booting.

The reason for this is that on bootup, Windows scans your disk controllers in the following order looking for fixed or removable hard disks:

  1. Primary IDE Controller, Master Drive

  2. Primary IDE Controller, Slave Drive

  3. Secondary IDE Controller, Master Drive

  4. Secondary IDE Controller, Slave Drive

  5. SCSI Controllers, in SCSI ID order

  6. Additional controllers (such as USB, IEEE-1394 drives)

(If your computer boots from a SCSI drive, the SCSI drives are scanned first.) Only the compatible partitions on these drives are scanned, and they're assigned drive letters in the order in which they're found. Windows 9x will skip over NTFS partitions, and will thus assign different drive letters to any subsequent FAT partitions than Windows XP, 2000, or NT will.

For example, if I had one hard drive with three partitions, defined as follows:

  1. FAT32, Windows 98 Boot partition

  2. NTFS, Windows XP Boot partition

  3. FAT32, Data only

and a CD-ROM drive, Windows 98 and Windows XP will assign the default drive letters shown in Table 31.3.

Table 31.3. Logical Drive Letter Assignments

Drive

Partition

Drive Letter assigned by Windows 98

Drive Letter assigned by Windows XP

Hard Drive

#1, FAT32

C:

C:

 

#2, NTFS

(none)

D:

 

#3, FAT32

D:

E:

CDROM

CDFS

E:

F:

Notice that under Windows 98 the data partition is D:, whereas under Windows XP it is E:. This is not a problem if you store only data on the drive. However, it becomes more complicated if your applications expect to find support files on a given drive under any OS.

You might have already thought about using Windows XP Disk Management to reassign the drive letters while Windows XP is running. Although it is true that Disk Management can set drive letters in any way you please, you can't change the boot drive's letter. In our example, this means that we can't reverse the D and E drives letters to match Windows 98. However, there is another way. Retail copies of PartitionMagic include a program called DriveMapper that can remap the drive letters under Windows 98. You can run PartitionMagic in Windows 98, use the DriveMapper option, and reassign the data drive to E:, skipping D: altogether when you're running Windows 98. Then make your CD-ROM drive F:. Now, you can have the same logical drive assignment in both operating systems.

CAUTION

If possible, reassign letters before you install applications; otherwise, Registry settings, shortcuts, and support files can point to the wrong drive. Consult the PartitionMagic user's guide or Help file for more about considerations when reassigning drive letters.

Windows XP and MS-DOS

Hard as it is to believe, there are times when it makes sense to run plain old MS-DOS. Games are usually not the reason—most games that were designed back in the DOS days aren't able to cope with the blazing speed of today's processors. However, some people still have a need to use specialized hardware that works only under DOS, such as industrial control and hardware programming systems. The software for these devices often won't work when run from an XP Command Prompt window, because Windows won't give it the direct access to hardware that it needs. So, for occasional use, you may want to run MS-DOS to perform specialized tasks.

NOTE

In this section, I'm going to talk about ways to boot your computer under DOS, so that Windows isn't running at all. You might be able to run your MS-DOS program in an emulator, that is, a program that mimics a PC running DOS. This may let you run games and old DOS software without going to the trouble of booting up DOS itself, but probably won't help you with old hardware issues, unless you can extend the emulator, (The open-source DOSBOX emulator could be a candidate for extension.) For a discussion of emulators, see the end of this chapter.

If your computer is set up to multi-boot to Windows 95 or 98, it's easy to get to plain MS-DOS. You can press F8 while one of these versions is booting and select the “Command Prompt” mode. Alternately, with Windows 95 or 98 running, you can click Start, Shutdown, Exit to MS-DOS.

If Windows 95 or 98 aren't available, you'll have to install a version of DOS on your computer. The procedure you'll need to follow depends on what version of DOS you want to install. If you have a boot diskette from a version of Windows 95 or 98, its version of DOS supports FAT32 partitions. In this case, you can install it on a new partition or on an existing FAT32 partition, even if it's the partition from which XP boots. Use either of the two procedures that follow this section.

NOTE

You must install DOS in a partition on the first physical drive (Drive 0) in your system. It must be installed in a Primary (not logical) partition.

If you have only DOS 5 through 6.22, you'll need to install it on a FAT16 partition, because these older DOS versions can't read the FAT32 format. It's best if this is a small partition set up expressly for this purpose. You can't install Windows XP on a FAT16 partition. Other OSes will be able to see this partition, and copy files to and from it, so the partition only needs to be big enough to hold DOS, the DOS applications you need, and the data files. 40MB is probably enough, although your application may need more, and remember that DOS can't handle partitions larger than 2048MB. Use only the first of the two installation procedures that follow this section.

CAUTION

Windows XP can't format a FAT16 partition. To format the partition you'll need to use the FORMAT program that comes with DOS. If you create the partition with the DOS FDISK program, be very careful not to delete any existing partitions. In particular, if you've already installed XP, be extremely careful if you use MS-DOS Setup diskettes to install DOS. The Setup program will overwrite the partition information for the first drive it finds, and could blow your Windows XP partition out of the water. Your best bet is to use the setup program's Install to Floppy Disk option, and then copy the program and system files to the hard drive later.

Create a bootable DOS disk partition by following one of the two following procedures. The procedure depends on whether the partition is the one from which Windows boots or not.

Installing MS-DOS on a Non-Boot Partition

To set up a FAT16 partition (for any version of DOS) or a FAT32 partition (for the Win95/98 versions of DOS) that no other operating system boots from, follow this procedure:

  1. Shut down Windows, and boot up from a bootable DOS floppy disk.

  2. Find out what drive letters are available, from C: on up, by typing dir c:, dir d: and so on. If you're installing into a brand new partition, the response you're looking for is “Invalid media type reading drive X”; that's your new, unformatted partition. If you're installing DOS onto an existing formatted partition, check the drives' contents to determine which drives they correspond to in Windows, and determine which is the one to use for the DOS installation. It should not be the boot drive for any other operating system.

    If no hard drive letters are defined, you will need to use FDISK to allocate a partition. This procedure is beyond the scope of this book. Be very careful not to delete your XP partition. After creating the partition, reboot and repeat this step.

    NOTE

    Remember, the DOS boot partition must be on the first physical drive—drive 0—in your computer.

  3. To format and install the DOS boot files on a brand new partition, type the command FORMAT X: /S where X is the drive letter you chose to use for DOS. To install the DOS boot files on an existing formatted partition, just type the command SYS X:

  4. Copy all of the files from the DOS floppy to X:DOS

  5. Reboot Windows and log on as a Computer Administrator.

  6. Determine the drive letter onto which the DOS files were installed. This might not be the same drive letter as under MS-DOS, because DOS couldn't see your FAT32 and NTFS partitions.

  7. Use Notepad to type the following text into a new file:

    L 100 n 0 1
    N C:BOOTSECT.DOS
    R BX
    0
    R CX
    200
    W
    Q
    

    except, in the first line, instead of n type the number corresponding to the drive letter that you found for the DOS partition. Use 2 for C:, 3 for D:, and so on. For example, if the DOS partition is D:, the line should be “L 100 3 0 1”. (The number is entered in hexadecimal, so drive J: is 9, K: is 0A, L: is 0B, and so on.)

  8. Save the file with the name bootblock.txt. Then, start an NT command prompt window, change directories to the location of this text file, and type the command

    debug <bootblock.txt
    
  9. Right-click My Computer, select Properties, and select the Advanced tab. Under Startup and Recovery click Settings, and click Edit.

  10. Add this line to the end of boot.ini:

    C:BOOTSECT.DOS=MS-DOS
    
  11. Save boot.ini. Set Time to Display List of Operating Systems to a reasonable number like 10.

You should now be able to restart your computer and select MS-DOS. Once it's running, set up an autoexec.bat file and a config.sys file. The config.sys file should have at least the following:

device=X:DOShimem.sys

device=X:DOSemm386.exe

files=99

with additional commands to load a CD-ROM device driver, if necessary.

Autoexec.bat should have at least

@echo off

path X:DOS

prompt $p$g

smartdrv

with additional commands to load a mouse driver, and the CD-ROM extensions mscdex.exe, if needed.

Installing MS-DOS on the Windows XP Boot Partition

If your only option is to install MS-DOS on a FAT32 partition from which Windows XP boots, be sure you have a Windows XP installation CD and that you can successfully boot from it. You must use the DOS version from Windows 95 OSR2 or 98. Follow these steps:

  1. Perform steps 1 through 4 in the procedure in the previous section. In this case, though, you'll be copying DOS to the partition from which Windows boots. The sys command will overwrite the Windows Master Boot record (and the boot manager) with the MS-DOS boot program.

  2. Reboot your computer from the Windows XP Setup CD-ROM.

  3. Select the Repair option, and then the Manual repair option. You want only to perform the Verify Boot Files step; there is no need to have the repair process inspect other files or the Windows boot environment. This will reinstall the Windows XP boot manager.

  4. Reboot Windows and log on as a Computer Administrator.

  5. Perform steps 9 through the end of the procedure in the previous section.

Windows XP Home Edition and Windows XP Professional

Installing both the Home Edition and Professional version of Windows XP on the same system is popular for many people who need to test applications in both environments.

Because both operating systems use the same boot loader and compatible file systems, installation and setup are simple. However, you must ensure that the two versions are installed onto different partitions or hard drives.

To set up dual-booting of Windows XP Home Edition and XP Professional, simply install them both one after the other, taking care to select the Advanced Options button on the Special Options page during setup. Check I Want to Choose The tnstall Drive Letter and Partition During Setup, and then click OK. This will let you select the partition on which each version gets installed.

Windows XP Professional and Windows 2000 or NT

Installing both Windows XP and earlier NT versions on the same system is also something you might want to do. This configuration is popular for many people already running Windows NT 4.0 who want to try Windows XP before completely canning their previous installation. This is a worthwhile pursuit and can be obtained with a little care and planning.

If you already have Windows NT 4.0 installed, you are probably using either the FAT16 file system or NTFS. Looking at Table 31.1, you can see that Windows XP supports both of the file systems supported by Windows NT 4.0. When installing Windows XP Professional, you simply select a new installation, as opposed to an upgrade, and the installer will handle the rest. As with the previous configuration, Windows XP will save your Windows NT 4.0 installation and give you the choice of selecting it at boot time.

This setup also can suffer from the same sort of problems as the Windows 98/Windows XP configuration. You must be careful to not overlap your new and old installation directories. And although you can have them coexist on the same partition, you'd be installing files from two different versions of Windows into the same “Program Files” folder. It's much more prudent to have them occupy separate partitions or drives.

CAUTION

Windows XP uses an updated version of the NTFS file system: NTFS5. Before installing Windows XP, you must be sure that you've first updated your installed version of Windows NT 4.0 with service pack 4 or greater. This will ensure that your NT 4.0 installation will be capable of reading your NTFS disk after adding Windows XP to your system. Service pack 6a is the current (and final) version.

Even with the service pack, however, NT Version 4 won't be able to read XP's encrypted or compressed files.

If you want to test or use Windows XP's advanced file system features, or if the NTFS version issue worries you, you can use this setup on a dual Windows XP/Windows NT installation.

Partition 1

Windows NT, NTFS version 4

Partition 2

Windows XP, NFTS version 5

Partition 3

Shared files, FAT16

Because Windows NT can't read FAT32 disks, you have to use a FAT16 partition as a shared file volume.

To dual-boot NT and XP, do the following:

  1. Install Windows NT 4.0. Chances are good that you already have it installed, in which case this portion of the job is already complete.

  2. You're going to want to have another partition to house Windows XP. Unless you have free, unpartitioned space available, you'll need to install an additional disk drive, or use PartitionMagic to insert a new partition on an existing drive. If you do have unpartitioned space, you can install Windows XP directly into that. You can leave the new partition unformatted.

  3. Boot up Windows NT, insert the Windows XP setup disc, and choose Install Windows XP from the menu. (If the menu doesn't start automatically, look on the CD's root directory for Setup.exe and run it.)

  4. Choose New Installation from the wizard's first page; otherwise, you'll wipe out Windows NT 4.0.

  5. Accept the agreement, enter the serial number, and follow the wizard.

  6. From the Select Special Options page of the Windows XP Setup Wizard, select the Advanced Options button. Check I Want to Choose the Install Drive Letter and Partition During Setup, and then click OK.

  7. After the Windows Setup Wizard copies some files to your hard disk, it will reboot your system and continue the installation from a text-based setup. From this setup, you will have the option to select where you'd like to install Windows XP. Choose the partition you created in step 2, or choose any unformatted free space (if you have any).

  8. Next, you will be given the option to select how you want the target partition formatted. Select Format as NTFS or Convert to NTFS.

  9. The Setup process will continue normally. When it's finished, you'll be able to choose either Windows NT 4.0 or Windows XP when your computer boots up.

TIP

See the earlier section titled “Formatting the Data-Sharing Partition” for some thoughts about creating a third partition to store data that can be shared between the two operating systems.

Windows XP, Windows NT 4.0, and Windows 9x/Me

Although it might be uncommon, it is possible to create a setup using all three of these operating systems. Take the following approach:

  1. Create three partitions (or four if you want a separate data partition). You can create these partitions on one or two hard drives.

  2. If you decide you want a data partition, make it FAT16 because NT 4.0 can't see FAT32. FAT16 is the one common denominator. See Table 31.4 for a suggested layout. As you can see from the table, we're suggesting using FAT16 for all the partitions to ensure maximum compatibility and the least amount of drive letter shifting.

    Table 31.4. Booting Windows XP, NT 4.0, and Windows 9x

    Partition #

    Operating System

    Format

    Notes

    Partition 1

    Windows 95 OSR2 Windows 98 or Windows Me

    FAT16

    Can use FAT32 if you don't mind this partition not being seen by NT 4.0.

    Partition 2

    Optional Data Partition

    FAT16

    We've put it second so its drive letter says the same under all 3 OSes.

    Partition 3

    Windows NT 4.0 SP4 or later

    FAT16

    Can use NTFS if you are aware of the consequences.

    Partition 4

    Windows XP

    NTFS

     
  3. Install Windows 9x/Me in the first partition. If asked whether you want to upgrade to FAT32, say no unless you don't mind having the first partition invisible to Windows NT 4.0.

  4. Install Windows NT in the third partition and upgrade it to at least Service Pack 4. This system will dual-boot. Check it to see that it works acceptably.

  5. Install Windows XP in New Installation mode, into the last partition. This should add the third operating system to the boot loader.

  6. Format the data partition however you like. Remember that for maximum compatibility between all three operating systems, you'll want to use FAT16.

When you're finished, the Windows XP boot loader will give you the option of booting into each of the three operating systems. Remember to heed the cautions explained earlier in this chapter regarding sharing data and applications between operating systems.

NOTE

You can't multiboot more than one version of Windows 95, 98, and Me even if they're on different partitions. The only way to have more than one Windows 9x on a single machine is with a third-party boot manager such as BootMagic or System Commander. (See the section “Tips from the Windows Pros: Living with More Than One OS,” at the end of this chapter.)

Windows XP and Linux

Using both Windows XP and Linux on the same system is a very rewarding multiboot scenario. This gives you two very powerful operating systems that can work in harmony on the same system. Linux can be booted from any type of partition on any installed disk, be it primary or logical. This enables you to create a Linux partition anywhere you have enough space to put it.

One of the great advantages of this configuration is Linux's capability to read, and sometimes write, nearly every file system under the sun. You'll be able to share files between your two systems with a minimal amount of hassle. Be sure to see Table 31.1 (earlier in this chapter) to properly plan for file sharing between both operating systems.

NOTE

Linux can read NTFS partitions quite well. But with the current level of NTFS support, when Linux writes to an NTFS partition, it causes some repairable damage to the file system that Windows XP has to fix the next time it boots. This makes me nervous, so I'd suggest that you avoid the need to have Linux write to an NTFS disk. Install Windows XP in a FAT32 partition, or use a third FAT16 or FAT32 partition to store common files.

LILO, the Linux Loader

Just as Windows XP uses the Windows loader to select an operating system and boot up, Linux uses a boot loader as well. Linux users have several to choose from: LILO—the LInux LOader, GNU GRUB, SYSLINUX, and LOADLIN. This chapter discusses just LILO.

However, configuring LILO is beyond the scope of this book. I'll only discuss a multibooting setup that uses the Windows loader, so if you're following these instructions it's important that whatever process you use to set up your system, you end up with the Windows loader on your primary disk's Master Boot Record, rather than LILO.

There are two ways to make sure this happens:

  • If you install Linux first, and then Windows XP, the XP loader will replace LILO. Then you can use the procedure described later in this section to create a Linux boot file for the Windows loader.

  • If you install XP first, then Linux, you'll have to take care to tell the Linux installation system not put LILO on your computer's Master Boot Record (MBR). If it does, the XP loader will be overwritten. How you specify this differs from one Linux distribution to another, and may even differ between versions of the same distribution. In the instructions later in this section, I'll describe how to do this for Red Hat Linux version 7.1, but the procedure may be different for your copy of Linux. If the XP boot loader does get overwritten, you'll find out quickly: You won't get a boot choice menu. You'll have to follow the procedure under “Boot Menu Isn't Displayed” in the Troubleshooting section at the end of this chapter.

Clearly, it easiest and safest if you can install Linux first. If you can't, please read your Linux distribution's installation instructions carefully, and select an installation mode that does not automatically put LILO on the Master Boot Record. The scenario we discuss in the next section assumes that you've already installed Windows XP before installing Linux.

Note

LILO, the Linux Loader

Installing Linux

This section deals with the task of installing Linux in a multiboot situation with Windows XP. Although a complete tutorial on the installation of Linux is out of the scope of this chapter, we will try to cover the essential points needed to make your system multibootable.

The procedures in this chapter assume that you are using Red Hat Linux version 7.1, but they should be similar for more recent versions and for other Linux distributions. For the purposes of this example, you will be installing Linux onto a separate partition on the same disk as your Windows XP installation. Refer to Table 31.2 to be sure you have enough free space to install both Windows XP and Linux.

TIP

If you do not have enough space in your hard drive, consider adding a second disk or using the PartitionMagic program to shrink an existing partition.

NOTE

Although the following information provides the basics for dual-booting Windows XP with Linux, you'll find much more detailed coverage in The Multi-Boot Configuration Handbook, published by Que. You should also search the Web for information about multibooting your particular version of Linux.

You can install Linux and Windows XP in either order. Just be sure to read the previous section titled “LILO, the Linux Loader.” If you want to use NTFS for Windows XP, be sure to leave additional room for a FAT32 partition on which to store files you want to share between the two operating systems. Refer to Table 31.2 to find the minimum amounts of space needed. If you can, allow 3 or more GB for each partition.

Then, follow your Linux version's installation procedure. When asked to choose a boot loader, select LILO, and enable the option to create a Boot Disk (floppy).

Write down the name of the partition that contains LILO. It will be named something similar to /dev/hda1. You'll need to know this later when I discuss locating the Linux boot sector.

Getting the Linux Boot Sector

After you install Linux, you'll need to create an image or file dump of the Linux boot sector. You need this to configure the Windows XP boot loader to boot into Linux. Here's how to get it:

  1. Get a blank, formatted 1.44MB floppy disk.

  2. Shut down and reboot your computer with the Linux boot disk discussed in the previous section.

  3. When Linux has finished booting, log in as root using the password you supplied during installation. All the following steps must be performed as root.

  4. Remove the boot disk, insert the formatted MS-DOS floppy into your disk drive and type the following command:

    mount -t msdos /dev/fd0 /mnt/floppy
    

    This will make the disk available to you by mounting it in the directory /mnt/floppy.

    TIP

    If you need to format the floppy from within Linux, you may do so by typing the following command from the prompt:

    fdformat /dev/fd0; /sbin/mkfs -t msdos
    

    This command will give you a freshly formatted MS-DOS disk in Linux. From there you can simply mount the disk to get access to it.

  5. The next step is to write the Linux boot sector to the disk. The most important part of this step is to make sure you take the boot sector from the correct partition. This partition is the one that was installed in LILO during the Linux installation. If you're unsure which partition contains the Linux boot sector, issue the following command:

    more /etc/lilo.conf
    

    which will give you output similar to the following:

    boot=/dev/hda1
    map=/boot/map
    install=/boot/boot.b
    prompt
    timeout=50
    image=/boot/vmlinuz-2.4.2-2
        label=linux
        root=/dev/hda1
        read-only
    
  6. The “boot=” entry at the top of the file tells us that LILO is installed in /dev/hda1. Using the dd program, issue the following command:

    /bin/dd if=/dev/hda1 of=/mnt/floppy/bootsect.lnx bs=512 count=1
    

    This command will copy the Linux boot sector at /dev/hda1 to a file called bootsect.lnx on your disk.

  7. Next, unmount the floppy disk using the following command:

    umount /dev/fd0
    
  8. Finally, remove the floppy disk from your computer and reboot the system:

    /sbin/reboot
    

    If you haven't already installed Windows XP, do this now. If you created an extra partition to use for shared file storage, you can create and it now as well.

Adding Linux to the Windows XP Boot Loader

After both Linux and Windows XP are both installed, you can add Linux to the Windows XP boot loader from any version of Windows you have installed. The steps are exactly the same and are not operating system-dependent.

  1. First, boot up Windows. Copy the bootsect.lnx file, which you created in the previous section, from your floppy disk to the root of your C: drive. This can be done from a command prompt or from the Windows Explorer. This file must be located in the root folder.

  2. Modify the BOOT.INI file to add an entry for Linux. The easiest way is to open the System control panel applet, view the Advanced tab, select Settings under Startup and Recovery, and click Edit.

  3. Next, add the following line at the end of the BOOT.INI file:

    C:ootsect.lnx="Red Hat Linux Version xxx"
    

    but, of course, substituting the appropriate Linux distribution name and version number.

  4. You can now save BOOT.INI, reboot, and select the Linux option from the boot menu. It's a long and complex procedure, but that's one of the reasons we love Linux!

Mounting Windows Disks Within Linux

Next, you'll want Linux to mount your Windows disks so that you can share files between both operating systems. This will enable you to copy files back and forth without using external media such as floppy disks. All the following steps must be performed as root because they are system-sensitive procedures:

  1. First, create the directories within which you will mount the Windows file systems. The normal Linux convention is to create these directories in the /mnt tree.

  2. Issue commands to create the directories for your Windows FAT16 or FAT32 partitions:

    mkdir /mnt/windisk1
    mkdir /mnt/windisk2
    (etc).
    

    NOTE

    These directory names are a matter of taste. You can use whatever name you feel comfortable with at this point. As long as these directories exist, your Windows partitions should mount easily.

  3. To test the first mount point, attempt to mount the first FAT32 partition using this command:

    mnt -t vfat /dev/hda1 /mnt/windisk1
    
  4. You can examine the contents of this partition by simply executing

    ls /mnt/windisk1
    
  5. If the mount was successful, you will see a familiar list of files and directories found on your first Windows partition.

  6. Likewise, you can mount an NTFS partition with the following command:

    mount -t ntfs /dev/hda2 /mnt/windisk2
    

    using the correct hard drive number, of course.

NOTE

By default, the NTFS file system driver is not enabled most versions of Linux. You must consult your documentation to enable this driver; that is, to have it built into the kernel or loaded at boot time. As stated previously, if you use this driver, it is recommended that you use the read-only version.

Enabling these file systems to automatically mount in Linux involves a procedure that is out of the scope of this discussion. Although it is possible, only experienced Linux users should attempt to modify the system's boot time mount parameters. Typically, the changes needed to auto-mount foreign file systems are made in /etc/fstab. Red Hat Linux includes a GUI utility, called linuxconf, that makes this task much more simple. Consult the documentation that came with your Linux distribution.

The Virtual Machine Approach

If you need access to multiple operating systems primarily for testing purposes, rather than for long periods of work, there's a way to enjoy the use of multiple operating systems without any of the hassle of multiboot setups. In fact, you can even use multiple operating systems simultaneously on the same computer. It's done with a setup called a virtual machine. It's an old concept—IBM has used it on its mainframes since the 1970s—making a big comeback thanks to today's fast processors and huge hard disks.

A virtual machine program emulates (simulates) in software all of the hardware functions of a PC. It lets an entire operating system (called a guest operating system) run as an ordinary application program on a host operating system like Windows XP. Since all of the hardware functions are emulated, the guest OS doesn't “know” it's not in complete control of a computer. When it attempts to physically access a hard disk, display card, network adapter or serial port, the virtual machine program calls upon the host operating system to actually carry out the operation.

Even though the software may need to execute several hundred instructions to emulate one hardware operation, the speed penalty is only 5 to 10 percent. And if a guest OS crashes, it doesn't take down your system. You can simply click a Reset menu choice and “reboot” the virtual machine. Check out Figure 31.6, where I have DOS, Linux, and Windows Me running in separate virtual machines.

Virtual PC running Windows Me, Linux, and DOS on three virtual machines.

Figure 31.6. Virtual PC running Windows Me, Linux, and DOS on three virtual machines.

Another advantage of the virtual machine programs currently on the market is that they don't allow the guest OS unfettered access to your real disk drives. Instead, you create a virtual disk, a single large file on your host operating system that contains the contents of what the virtual machine sees as a hard drive. With today's large hard drives, it's no big deal to create a 1 or 2GB file to serve as a virtual hard drive to host Windows 95, and another for Windows NT, and another for Linux…you get the picture.

If you make a backup copy of the file after installing a guest operating system on one of these virtual disk drives, you can return the guest OS to its original, pristine state just by copying the backup over the virtual disk file. You can even boot up a guest OS, start a bunch of applications, and save the virtual machine in this exact state. When you want to use it again, you can just fire up the whole system starting right from this point. If you're a tester or experimenter, a virtual computer can save you hours of time installing, reinstalling, and rebooting.

Of course, you still need separate licenses for all of the extra operating systems you install, but the virtual machine can let you run as many OSes and as many configurations of these OSes as you like, separately or simultaneously. And all of this comes without the need to hassle with BOOT.INI or worry about partitions.

NOTE

Have you wondered how operating system book authors get screen pictures of the bootup and installation process? In the old days, we had to use film cameras or video recorders. Now, we just use virtual PC programs, and use screen capture software to get images off of the desktop. It's a walk in the proverbial park.

If this sounds interesting, there are two products you should check into:

  • VMWare, sold by VMWare. Check out www.vmware.com. VMWare was the first commercial system to emulate a PC on a PC. (Previous PC emulators ran on other computing platforms.) It's the most “industrial-strength” PC emulator available.

  • Microsoft Virtual PC. Microsoft bought this program from Connectix Corporation. There are versions for Windows and for the Mac. Check out www.microsoft.com/virtualpc. The Windows version comes for free as part of some Microsoft Developers Network subscriptions. Unfortunately, Microsoft has, shall we say, degraded Virtual PC somewhat. The original developers are still involved with and proud of the product, and directly communicate with users via the microsoft.public.virtualpc newsgroup, but I think that marketing decisions have negatively impacted the product. In my experience, it's now slower, buggier, and it doesn't support alternative operating systems like Linux as well as it used to (no big surprise there). Still, it works well enough, and I use it frequently.

Both vendors have trial versions that you can download and test before buying. Both also support networking, device and file sharing, and cut-and-paste capability between the host OS and several selected guest OSes.

Finally, if DOS compatibility is all you're after, and the MS-DOS subsystem built into Windows XP doesn't do an adequate job for you, check out DOSBOX, a free, open-source program available at dosbox.sourceforge.net. It's another “work-in-progress” program developed by a group of volunteers. DOSBOX lets you install a copy of DOS and run old games and DOS programs in an emulated environment. Since the source code for DOSBOX is freely available, there's even the potential to add support for specialized hardware devices so that old DOS programs could continue to use them, or use their modern replacements.

Macintosh and Windows

A few years ago there were several cross-platform emulation systems that let you run Windows on a Macintosh computer, and several that let you run the Mac OS on Windows. The pickings have gotten pretty slim in both categories, but there are still some options.

First, Microsoft Virtual PC for Macintosh lets you run Intel-based operating systems on the Mac, pretty credibly. That means your Mac can run MS-DOS, Windows XP, and Linux. Since Mac OS X makes it a snap to copy files to Windows-formatted floppies and to share files over a Windows network, you don't need an emulator just for file transfer anymore. But, an emulator can be a workable alternative to having two computers on your desk or giving up your Mac (just because your company requires you to use some stinkin' Windows applications).

In the other direction, emulation of Macs on Windows machines is much less workable, and Apple has put great effort in making it difficult or impossible, in order to protect their market from knock-offs. For one thing, Macs have a large chunk of the operating system in read-only-memory (ROM) chips inside each of their computers, and it's illegal to distribute this code.

One solution to this problem is to develop a from-scratch replacement for the licensed ROM code. This is the approach used by Executor, a Mac emulator produced by ARDI.

Executor is a virtual Macintosh machine program for reading and writing Macintosh formatted media and running Macintosh programs.

Executor runs as a native Windows application, either in full-screen mode or in a window (see Figure 31.7). You can print from Executor to any printer that your system can talk to (local printers, remote printers, faxes if you have the right software, and so on). You can cut and paste text and graphics between Executor and other applications. You can create shortcuts for a Macintosh application so that Executor will start up and run that application.

Executor runs many Mac programs on the PC under Windows 9x, NT, 2000, and XP.

Figure 31.7. Executor runs many Mac programs on the PC under Windows 9x, NT, 2000, and XP.

Unfortunately, Executor will not support applications that are “PowerPC-only,” which is an increasing proportion. Additionally, although ARDI supports most core operating system services, INITs, CDEVs, and services added after System 7.0 are not supported. ARDI has a compatibility database on its Web site at http://www.ardi.com, which you should check if you're interested in running a particular program.

Another Mac emulator is SoftMac, from www.emulators.com/softmac.htm. It too emulates the Motorola 68000 processor series, so it can't run modern PowerPC-only applications, nor any Mac OS version from 8.5 onward. SoftMac achieves better emulation than Executor by relying on the programs in Apple's proprietary ROM chips. If you don't have a working Mac, you can purchase a set of these chips, or pull a set out of a broken Mac. You can also copy the programs out of a functioning Mac, although this is legally dubious procedure.

Finally, you should check out PearPC, a free, open-source Power PC Mac emulator available at pearpc.sourceforce.net. PearPC is a work-in-progress, but it can reportedly run Mac OS X 10.3 (for which you must have a license, of course) with networking support on a Windows host. Be warned: This is not a commercial product, so installation and maintenance are going to be a bit on the hairy side. However, it has an enthusiastic community of users and developers, and it's constantly being improved and extended.

Emulating Other Computers

While emulation of today's Apple Macintosh computers is a shaky business at best, emulation of machines that are no longer manufactured or are no longer commercially viable is a bustling arena. Why? One word: Games. Well, actually there are two reasons: games, and historical interest.

Games are an obvious reason to emulate older computers. Many people have fond memories of computer games that ran on their old Ataris, Amigas, Apple IIs, game consoles, and other fun old machines. Today's powerful computers have no problem simulating the hardware and software behavior of these old boxes. Emulator programs such as Bochs, MAME, and others re-create the early days of PCs and video games. The software for these old machines often took less disk space than one graphics-intensive email does today. So, it's no problem having the software for hundreds of games, including old operating systems, on your own disk.

The historical arena is also pretty busy. Today, you can download and run operating systems for the famous computers of the early days of computing, and you can experience what it was like to interact with groundbreaking machines such as the Eniac, the IBM-360, the PDP-11, and even the Altair-8800—the first “personal” microcomputer. In fact, I wrote an emulator myself for the IBM 1130, the first computer that I ever got to program. (You just don't know how much to appreciate a Windows workstation unless you've spent some time working with punched cards.)

The operating systems and compilers of many early computers were “open source,” that is, they were publicly available, and can legally be copied. And, many manufacturers have made early operating systems available, either through free licensing options, or as public domain releases. There is also the large grey area of abandonware, ancient software whose manufacturers and copyright holders have completely disappeared.

For some links to interesting emulation Web sites, check out http://directory.google.com/Top/Computers/Emulators, simh.trailing-edge.com, and of course, www.ibm1130.org.

Troubleshooting

Boot Menu Isn't Displayed

Boot Menu Isn't Displayed

When I start up my PC, I don't get a choice of operating systems. Instead, an operating system boots up directly.

What has happened is that an installation program overwrote the normal XP boot loader. (For example, Linux may have installed the Linux Loader LILO. The MS-DOS sys command can also do this.) To restore the Windows loader, boot your computer from your Windows XP installation CD and follow the instructions to repair a damaged Windows XP installation. The only repair options you need to select at this point are the options to repair the startup environment and the boot sector. Your emergency disk will come in handy as the repair mechanism uses it to find your Windows XP partition.

Removing the Windows XP Boot Loader

I want to remove the Windows XP Boot Loader.

This might be needed if you have incorrectly installed an operating system and want to remove it to start over. The same process of removing the Windows XP boot loader is applicable to the Windows 2000 and NT 4.0 boot loader. If you choose to perform this step, however, you must be sure that you have an operating system to boot into. For this example, assume you have Windows 98/95 installed and want to return to a state in which it is the only operating system available.

First, while you are booted into Windows 98/95, you must create a bootable system disk. This can be accomplished by selecting the Add/Remove Programs control panel. Then select the Startup Disk tab.

After creating a startup disk, reboot your system using the new disk. After you have fully booted into MS-DOS, simply enter the following command from the command prompt:

sys C:

This will install the Windows 98 startup boot sector onto drive C: and remove the Windows XP boot loader. Now that you're able to boot back into Windows 9x, simply remove the Windows XP directories.

You can optionally remove the following files to clean up the rest of the Windows XP boot loader files:

C:oot.ini
C:
tldr
C:
tdetect.com

Tips from the Windows Pros: Living with More Than One OS

Even with all the advice in this chapter, managing more than one operating system on the same machine at the same time can be a daunting task. Fortunately, some special tools can save you at your darkest moments. (You never expected to find purple prose in a computer book, did you?)

The Windows XP multiboot loader is capable of supporting a large number of multiboot situations—probably more than will fit on the screen in a list. Still, editing the BOOT.INI file is an intimidating process, and you must remember quirky rules about the order of operating system installation.

If you're interested in loading up a killer system with three or more operating systems, we recommend using a program designed specifically for the job. I'll describe a couple of them for your consideration.

Once again, the PowerQuest people come to the rescue with their offering, called BootMagic, which is bundled with PartitionMagic and is now owned by Symantec. This program uses a graphical interface to help you set up and run multiple operating systems in the same machine, with a minimum of compatibility problems. You can run the setup interface from DOS, Windows 9x, or Windows NT/2000/XP. The program supports Windows XP/2000, Windows 95/98, Windows NT 4.0 (server and workstation), Windows NT 3.51 (server and workstation), Windows 3.x (must be installed with DOS 5 or later), MS-DOS 5.0 or later, PC-DOS 6.1 or later, Open DOS, OS/2 3.0 or later, Linux, BeOS, and most other versions of DOS and PC-compatible OSes. Check their site at www.symantec.com/partitionmagic for more info. (The Symantec purchase is worrisome, as their customer support is at the abysmal end of the spectrum, but we'll see how the product fares.)

Another similar program is System Commander, from V Communications. This product has received rave reviews from some magazines. System Commander enables you to install and run any combination of PC-compatible operating systems, including Windows 95/98, Windows 3.x, Windows NT, DOS, OS/2, and all of the PC-compatible Unixes including Linux. Like BootMagic, this program also has a graphical user interface. In addition, it does partition management such as resizing, creation, and deletion. It's available from V Communications, Inc. (check their site at www.v-com.com).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.112.160