User`s guide
Configuring the Virtual Machine 222
Creating a New Partition in Linux
In most Linux systems, you can use the fdisk utility to create a new partition and perform
other disk management operations.
Note: To perform disk management operations using fdisk, you must have the root
privileges.
As a tool with a text interface, fdisk requires typing the commands in the fdisk command
line. The main fdisk commands are listed below:
Options Description
m
Displays all available commands for fdisk.
p
Displays the list of existing partitions on your hda drive. Unpartitioned
space is not listed.
n
Creates a new partition.
q
Exits fdisk without saving your changes.
l
Lists partition types.
w
Writes changes to the partition table.
To create a new partition:
1 Start a terminal.
2 Start fdisk:
# /sbin/fdisk /dev/hda
/dev/hda stands for the hard drive you want to partition.
3 In fdisk, to create a new partition, type the following command:
n
When prompted to specify the Partition type, type p to create a primary partition or e to
create an extended one. There may be up to four primary partitions. If you want to create
more than four partitions, extend the last partition, and it will become a container for
other logical partitions.
When prompted for the Number, in most cases, type 3 because a typical Linux virtual
machine has two partitions by default.
When prompted for the Start cylinder, type a starting cylinder number or press Return to
use the first cylinder available.
When prompted for the Last cylinder, press Return to allocate all the available space or
specify the size of a new partition in cylinders if you do not want to use all the available
space.
By default, fdisk creates a partition with a System ID of 83. If you are unsure of the
partition’s System ID, use the
l
command to check it.
4 Use the
w
command to write the changes to the partition table.










