Dual-Booting Windows and Linux
How to build a computer with two (or more) operating systems
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, and you can't afford to build two computers, then consider building a dual-boot system.
A dual-boot computer is one that is capable of running two different operating systems (but not at the same time). It's also possible to build computers than can boot three or more different operating systems, which are called multi-boot computers.
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.
Linux hardware compatibility is less of an issue now than it used to be. That used to be the single most frustrating thing about building a Linux box. But nowadays, Linux has become so popular as a desktop OS (especially outside the United States) that it's easy to find compatible hardware. But you can check here just to make sure that the hardware you're considering is compatible.
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 to set up multiple partitions before you actually start installing the operating systems. This is very handy if you frequently install and remove operating systems for hobby, business, or educational purposes, and also makes it easier to make modifications and repairs to the partitions once the systems are installed.
If you don't want to use third-party software to pre-partition your hard drive, however, then you don't really have to. Pretty much all Linux distributions have built-in utilities in the setup routines that can create new partitions and manipulate existing ones.
QtParted and GParted are two of the graphical partitioning front-ends more commonly included with Linux distributions. All popular Linux distros also include ntfsresize, which can non-destructively re-size existing NTFS partitions, and can be accessed through the graphical partitioning interface (or via the terminal, if you're doing a text-based installation).
In short, a Linux distribution will include everything you need to partition a hard drive for a multiple-boot machine configuration because most distros assume that the user may be adding Linux to a machine that already hosts Windows, so they include utilities to make room for Linux. But when you're building a new multi-boot computer, there's an easier way to set up the hard drive from the start that make the process more straightforward and less time-consuming.
The Easy Way to Set Up a New Dual-Boot System
When you're building a new dual-boot computer, you don't have to worry about re-sizing partitions.
The Windows installer also contains a utility to create partitions. Unlike Linux installers, however, the Windows installer can't create non-Windows partitions. But that's no big deal. You just run the Windows installer first and let it create the Windows partition(s) you need, but leave the rest of the hard drive "raw" or unused to leave space for your later Linux installation.
By default, the Windows partitioner will want to create one huge partition that takes up the entire hard drive. But you can override this selection. When you get to that point (it happens very early on in the installation), simply reduce the size of the partition to whatever size you want the Windows partition to be. Exactly how big that partition should be depends on a lot of factors, but basically, you want both the Windows and Linux sides to be big enough that you won't run out of space some time in the future.
I recommend creating three "sections" on the hard drive: One for Windows, one for Linux (that actually will contain at least two partitions, because Linux needs a swap partition), and one shared partition for data that's going to be available to both systems. In past versions of this page, I recommended that the shared partition be formatted as a FAT32 partition, but I'm convinced that the Linux NTFS driver, NTFS-3G, is now up to the task of playing on NTFS playgrounds. (Most Linux distributions now install NTFS-3G by default.)
You don't have to create a shared data partition, by the way (although I recommend that you do). Linux will still be able to access the data in your Windows document folder (unless you protect or encrypt it in Windows). But creating a shared partition for documents makes things a lot simpler and cleaner. It also makes backup easier, it helps keep your documents safe if one or the other operating system crashes, and it simplifies the process of updating or upgrading the operating systems.
If you decide to create a shared data partition, you will have to re-map the Documents and Libraries shortcuts in Windows to point to the shared partition, and (possibly) create symlinks to the partition from your Linux system (the installer may do this automatically, depending on the distribution). This is an easy thing to do once the systems are installed.
Using Multiple Hard Drives
Another option you may choose for your dual-boot computer is to use multiple hard drives. There are several possible configuration options.
You could, for example, use two hard drives, and install Windows on one and Linux on the other. If you want to create a shared data partition, decide which drive it's going to live on. (If one drive is bigger than the other, you may want to partition that drive into two sections: one for the OS it's hosting, and the other for the data partition.)
Another possibility using two drives would be to partition one drive into two partitions to host both operating systems, and partition the other drive into one big partition to store the data, which would be shared by both operating systems.
If you decide to use multiple drives, it's important to make sure that Windows is installed on the first partition of the primary drive (or the primary master, if you're using PATA drives). Why? Because that's where Windows will expect to be installed, and it just makes life easier to do it that way.
Step-By-Step Instructions to Create a Dual-Boot System
Okay, now that I've sufficiently confuzled you, here's the simple, step-by-step version of my advice.
I'm going to assume that you're using one big hard drive, which will be partitioned into three sections: One for the Windows system, one for the Linux system, and one big partition for shared data.
Use a big hard drive (at least 500 GB is recommended - 750GB or 1TB would be even better) so each system will have plenty of room, and there will be plenty of room for documents and data.
Windows will be installed on the first partition because that's where Windows wants to be installed, and it gets cranky when it's installed elsewhere. (Linux, on the other hand, is more laid-back and doesn't care very much where it's installed.)
Boot to your Windows installation CD with the drive unpartitioned. When you get to the part where Windows wants to know where to install itself, create a single NTFS partition at the beginning of the drive.
If you're going to be creating a separate data partition (which I recommend), then a partition size of 100GB should be enough for Windows and its programs. But if you plan to install a lot of games, desktop publishing, graphics design, or Web development applications, you probably should make the Windows system partition a little bigger because those type of apps tend to be big and to include a lot of graphics files in their program directories.
Let the installer finish installing Windows on the single partition you just created.
After Windows installs and reboots, activate it, install any additional needed drivers, and download all the available Windows updates. This may require quite some time and several reboots. (You can wait until after the Linux system is installed before installing the Windows updates, if you like; but then if Windows vomits on an update, it may be harder to fix once the dual-boot configuration is in place.)
Once all the updates are installed, from within Windows, create a new partition on the hard drive for the shared data and give it a name (like "My Stuff," for example).
Make this partition big. How big? Well, basically subtract the space you'll need for your Linux installation from however much space is available on the drive, and create a partition of that size. So if you have 400 GB of free space, and you want to give Linux 100 GB, then make the shared data partition 300 GB.
When the new partition has been created, map your libraries to the new partition. This will establish the new partition as the place to store your stuff, if you do it correctly.
Reboot the machine into Windows and log into your Windows user account. Wait until the machine has completely started, and then shut it down. This is to insure that the changes you just made have been saved to the registry.
Boot into your Linux installation CD or DVD. There will be some obvious link or button to click to install Linux. If you're pretty sure that all your hardware is supported in Linux, then just click that button. If not, then look for a link or button that says "Try Linux," "Run Live CD," or some such thing. If available with your distro, this will boot Linux without actually installing it. (This option is available with Ubuntu, Mepis, Knoppix, Fedora, and many other Linux distributions, but not all of them.)
Once you have decided to install, start the Linux installer.
Early on in the installation process, the Linux installer will ask you where to install Linux. You'll be offered several options, one of which should be to use the unused hard drive space. That's the option you want.
You'll be asked what Linux partitions you want to create. Unless you're already familiar with Linux partitioning, I suggest you create only two: "/" and "swap." The swap partition should be at least 1.5 times the amount of installed RAM. The / partition should consume the rest of the unused space.
Unless you're an experienced Linux user with a reason to want a particular file system, I suggest that you use whatever default file system the distribution recommends for the / partition.
You probably will be asked to create a "root" or "administrator" account and password, and a user account and password. Make your user account name in Linux the same as you chose in Windows, and you have a better chance of the installer finding your Windows data partition.
If the installer recognizes the shared data partition you created under Windows, and offers to make it available to you in Linux, say yes. If it doesn't, no big deal. You can link it later from within Linux.
At some point you will be asked to configure a bootloader (usually LILO or GRUB) and write it to the MBR. The most important thing to do here is to make sure that the bootloader the installer is proposing has recognized and offered to boot both your Windows and Linux systems. This almost always happens without a hitch, but make sure anyway.
By default, the bootloader usually will include other options, such as booting into Linux repair mode, or the CD or floppy drive. Leave those options in place, as well. They could come in handy.
You also will be offered the option of which system should be the default operating system. Most times, Linux will choose itself, but you can override it if you like. The default operating system is the one that will boot if you turn on the computer and do nothing else. (When you want to boot to the non-default operating system, you just have to hit the up or down arrow button on your keyboard to highlight the OS you want, and then hit enter.)
Finally, you'll most likely be offered the option of how long the system should wait before booting the default OS. The time the installer will suggest may range from ten to 30 seconds. That's how much time the system will give you to decide whether to hit the up or down arrow to override booting the default OS.
Once you're sure that the bootloader recognizes all of the systems and that the options are what you want, click the button or link to "write," "save," or "commit" the bootloader to the MBR.
Depending on your Linux distribution, there may be some other steps, which should be quite self-explanatory. Once the installer announces that it is finished, remove the installation media (if instructed) and boot into Linux. Log into your account and download whatever updates for itself it finds, then reboot back into Linux to make sure that any changes have been fully configured.
And that's that. You now have a dual-boot, Windows / Linux computer. But there are some caveats.
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. In the past, we used to create emergency boot floppies to fix this problem. Nowadays, most Linux distributions include this functionality on the installation CD or DVD. It's usually called "Repair Mode" or some such thing, and one of the first things it looks for is a broken bootloader.
- Getting Started