Next Up Previous Contents Index

4.3 Creating Partitions for Red Hat Linux

Creating Partitions for Red Hat Linux

At this point, it's necessary to let the installation program know where it should install Red Hat Linux. This is done by defining mount points for one or more disk partitions in which Red Hat Linux will be installed. You may also need to create and/or delete partitions at this time.

The installation program then presents a dialog box that allows you to choose from two disk partitioning tools (see Figure 16). The two choices you have are:

Figure 16: Selecting Disk Setup Method

With the exception of certain esoteric situations, Disk Druid can handle the partitioning requirements for a typical Red Hat Linux installation.

Select the disk partitioning tool you'd like to use, and press [Enter]. If you choose Disk Druid, continue reading. If you'd rather use fdisk, please turn to Section 4.3.2.

4.3.1 Using Disk Druid

Using Disk Druid

If you selected Disk Druid, you will be presented with a screen that looks like figure 17. While it may look overwhelming at first, it really isn't. Let's go over each of Disk Druid's three sections, and you'll see that there's nothing to be scared of.

Figure 17: Disk Druid Main Screen

4.3.1.1 The ``Current Disk Partitions'' Section

The ``Current Disk Partitions'' Section

Each line in the ``Current Disk Partitions'' section represents a disk partition. You'll note that this section has a scroll bar to the right, which means that there might be more partitions than can be displayed at one time. If you use the [\uparrow] and [\downarrow] keys, you can see if there are any additional partitions there. Each line in this section has five different fields:

Mount Point -- This field indicates where the partition will be mounted when Red Hat Linux is installed and running.

Device -- This field displays the partitions device name.

Requested -- The ``Requested'' field shows the minimum size requested when the partition was defined.

Actual -- The ``Actual'' field shows the space currently allocated to the partition.

Type -- This field shows the partition's type.

4.3.1.1.1 Another Type of Partition
Another Type of Partition

As you scroll through the ``Current Disk Partitions'' section, you might see an ``Unallocated Requested Partitions'' title bar, followed by one or more partitions. As the title implies, these are partitions that have been requested but, for one reason or another, have not been allocated. A common reason for having an unallocated partition is a lack of sufficient free space for the partition. In any case, the reason the partition is unallocated will be displayed after the partition's mount point.

4.3.1.2 The ``Drive Summaries'' Section

The ``Drive Summaries'' Section

Each line in the ``Drive Summaries'' section represents a hard disk on your system. Each line has the following fields:

Drive -- This field shows the hard disk's device name.

Geom [C/H/S] -- This field shows the hard disk's geometry. The geometry consists of three numbers representing the number of cylinders, heads, and sectors as reported by the hard disk.

Total -- The ``Total'' field shows the total available space on the hard disk.

Used -- This field shows how much of the hard disk's space is currently allocated to partitions.

Free -- The ``Free'' field shows how much of the hard disk's space is still unallocated.

Bar Graph -- This field presents a visual representation of the space currently used on the hard disk. The more pound signs there are between the square braces, the less free space there is. In Figure 17, the bar graph shows no free space.

4.3.1.3 Disk Druid's Buttons

Disk Druid's Buttons

These buttons control Disk Druid's actions. They are used to add and delete partitions, and to change partition attributes. In addition, there are buttons that are used to accept the changes you've made, discard those changes, or exit Disk Druid entirely. Let's take a look at each button in order.

Add -- The ``Add'' button is used to request a new partition. When selected, a dialog box will appear containing fields that must be filled in.

Add NFS -- This button is used to add a read-only NFS-served filesystem to the set of mount points on your Red Hat Linux system. When selected, a dialog box will appear containing fields that must be filled in.

Edit -- The ``Edit'' button is used to modify attributes of the partition currently highlighted in the ``Current Disk Partitions'' section. Selecting this button will cause a dialog box to appear. Some or all of the fields in the ``Edit Partition'' dialog box may be changed, depending on whether the partition information has already been written to disk or not.

Delete -- The ``Delete'' button is used to delete the partition currently highlighted in the ``Current Disk Partitions'' section. Selecting this button will cause a dialog box to appear asking you to confirm the deletion.

Reset -- This button is used to discard all changes you may have made while in Disk Druid, and return the list of partitions to those read from the partition table(s) on your hard disk(s). When selected, you'll be asked to confirm whether you want the changes discarded or not. Note that any mount points you've specified will be lost, and will need to be reentered.

Ok -- The ``Ok'' button causes any changes made to your systems partitions to be written to disk. You will be asked to confirm your changes before Disk Druid rewrites you hard disk partition table(s). In addition, any mount points you've defined are passed to the installation program, and will eventually be used by your Red Hat Linux system to define the filesystem layout.

Cancel -- This button causes Disk Druid to abort without saving any changes you've made. When this button is selected, the installation program will present a dialog box that permits you to choose what action you'd like to take next.

Please Note: You will need to dedicate at least one partition to Red Hat Linux, and optionally more. This is discussed more completely in Section 2.4.4.

Now let's see how Disk Druid is used to set up partitions for your Red Hat Linux system.

4.3.1.4 Adding a Partition

Adding a Partition

To Add a new partition, select the Add button, and press [Space] or [Enter]. A dialog box entitled ``Edit New Partition'' will appear (see Figure 18). It contains the following fields:

Figure 18: Creating a New Partition

4.3.1.4.1 Problems When Adding a Partition
Problems When Adding a Partition

If your attempt to add a partition and Disk Druid can't carry out your request, you'll see a dialog box like the one in figure 19. In the box are listed any partitions that are currently unallocated, along with the reason they could not be allocated. Select the Ok button, and press [Space] to continue. Note that the unallocated partition(s) are also displayed on Disk Druid's main screen (though you may have to scroll the ``Current Disk Partitions'' section to see them).

