Partitioning the Hard Drive

Partitioning the hard drive is done with the fdisk utility, which is very similar to the utility used on other operating systems such as DOS. A new partition can be created on the newly added hard drive by running fdisk and supplying the name of the device to be partitioned. For example, if the newly added drive is /dev/hdb, it can be partitioned as follows:

# fdisk /dev/hdb

After fdisk starts, the following directions will show you how to create and delete partitions, and how to change the partition type. After a partition is created, it becomes known to Linux by a unique device name and partition number. In the preceding example, the first partition on the drive hdb is referenced as /dev/hdb1 in Linux.

Note

Get Special Edition Using Linux®, Sixth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.