-->
Previous Table of Contents Next


Preparing Your Hard Drive for Linux

Now that you’ve created your boot diskettes, it’s time to prepare your hard drive for Linux. In order to install Linux, you must create a Linux partition on your hard drive. You should also consider creating a DOS partition on your hard drive in addition to the Linux partition—a step that’s not necessary, but one that we follow for many reasons (which we’ll explain later).


NOTE:  If you’re a UNIX workstation user, you’re not going to be familiar with some of the concepts and operations we describe here. If, after reading this section, you’re still a little fuzzy about the IBM PC and its many quirks, you may want to head to your local bookstore and purchase a good guide to the PC.

Intel-based PCs have the ability to divide a hard drive into partitions. This is why you may have several different drive letters (C:, D:, E:), even though you have only one physical hard drive. (This dates from early versions of MS-DOS, which lacked the ability to recognize hard disk partitions larger than 33 megabytes. MS-DOS 4.0 was the first version to do away with this restriction.) The ability to create partitions also yields a bonus (as far as a Linux user is concerned): You can install different operating systems on a hard drive, and these different operating systems won’t conflict. As a matter of fact, they can coexist quite nicely; you can configure Linux to give you a choice of operating systems when you boot your PC, and you can access DOS-formatted partitions from within Linux. Linux is relatively good about coexisting with other operating systems—primarily, DOS, Windows, Windows 95, and OS/2. Linux requires at least one partition for itself.

You must physically create partitions, as Intel-based PCs need to know what type of operating system is residing on a portion of the hard drive. If you’ve purchased your PC from a clone vendor or superstore and started using it immediately, chances are that you’ve treated the hard disk as one contiguous drive, without partitioning it into smaller drives. In a perfect world, of course. you’re installing Linux on a brand-new system, and there’s little of importance currently installed on your hard disk. This is the route we try to follow, because there’s little chance of doing damage to anything important.

However, if you’ve been using your PC for a while, you’ve probably accumulated software, data files, and configurations that you’re loathe to give up. In this case, you’ll want to retain as much of the DOS configuration as possible while making room for Linux. There are two routes you can take:

  Using the FIPS utility to partition the hard drive without (theoretically) destroying the existing data.
  Backing up the DOS data, creating the new Linux and DOS partitions, and then reinstalling the backup. (This is our preferred method.) You’ll need to make sure that the new partition is large enough to contain all the data from the old DOS partition, of course.

In either case, you’ll want to first make a backup of your hard disk, on either floppy disks or some tape-based medium (Bernoulli drive, SyQuest tape, DAT tape). Depending on your system configuration, you’ll either want to back up everything or just those directories that can’t easily be reinstalled from floppy or CD-ROM. (We find that a system cleansing is good every once in a while, so we tend to back up data and irreplaceable configuration files but reinstall applications from scratch.) Yes, we know backing up your hard drive is a pain (and we probably don’t do it as often as we should), but you should make a backup every time you do something to your hard drive that has the potential to destroy data.

Using FIPS to Divide Your Hard Drive

After you make your backup, you’ll need to decide which route to take. The FIPS utility described earlier is stored in install fips on the first accompanying CD-ROM as FIPS.EXE; the guide to using FIPS is stored in the same location in FIPS.DOC. (If you plan on using the FIPS utility, we strongly advise you to read this file a couple of times, as it contains far more information and detail than is given here.)

Basically, FIPS works by creating a new partition on the physical end of the hard drive. Before the FIPS utility does this, you must first defragment your hard drive. A word about how a PC’s hard drive stores data is in order here.

When a PC writes to a hard disk, it writes to clusters on the disk. Generally speaking, this writing is done sequentially; the first clusters appear at the physical beginning of the disk. As you use the system, you inevitably write more and more to the hard drive, and you probably delete some data as well. As you delete the data, the clusters it occupied are freed; at the same time, new data is written to the end of the disk. Any hard disk that’s been in use for a while will have data scattered throughout the physical drive. (This is why hard drives slow down when they fill with data; the drive head must physically hop around the drive to retrieve scattered data.)

When you defragment your hard drive, you’re replacing the freed clusters at the beginning of the drive with data from the end of the drive. While not purely sequential, your data is all crammed at the beginning of the hard drive. This improves disk performance—because your data is physically closer together, the drive head spends less time retrieving data that was scattered in the past.


NOTE:  Newer versions of MS-DOS, and PC-DOS, (that is, versions 6.0 and better) contain a defragmenting utility. (Check your operating system documentation for specifics, as the utilities differ.) If you’re using an older version of MS-DOS, you’ll need to use a general-purpose utility package (such as the Norton Utilities or PC Tools Deluxe) to defragment your hard drive.

The FIPS utility takes advantage of the fact that the data is crammed at the beginning of the hard drive. It allows you to create a point past the end of the DOS data to begin the new Linux partition (if you use this method, remember to leave room for more data in the DOS partition!).


Previous Table of Contents Next