Partitioning Before and During Installation

 < Day Day Up > 

Partitioning your hard drive for Linux can be done before or during installation.

If you plan to prepare your partitions before installing Linux, you'll need to use commercial partitioning software. Some of the popular commercial software you can use to create Linux partitions are Symantec's PartitionMagic or VCOM Products' Partition Commander. Alternatively, it may be possible to prepare partitions before installing Fedora by using the free FIPS.EXE command.

If you want to partition a hard drive using an existing Linux system, you can attach the hard drive to a spare IDE channel, and then use the Linux fdisk or GNU parted partitioning utilities. Both utilities offer a way to interactively partition and prepare storage media. Linux recognizes IDE hard drives using a device name such as /dev/hda (for the master device on IDE channel 0), /dev/hdb (for the slave device on IDE channel 0), /dev/hdc (for the master device on IDE channel 1), and /dev/hdd (for the slave device on IDE channel 1).

If a new hard drive is properly attached to your PC and you then boot Linux, you can see if the kernel recognizes the device by viewing the output of the dmesg command. You can then use fdisk with the device name to begin partitioning like so:

 # fdisk /dev/hdb 

Note that you will need root permission, and in this example, the new drive is attached as a slave on IDE channel 0. Do not change partitioning on your root device, or you'll hork your system! The fdisk command is interactive, and you can press m to get help when using the utility. You can use parted in much the same way if you specify the i, or interactive option on the command line like so:

 # parted -i /dev/hdb 

To get help when using parted interactively, press ? or type help followed a command keyword. The parted command has other helpful features, such as the ability to copy a file system directly from one partition to another.

Finally, you can prepare partitions ahead of installation by booting your system using a live Linux distribution (such as the LNX Bootable Business Card, available at http://www.lnx-bbc.org/) and then using a native Linux utility such as fdisk to partition your drive. For details on using the fdisk partitioning utility and alternative software tools to partition your hard drive, see the section "How to Access and Manipulate the Partition Table" in Chapter 37, "Managing the File System."

TIP

You can use the first Fedora CD or the DVD to perform other tasks aside from installing Linux. The CD-ROM/DVD features a rescue mode and can also be used to partition and prepare a hard drive for Linux. See Chapter 3.


NOTE

It is possible to create a dual-boot configuration, which allows the choice of booting Fedora and another operating system, such as Windows XP. To configure your system for dual-booting, you must first install Windows and then install Linux. Note that many Windows system-restore CD-ROMs will wipe out all data on your hard drive, including Linux. During installation of Fedora, you install the GRUB Linux bootloader in the primary drive's Master Boot Record, or MBR. When properly configured, GRUB allows your system to reboot to Windows or Linux. See Chapter 16, "Backing Up, Restoring, and Recovery," for information on using GRUB, or browse to http://www.gnu.org/software/grub/manual/ to read the GRUB manual.


CAUTION

Before you begin partitioning your drive, get your safety nets in order. First, back up all critical data! Any changes to your system's hard drive or operating system put your existing data at risk. To prevent the loss of time and resources that inevitably follow data loss, do full backups before you make any changes to your system. Create a bootdisk during the install (you will be asked before the install finishes), so you will be able to at least boot Linux if something goes wrong. See Chapter 16 for information on backups with Linux.


Choosing a Partitioning Scheme

Likedeployment and installation of Linux, partitioning your hard drive to accept Fedora requires some forethought, especially if the target computer is going to be used other than as a home PC on which to learn Linux.

If Linux is to be the only resident operating system, you can have the installer automatically create and use a partition scheme according to the type of installation you select during the install. If you plan to have a dual-boot system in which you can boot Linux or another operating system, you'll need to manually partition your hard drive before and possibly during the install.

The simplest and most basic partitioning scheme for a Linux system requires a Linux native root partition and a swap partition. On a single-drive system with 10GB storage and 128MB RAM, the scheme might look like this:

 Hard Drive Partition    Mount Point    Size /dev/hda1               /              9.74GB /dev/hda2               swap           256MB 

On a system running Windows, the scheme might look like this:

 Hard Drive Partition    Mount Point    Size /dev/hda1               /mnt/dos       2GB /dev/hda2               /              7.74GB /dev/hda3               swap           256MB 

CAUTION

Notebook users should be careful when partitioning. Many notebooks use a special partition equal to the size of install RAM in order to perform suspend-to-disk or other hibernation operations. Always examine your computer's initial partitioning scheme if configuring a dual-boot system, and leave the special partition alone! One way around this problem is to use a software suspend approach as outlined at http://swsusp.sourceforge.net/.


Hosting Parts of the Linux File System on Separate Partitions

Your specific partitioning scheme will depend on how Fedora will be used. On a system being designed for expansion, greater capacity, or the capability to host additional software or users, you can use separate partitions to host various parts of the Linux file system. Some candidates for these separate partitions include

  • /home Users will store hundreds upon hundreds of megabytes of data under their directories. This is important data, perhaps even more so than the system itself. Using a separate partition (on a different volume) to store this user data helps make the data easier to find, and it segregates user and system data. You will have to decide ahead of time how much storage to allocate to users. For a single work station, you should reserve several gigabytes of storage.

  • /opt As the home directory for additional software packages, this directory can have its own partition or remote file system. Fedora does not populate this directory, but it might be used by other software packages you install later on. One gigabyte of storage should be adequate, depending on applications to be installed.

  • /tmp This directory can be used as temporary storage by users, especially if disk quotas are enforced; as such, it could be placed on its own partition. This directory can be as small as 100MB.

  • /usr This directory holds nearly all the software on a Fedora system and can become quite large if additional software is added, especially on a workstation configuration. Using a separate partition can make sense. A full install will require at least 6GB for this directory or more if additional software is added.

  • /var Placing this directory (or perhaps some of its subdirectories) on a separate partition can be a good idea, especially because security logs, mail, and print spooling take place under this tree. You should reserve at least one gigabyte of storage for /var, especially if using Fedora as a print server (as spooled documents will reside under /var/spool).

TIP

As a general rule, it is a good idea to segregate user and system data. Although a Linux system can be quickly restored, user data has a much greater value and can be much more difficult to replace. Segregating data can make the job of backing up and restoring much easier. If you ever have a problem accessing your partition, we recommend that you get the excellent Knoppix distribution that boots and runs entirely from CD. This will enable you to access your partitions and make any necessary repairs.


     < Day Day Up > 


    Red Hat Fedora 4 Unleashed
    Red Hat Fedora 4 Unleashed
    ISBN: 0672327929
    EAN: 2147483647
    Year: 2006
    Pages: 361

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net