You can’t have been on the Internet more than a week without hearing about this Linux thing. But in case you haven’t, Linux is an operating system. That’s the software that is your computer, so to speak. Most of you have some version of Windows. Many of you have Mac OS X. And millions of people use Linux.
In fact, you’re probably reading this because you have one burning question: How can I install Linux without getting rid of Windows? You’ve probably already heard the answer is “dual booting.’ The concept is simple: Whenever you reboot your computer, the computer asks you to choose which operating system you want to use for that session, Windows or Linux. This walkthrough will answer the question of how to set up your computer so that it can dual boot.
Before we get started, it is a very good idea to back up all of your files. If something goes horribly wrong and you lose all your data, don’t blame me, just go restore your backups. Don’t say I didn’t warn you either.
It is also a very good idea to obtain and install the latest BIOS for your computer. Updated BIOS software can prevent certain types of problems with partitioning, and later, with Linux installation. And while all of the problems can be worked around with varying amounts of effort, updating the BIOS is easy and pretty painless. Contact your computer manufacturer or go to its Web site to find the latest BIOS for your computer.
First, you will need to obtain a disk partitioning utility. This walkthrough will cover the use of Norton PartitionMagic 8.0. While other utilities exist that can do the job, PartitionMagic is going to be the easiest way to do it, and it’s well worth the small bit of cash.
The reason we need a disk partitioning utility in the first place is that your entire hard drive has been reserved for the exclusive use of Windows, and we need to create new partitions which Linux will be able to use. Disk partitions are sections of the disk which are exclusively for the use of one operating system or another. While Linux can read your files from your Windows partition, it cannot be installed to the Windows partition; it needs its own partitions. We will use PartitionMagic to create the partitions from the unused free space on your hard drive.
Click each thumbnail to see the full-size image.
The first thing you have to do, of course, is to install PartitionMagic. I only have one comment regarding this process, which is otherwise like installing any other Windows program: Be sure to create the rescue diskettes if you have a floppy drive available to you. If something goes horribly wrong, which is very unlikely, they will help you get out of the jam.
Once you’ve installed PartitionMagic, it will be located under All Programs. Go start it up!
PartitionMagic has started up and shows a visual display of your hard drive’s partitions. For this demonstration I have used a fresh installation of Windows XP on a 10GB hard drive. Your drive is likely to be larger than this, so keep in mind as you go along how much space you have available to you.
PartitionMagic will only be able to use free space to create new partitions. Look in the Unused MB column to see how much space is available for this task. If your drive is very close to full, you may wish to remove some old junk you don’t use anymore first, before continuing.
Also, don’t worry if you see a very small Unallocated section. This is normal and harmless with Windows installations, and this space (along with some other space) will be allocated to Linux once we are finished.
The first thing we must do is to make room on the disk for the new partitions we will create. So I will shrink that large Windows partition. Under “Pick a task’ on the left, click on “Resize a partition’ and the Resize partitions wizard appears. As we go along, you are likely to notice that almost none of the choices we use are the “Recommended’ ones. This is because the Recommended ones apply to Windows, and we are preparing the hard drive for Linux. So if you see something that says Recommended, double check it because it is probably the wrong choice.
Here we need to select which partition we’re going to resize. There’s only one, and that’s the one that we need to work with! I will highlight it in the list, and then click Next.
Now it’s time to choose how small the partition is going to get. You can’t go below the Minimum size shown unless you delete more files from your drive. And the Maximum size indicates the largest amount of space the partition can take up. Once you choose a number here, the remainder of the disk will be free for us to create our Linux partitions. For this example, I have a 10GB disk. I will give 5GB to Windows, and 5GB to Linux. Multiply the number of GB by 1024 to get the MB that PartitionMagic expects. Get out the calculator if you need it. For example, if you have a 40GB disk, and want Windows to have 25GB and Linux to have 15GB, you would multiply 25 by 1024 and then enter the result, 25600, into the box.
Now PartitionMagic shows a visual display of how the space will be partitioned. If this doesn’t look like what you intended, click Back. Otherwise, click Finish. For me, this looks just fine, even though the numbers aren’t exactly the same, so I click Finish.
PartitionMagic has updated the display to show the progress we have made so far. However, no changes have been actually made yet until you click the Apply button in the lower left. Don’t do it now, though! If things really look all wrong, you can click the Undo button. I had to undo once when preparing this walkthrough, and I’m supposedly the expert around here, so don’t be afraid to go back a couple of steps. It’ll spare you a lot of headaches later.
Next we are going to need to create partitions for Linux to use. Under “Pick a task,’ click on “Create a new partition.’
The Create New Partition wizard starts. Click Next.
The first partition we are going to create is a small one, around 100 MB. For specific technical reasons it must be located at the beginning of the disk. Maybe I’ll go into them later, but for now the important thing is that we need a small partition at the beginning of the disk.
PartitionMagic wants to know if we want to create the new partition before the existing partition (which will cause the existing partition to be moved) or after the existing partition. Because the partition we need here should be at the beginning of the disk, click Before C: in the list, and then click Next.
The partition we are creating only needs to contain the most critical Linux boot files, such as the kernel and the boot loader. A good size is 100 MB. You can make it smaller, but you may receive warnings or errors during the Linux installation if you do. Enter 100 in the Size field.
This partition must be a primary partition, rather than a logical partition. Change the Create as field to Primary.
Finally, change the File system type field to Linux Ext3. PartitionMagic will then nicely format the partition for you. We don’t necessarily need it formatted right now, but we do need it to be something other than a Windows partition.
You will always see this message. On some older versions of Windows, they would fail to boot if not located near enough to the beginning of the disk as well. If you’re using Windows XP on a modern computer, this is very unlikely to affect you, but if you’re using an older computer (such as Pentium III or older) it could be an issue. Before going forward, see if your computer manufacturer has a BIOS update which may prevent the problem.
PartitionMagic then confirms the operation. Notice the size has changed to 102 MB. It’s not important the numbers be exact, and you can’t make them exact anyway, due to the structure of the hard drive itself. It’s only important that things are approximately as you intended. Yours may say 97, or 103, or something close to 100. This looks just about like what I asked for, so click Finish.
PartitionMagic has updated its display to show both pending actions. Now we’re almost done, just one more partition to fill up all that unused space there. Click on “Create a new partition’ one more time.
Here we go again! This time we’re going to create a single large partition for Linux to fill up all that remaining space there. We will actually be removing this partition later, when we go to install Linux, but for now it will act as a placeholder. Click Next.
This time we will create the partition “After C:’ and use up all the remaining unallocated space on the disk. Click on After C: and then click Next.
PartitionMagic can take space from existing partitions to create the new partition. We don’t want to do this because we’ve already resized the existing partition and created the new partition the way we want it. Remove the checkmarks from all of these boxes here, and then click Next. In this way, PartitionMagic will only use the unallocated space, which is what we want.
Now we get to set up the partition. Leave the Size as is, and all of the space will be used. But be sure to change Create as to Primary, and change File system type to Linux Ext3, as shown. Once you’re ready, click Next.
This is what our hard drive is going to look like! Again, if things look completely wrong here, go back and fix them. Otherwise, click Finish. We’re almost done!
This is what our drive will look like once we’re done here. Double check everything to make sure it seems to be in order. These partitions look exactly like what I was going for, so now it’s time to make things happen! Now, click Apply in the lower left.
PartitionMagic wants to confirm that you are really ready to apply the changes and didn’t just hit the Apply button by mistake. We’re ready, so click Yes.
Windows will need to be restarted for the changes to be applied. Once everything is done, you should create new Windows XP emergency disks. What? You never did that? Shame on you! Anyway, click OK, and once we’re done, you can go back and make new Windows XP emergency disks.
Windows is shutting down… It seems to do this a lot. And never when it’s convenient for me.
Now Windows is starting up again, but it’s going to do something a little different this time…
PartitionMagic has started and is ready to make the requested changes to your hard drive. This is your last chance to quit. If you don’t quit now, you will need to leave the computer running during the entire operation, or you risk data loss. That means don’t turn it off, don’t kick over the power cord, get the cats out of the room… maybe you should leave as well. It’s going to take a while.
The first step is to move and resize your existing Windows partition. This part takes the longest. On my freshly installed system it took 20 minutes. I have seen more extensively used systems on which it took hours. PartitionMagic will rearrange data only to the extent necessary to make the changes to the hard disk partitions. Once it’s done, it would be a good idea to defragment your Windows C: drive.
At this point I recommend you go make lunch. Then go eat it. Feed the cat. Walk the dog. Take a cold shower. It’s hot out there! Maybe by the time you get back, we’ll be ready.
Once Windows restarts, it will detect the new hard drive partitions and put up this mind-boggling dialog. You may as well go ahead and restart your computer (again). But don’t worry, the days of your computer restarting itself whenever it wants are numbered.
As you can see, the Windows partition has been changed to the 5GB I requested. The Linux partitions, however, are nowhere to be found. This is because Windows can’t read Linux partitions. Don’t worry, they are there, and you’ll see them soon enough.
Now your computer is ready to have Linux installed side-by-side with Windows. I will do the complete walkthrough for this process with Linux (Fedora Core 4) in future articles. Unless you really know what you’re doing, don’t jump too far ahead as there are a couple of gotchas in the Linux installation.
If you do want to get a headstart, you can read through the excellent (but very detailed) Fedora Core 4 Installation Guide. Not everything in it will apply to you. Don’t worry if you get confused; I’ll be back soon to clear everything up.