Figure 19: Unallocated Partition Warning

4.3.1.5 Deleting a Partition

Deleting a Partition

To delete a partition, highlight the partition in the ``Current Disk Partitions'' section, select the Delete button, and press [Space]. You will be asked to confirm the deletion.

4.3.1.6 Editing a Partition

Editing a Partition

To change a partition's settings, highlight the partition in the ``Current Disk Partitions'' section, select the Edit button, and press [Space]. You will be presented with a dialog box very similar to the one shown in Figure 18. Make the appropriate changes, select Ok, and press [Space].

Please Note: If the partition already existed on your hard disk, you will only be able to change the partition's mount point. If you want to make any other changes, you will need to delete the partition and recreate it.

4.3.1.7 Adding an NFS Mount

Adding an NFS Mount

To add a read-only NFS-served filesystem, select the Add NFS button, and press [Space]. If you have not selected a network-related installation method, you will be presented with several dialog boxes concerning network configuration (Turn back to Section 3.4.5 for more information). Fill them in appropriately. You will then see a dialog box entitled, ``Edit Network Mount Point'' (see Figure 20. In this dialog box you will need to enter the NFS server name, the path to the exported filesystem, and the mount point for the filesystem. Select the Ok or Cancel button as appropriate, and press [Space].

Figure 20: Adding an NFS Mount Point

4.3.1.8 Starting Over

Starting Over

If you'd like to abandon any changes you've made while in Disk Druid, you can select the Reset button, and press [Space]. You will be asked to confirm this action. If you select Yes, Disk Druid will reread the partition tables (if any exist) from each hard disk, and display them. Selecting No allows you to return to Disk Druid's main screen, where you can continue your work.

4.3.1.9 Canceling

Canceling

If you would rather use fdisk, select Cancel, and press [Space]. You can then select fdisk from the ``Disk Setup'' dialog box.

4.3.1.10 When You're Finished...

When You're Finished...

Once you've finished configuring partitions and entering mount points, your screen should look something like the one in Figure 21. Select OK, and press [Space]. Then turn to Section 4.4.

Figure 21: Partitions and Mount Points Defined

4.3.2 Using fdisk

Using <tt>fdisk</tt>

If you'd rather use fdisk to manage partitions, this is the section for you. Once you've selected fdisk, you'll be presented with a dialog box entitled ``Partition Disk'' (see Figure 22). In this box is a list of every disk on your computer. Move the highlight to the disk you'd like to partition, select Edit, and press [Space]. You will then enter fdisk and can partition the disk you selected. Repeat this process for each disk you want to partition. When you're done, select ``Done''.

Figure 22: Selecting a Disk for Partitioning

4.3.2.1 An Overview of fdisk

An Overview of <tt>fdisk</tt>

fdisk includes online help which is terse but useful. Here are a few tips:

Figure 23: Sample Output From fdisk

4.3.2.2 Numbering Partitions

Numbering Partitions

Linux refers to disk partitions using a combination of letters and numbers which may be confusing to inexperienced users. Here is a summary:

First Two Letters -- The first two letters of the partition name indicate the type of device on which the partition resides. You'll normally see either hd (for IDE disks), or sd (for SCSI disks).

The Next Letter -- This letter indicates which device the partition is on. For example, /dev/hda (the first IDE hard disk) or /dev/sdb (the second SCSI disk).

The number
denotes the partition. The first four (primary or extended) partitions are numbered 1 through 4. Logical partitions start at 5. E.g.,
/dev/hda3 is the third primary or extended partition on the first IDE hard disk; /dev/sdb6 is the second logical partition on the second SCSI hard disk.

4.3.2.3 Changing the Partition Table

Changing the Partition Table

When you are finished partitioning your disks, press Done; you may see a message indicating that the installation program needs to reboot. This is a normal occurrence after changing a disk's partition data; it usually happens if you created, changed, or deleted any extended partitions. After you press OK, your machine will reboot. Follow the same installation steps you did up until Partitioning Disks; then simply choose Done.

4.3.3 Filesystem Configuration

Filesystem Configuration

Since Red Hat Linux may be distributed across several disk partitions, you need to choose which disk partitions go with which filesystem.

4.3.3.1 Selecting the Root Partition

Selecting the Root Partition

If you are performing a full install, the installation program presents a list of the Linux partitions it can find and prompts you to choose a root partition (see Figure 24. The root partition (or root filesystem) is the one which holds everything necessary to boot your Red Hat Linux system; it is mounted on / (the root directory) when your system boots. Select the root partition you wish to use and press [Enter].

Figure 24: Selecting Root Partition

If you are performing an upgrade, the installation program tries to find your root partition automatically; if it finds one, it goes on to the next step.

4.3.3.2 Other Partitions

Other Partitions

The next dialog box contains a list of all disk partitions with filesystems readable by Red Hat Linux, including partitions for MS-DOS or Windows. This gives you the opportunity to assign these partitions to different parts of your Red Hat Linux filesystem. The partitions you assign will be automatically mounted when your Red Hat Linux system boots. Select the partition you wish to assign and press [Enter] (or choose Edit); then enter the mount point for that partition, e.g., /usr (see Figure 25).

Figure 25: Filesystem Configuration

Additionally, Red Hat Linux allows you to mount read-only NFS volumes when your system boots; this allows directory trees to be shared across a network. Choose Add NFS. If you have not selected a network-related installation method, you will be presented with several dialog boxes concerning network configuration (Turn back to Section 3.4.6 for more information). Fill them in appropriately. You will then see a dialog box entitled ``Edit Network Mount Point''. Enter the NFS server's hostname, the path to the NFS volume, and the local mount point for that volume (see Figure 26).

Figure 26: Adding an NFS Mount


Next Up Previous Contents Index