Dual-Booting Windows and Linux

You don't have to give up Windows to try Linux. If you'd like to give Linux a try, but you can't (or simply don't want to) give up your Windows operating system or applications, then consider building a dual-boot system.

When designing a dual-boot system, the most important considerations are to make sure that there's enough hard drive space to accommodate both systems, and to make sure that all of the hardware is compatible with both systems. (In practice, this means making sure it's all Linux-compatible, since practically any recent hardware will work with Windows.)

In addition, always, always, always include a floppy drive on dual boot systems. We'll explain why later.

 

Installing Windows and Linux on the Same PC

There are several ways to configure a dual-boot PC. You can, for example, use third-party software such as System Commander to set up multiple partitions and create a custom bootsector. This is very handy if you frequently install and remove operating systems for hobby, business, or educational purposes.

Most Linux distributions, however, have built-in utilities that can create dual-boot configurations. Although these utilities have the ability to re-size existing Windows partitions to make room for Linux, there's no need to do that on a new PC. Instead, you can follow the following instructions:

  1. Use a big hard drive (at least 160 GB is recommended) so each system will have plenty of room. Unless you already have some idea how much space you will need for each system, we'll assume that each will get about half the drive.

  2. Alternatively, you can use two hard drives, and install one OS on each drive. If you use this approach, then put Windows on the primary master drive, as that is where Windows will want to be installed. (Linux, on the other hand, doesn't care very much where it is installed.) Obviously, if you choose the two hard-drive method, then use the entire first hard drive for Windows. Linux will go on the second drive.

  3. If you're using one drive for both operating systems, then boot to your Windows installation CD with the drive unformatted. When you get to the part where it wants to know where to install itself, create a partition of roughly half the total size of the hard drive. If you want to be able to modify your Windows files from within Linux, then use the FAT-32 file system even if you are installing Windows 2000 or XP. (Linux write support to NTFS is less than wonderful, at least as of this writing [in January of 2005.])

  4. Alternately, you can create an NTFS partition (assuming you are installing Windows 2000 or XP; you cannot use NTFS for Windows 98 or Me), plus a small FAT-32 partition onto which you can plant files that you want to be able to work on from within both Windows and Linux. Using this option, you would first create an NTFS partition of a few gig less than half the total hard drive space, then create a FAT-32 partition of a few gig, leaving roughly half the hard drive as unformatted free space for your later Linux installation. Windows would then be installed on the NTFS partition.

  5. Finish the Microsoft Windows installation, install all drivers, apply all Service Packs and updates, and thoroughly defrag the hard drive. No need to install any applications yet, however.

  6. Once Windows is completely installed and updated, boot into your Linux installation CD.

  7. The exact sequence that will occur next varies with different Linux distros, so read the manual first. Generally, however, you will be asked early on in the installation whether you want Linux to take over the hard drive (No), or install itself as an additional operating system (Yes).

  8. Linux will also ask where you want it to install itself, and you will point it to the unformatted space on the single drive (if you're using the same drive for both operating systems), or to the second hard drive (if you are using two drives). Most likely, the Linux installer will already have figured that out, but check anyway to make sure.

  9. At some point, Linux will ask how you want to partition the free hard drive space. Unless you understand Linux partitioning and know what you need, just accept the defaults. In most cases, the default install will create three partitions: /, /home, and swap. (Some distributions may omit the /home partition, while others will create additional partitions such as /var, /usr, /tmp, and possibly others.) If you want to know more about Linux partitioning, you can click here. Otherwise, we suggest you just accept the defaults for your distribution.

  10. At some point you will be asked to configure a bootloader (usually LILO or GRUB) and write it to the MBR. By default, the bootloader usually will contain options to boot into your new Linux system, a fail-safe Linux, the floppy or CD drive, or the pre-existing Windows system. All you really need to do is specify which option should be the default operating system, and how long the system should wait before booting it.

And that's that. Once you complete the Linux installation and reboot, you should be able to start either operating system from the Linux bootloader. Which brings us back to the floppy drive. (Ha! You thought we forgot!)

What will happen during the Linux dual-boot installation is that the Linux bootloader will overwrite the MBR, and take control over the booting of all the operating systems on the computer. Linux doesn't mind doing this at all. Linux knows how to play nicely with others. Linux is not jealous, nor is Linux in the least bit offended when asked to peacefully coexist on the same computer with another operating system.

Unfortunately, the same cannot be said of Windows.

If at any time a Windows update, service pack, or repair install overwrites the MBR with its own bootloader, you will no longer be able to boot your Linux system unless you created an emergency boot disk. So when you are asked to create an emergency boot disk during the Linux install, make sure you create one. Create another one any time that you change any of the operating systems on the computer. And maybe another one as a spare, just in case.

Then if Windows overwrites your MBR (or if it just becomes corrupted), you can use the boot disk to start your Linux system, and then fix the bootloader from within Linux.

 


Home