After you make sure your hardware is suitable for use with Linux, you must ensure that space is available on your hard drive for a Linux installation. Unfortunately, this task is not as simple as it might seem. Merely having unused space on your hard drive is not enough; a proper Linux installation requires unpartitioned spacespace that is not being used by another operating system.
Understanding PartitionsPC operating systems such as Windows or Linux must be installed on one or more hard drive partitions. A partition is an area of the hard drive that has been set aside specifically for one operating system; in a sense, it is space that is "owned" by the operating system in question. A Windows partition therefore belongs, in a sense, to Windows, while a Linux partition belongs to Linux. Most PCs today ship with Windows preinstalled. The entire hard drive has therefore been given to Windows; such drives contain only one partition that occupies the entire drive and that is owned by Windows. Because of this, when you plan to install Linux on a system that already contains Windows, you have the following three options:
Most users interested in building a server-oriented Linux computer choose to replace the Windows partition completely. This gives Linux exclusive control of the computer and all of the hard drive space it contains. If this is what you plan to do, you do not need to worry about repartitioning because the Fedora Core 4 installer can delete existing Windows partitions for you; feel free to skip the rest of this chapter. If you plan to dual-boot Linux and Windowsthat is, to let them share a hard drive and to choose between them each time you switch on your computeryou need to repartition your hard drive to ensure that space is allocated to both systems. Most desktop and laptop computer users who are installing Linux for the first time choose this option.
Nondestructive RepartitioningUsers of Windows 95, Windows 98, and Windows Me can easily make room for Linux using a utility called FIPS, which is available on the Internet at no charge and is written by the same kinds free software developers that work on Linux. FIPS shrinks an existing Windows partition while preserving the data stored there. You can then create Linux partitions in the resulting unassigned space without losing or having to rearrange any Windows files. Unfortunately, FIPS does not work with most Windows NT, 2000, or XP systems because FIPS is not capable of rearranging files stored in the way that Windows 2000 or Windows XP stores them. If you are using Windows NT, 2000, or ME and would like to repartition nondestructively, you can determine whether FIPS will work for you by following these steps:
Defragmenting Prior to Using FIPSBefore you actually use FIPS, you must defragment the drive partition. Defragmentation is necessary prior to running FIPS because FIPS can shrink a Windows partition only if a continuous area of empty space is available. The defragmentation process rearranges your files so that they are all stored one immediately after another toward the beginning of the partition. This leaves all the unused space near the end empty, where FIPS can trim it away and make it available to other operating systems like Linux. Launch the Windows defragmentation tool by following these steps:
Creating a FIPS Floppy and Starting FIPSThe FIPS program can be downloaded at no charge by typing the following address into your Internet Explorer or web browser window: http://www.tux.org/pub/dos/partition-programs/fips/fips-20/fips.exe When prompted, save the file to your Windows desktop. After saving the FIPS program to your desktop, type the following address in your web browser to save the FIPS documentation: http://www.tux.org/pub/dos/partition-programs/fips/fips-20/fips.doc. Be sure to print the fips.doc file before continuing, so that you can refer to it as you use FIPS. To use FIPS, you must run it from a DOS boot floppy. Such a floppy can be created only on an MS-DOS, Windows 95, Windows 98, or Windows Me system; Windows 2000 and Windows XP do not provide utilities for creating DOS boot floppies. Windows 2000 and XP users not intending to use FIPS can move to the section "Destructive Repartitioning," later in this chapter.
To create a DOS boot floppy containing FIPS from within Windows 95, 98, or Me, follow these steps:
After you have created your FIPS floppy and printed the fips.doc file, switch off your computer. Insert the FIPS floppy disk into the PC and power on again. When you reach the DOS prompt, type fips and press Enter. Carefully follow the directions in fips.doc to resize partitions according to your needs.
Using FIPSWhen you first start FIPS, you're shown a small amount of general information about the program; press Enter to page through it. You're then shown technical information about your hard drive as FIPS performs a few basic checks to ensure that your existing hard drive partitions are in good condition: Boot sector: Bytes per sector: 512 Sectors per cluster: 8 Reserved sectors: 32 Number of FATs: 2 Number of rootdirectory entries: 0 Number of sectors (short): 0 Media descriptor byte: F8h Sectors per FAT: 3993 Sectors per track: 63 Drive heads: 64 Hidden sectors: 63 Number of sectors (long): 8092417 Physical drive number: 80h Signature: 29h Checking boot sector .. OK Checking FAT .. OK Searching for free space .. OK FIPS then asks whether you want to back up the root and boot sectors of your hard drive: Do you want to make a backup copy of your root and boot sector before proceeding (y/n)? Choose y. Should FIPS fail to correctly repartition your hard drive, you will need such backups to restore your original partition information and avoid data loss. FIPS then prompts you to insert a bootable floppy disk: Do you have a bootable floppy disk in drive A: as described in the documentation (y/n)? Answer y to this question as well, since you started FIPS from a bootable floppy. FIPS then creates a root and boot sector backup file on your floppy called rootboot.000. You can use the rootboot floppy to restore some of your hard drive's structure if anything goes wrong and you find that your system no longer boots as expected. (See the FIPS documentation for details on restoring from backups.)
After the rootboot.000 backup file is created, FIPS presents you with a simple table that lists the proposed new size for the old partition, a cylinder boundary (the location on your hard drive where the disk will be divided), and the proposed size for the new partition: Old partition Cylinder New partition 397.7 MB 202 3600.6 MB The old partition size is the amount of disk space that will remain allocated to Windows after the repartitioning process is complete. Remember, this number does not represent the free space available to Windows, but rather all space allocated to Windows (including space used by existing Windows files and folders). The new partition size is the amount of space that will be unallocated and available to the Fedora Core 4 installer for Linux. Use your left- or right-arrow key to adjust these values; allocate space as desired to the old and new partitions. Remember that for Fedora Core 4 to function properly, you should have at least as much free space as the minimum hard drive size shown in Table 1.1 available to Linux. When you are satisfied with the numbers that FIPS shows, press Enter to confirm the changes. FIPS performs several more sanity checks and displays a table showing your proposed new partitions, as shown in Figure 1.5. Figure 1.5. FIPS displays the new partition table that you have proposed. Check the sizes shown in the rightmost column to make sure they match the numbers you intended to choose.After displaying the new partition details, FIPS asks whether you want to continue (you have one more chance to abort before changes are saved) or re-edit the partition table: Do you want to continue or reedit the partition table (c/r)? Select r to re-edit if you have changed your mind about the sizes of the partitions you want to create. If you select c to continue, you are shown an updated set of technical details about your hard drive, as it will appear after the changes are saved to the disk. FIPS then asks you one final time to confirm your changes: Ready to write new partition scheme to disk Do you want to proceed (y/n)? This is your last chance to change your mind, by selecting n at the prompt. If you have not yet backed up your data, you should seriously consider selecting n now, exiting, and backing up your data before running FIPS again. If you are ready to have FIPS save your changes to the disk and resize your Windows partition, select y to proceed. You should quickly see a success message: Repartitioning complete With FAT32 partitions, you should now run scandisk on the shortened partition Remove the floppy disk, restart your computer, and immediately perform a file-system integrity check by following these steps:
After you run FIPS to make space for Linux and check your newly resized Windows partition for errors, you are ready to launch the Fedora Core 4 installer. Destructive RepartitioningDestructive repartitioning works just as it sounds: You will use your Windows 2000 or XP install CD to erase your hard drive completely and install Windows from scratch, taking care to specify to the Windows installer that you want Windows to be given only a portion of your hard drive, rather than the entire thing.
The process of installing and partitioning Windows varies between releases of the Windows operating system. Full instructions for installing and partitioning the particular version of Windows that you own appear in the installation guide that accompanied your Windows CD-ROM. Most current business and home users are Windows 2000 users, and can destructively repartition using a Windows 2000 install CD by following these steps:
After selecting the desired Windows partition size, simply install Windows using the installation instructions that accompany your Windows CD-ROM. After you finish reinstalling Windows to make space for Linux, the destructive repartitioning process is complete and you are ready to launch the Fedora Core 4 installer. Avoiding Repartitioning by Adding a Hard DriveIf all this talk of repartitioning makes you more than nervous, you are not alone. Even professionals who have installed Linux many times dread repartitioning. There are so many variables involved in the process that sooner or later you are bound to erase a hard drive by accident and find yourself restoring data from a pile of Zip disks or CD-ROMs. Even when your data has been recently backed up, this process can be both time-consuming and frustrating. There is an easier way, if you're willing to allow for a modest hardware budget. Most PCs today can accommodate four Enhanced IDE (EIDE) devices such as hard drives, CD-ROM/RW drives, or DVD drives. Most PCs, however, ship with only two drives connectedone hard drive and one removable drive (CD or DVD). This leaves room for up to two more EIDE devices in the typical PC. Although the actual nuts and bolts of installing an additional hard drive are beyond the scope of this book, many experienced PC and Windows users are capable of adding a second hard drive to a PC system. Most computer retail shops can also install any hard drive that you purchase for a modest labor fee. By adding a second hard drive just for Linux, you gain several advantages:
If you can afford to have an additional hard drive installed, or if you can install one yourself, you should consider doing so, instead of repartitioning. |