Creating the Partitions
Note: All the commands used here must be performed as the root user, or by adding "sudo" to the beginning of the command.
If you are unsure of the device name of your hard drive type "fdisk -l". This will give you the device names of all the hard drives currently available to your system. If you are partitioning a secondary drive, your unpartitioned hard drive will have a device name like "/dev/hdb" or "/dev/sdb/".
To start the partitioning procedure type the following command:
The fdisk utility has the following commands:
p print the partition table
n create a new partition
d delete a partition
q quit without saving changes
w write the new partition table and exit
First, type "p" to see the size of your hard drive. You will get output such as:
Disk /dev/sdb: 64 heads, 63 sectors, 621 cylinders
Units = cylinders of 4032 * 512 bytes
You determine your hard drive size by the following math: heads*sectors*cylinders*bytes=total size of hard drive.
Decide how you want to spit up the partitions. If you want four partitions that are exactly the same size, each partition would be 320,495,616 bytes or 305M (320,495,616/1048576).
Next, type "n" to create the first partition. Enter the following information:
Partition number (1-4): 1
First cylinder (1-621, default 1):<RETURN>
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-621, default 621): +305M
Repeat this process for each partition.
When you are finished creating the new partitions, check the partition table by typing "p". If you are satisfied, type "w" to write the partition table.