Special Edition Using Microsoft Windows XP Professional (3rd Edition)
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: LILOthe 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:
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.
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:
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.
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:
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. |