What if you have only one computer, and you want to be able to run Linux as well as Windows? Well, you can -- through something called dual booting. Dual booting is an either/or proposition. You can't really run Windows and Linux at the same time. This month's column will be of most use to Windows 3.x/95/98 users. If you're running NT, you should purchase the commercial product,
When you start up a computer with Linux installed, you get the prompt, LILO:. If you do nothing, press the "enter" key or type linux then Linux will start up. If you have a dual boot computer, you can type the name of another operating system (like Windows) at this point and start that OS instead of Linux. It's pretty easy to install Linux to dual boot on a machine that's already running Windows, but it's not so easy to add Windows to a machine that's running Linux. I would not recommend trying this unless you absolutely have to.
If you already have Windows installed, there are a few common scenarios for those looking to create dual boot machines:
1. You have one disk drive with one "partition." In other words, you have a single disk and you see only drive "C:" from "Windows Explorer" or "My Computer".
2. You have one disk with two or more partitions. You can see drives "C:" and "D:", even though you have only one hard drive (Figure 1). These are called "logical" drives.
3. You have two or more disks with one or more partitions on each (Figure 2).
If you have more than one disk then you may choose to dedicate one drive to Windows and another to Linux. Simply go ahead and install Linux. When it comes time to "partition" and "mount" your disks then just leave the Windows drive alone. Don't edit its partitions and don't mount it.
But if you have only one disk then keep reading, you'll need to do some work on the disk to get it ready.
On the computer shown in Figure 2 I have two partitions, one on each drive. I decided to use the second drive entirely for Linux, and to break up the first drive into two partitions. I don't use Windows much and so I didn't give it much more space on the disk than it was already using. Instead, I devoted most of the space on that drive to Linux.
Partitioning Revisited
We talked about disk partitioning in this column in the Spring 1999 issue. Think of the disk like the junk drawer you have in your kitchen. The drawer is much more manageable if you buy one of those plastic drawer organizers with lots of compartments. Imagine that your organizer has movable compartment walls so that the compartments are re-sizable. Once you start filling the compartments then it becomes difficult to resize them without removing everything -- the clutter inside just gets in the way. Repartitioning a drive is a little like this.
There isn't much on my disk drive #2 (D:), so I can just copy its contents to drive #1 (C:) leaving it completely free for Linux. Drive C: is more of a problem. It has just one big partition, and I now want to add a second. I need to move all of my Windows data to one part of the disk and create a new Linux partition in the unused part.
The usual way to do this is by copying everything off of the disk, reformatting it (which erases everything on the disk), creating new partitions, and then re-installing windows and copying back all of the data. But I don't want to re-install Windows and copy all of my data twice. Lucky for me, there's a way around this. It goes by the name of fips.
Making Room on Your Drive with fips
As I've explained in months past, Linux, unlike Windows, requires that you create more than one partition on your hard drive. Be aware of this, but don't make it a big concern right now -- at this point we're only talking about making Windows and non-Windows partitions. We can give Linux one large partition and later break it into the different partitions that Linux requires.
fips is a freely-available DOS utility that comes with some Linux distributions (Red Hat, for example -- in the dosutils directory). If you don't have it in your particular distribution, you can find it at the Red Hat FTP site (ftp.redhat.com). There's another program in the same place named restorrb.exe. If anything should go wrong when you repartition, restorrb may be able to undo the changes.