Creating primary partitions
- The password of the root user account on a Linux host or a user account that belongs to the wheel group.
- A Linux host with at least one local or remote disk.
This procedure demonstrates how to create primary partitions on a disk. Each primary partition can be formatted as a file system or swap space, used in a device mapper thin pool, or reserved for future use. Each disk must have one primary partition, and can have up to four. If you are uncertain whether a disk is partitioned, see the preceding topic.
- Log in to the target host as root, or as a user with superuser privileges.
Start the partition table editor for the target disk.
In this example, the target disk is /dev/sdb, and it has no entries in its partition table.
The cfdisk command provides a text user interface (TUI) for editing the partition table. The following list describes how to navigate through the interface:
- To select an entry in the table, use the up and down arrow keys. The current entry is highlighted.
- To select a command from the menu at the bottom of the interface, use the left and right arrows or Tab and Shift-Tab. The current command is highlighted.
- To choose a command, press Enter.
- To return to the previous level of the menu, press Esc.
- To exit the interface, select Quit and then press Enter.
For more information about cfdisk, enter man cfdisk.
Create a new partition.
Repeat the following substeps to create up to four primary partitions.
- Select the table entry with the value Free Space in the FS Type column.
- Select [New] and press Enter.
- Select [Primary] and press Enter.
At the Size (in MB) prompt, enter the size of the partition
to create in megabytes, and then press Enter.
To accept the default value (all free space on the disk), press Enter.
Select [Beginning] and press Enter.
Write the partition table to disk, and then exit the partition table editor.
- Select [Write] and press Enter.
At the confirmation prompt, enter yes and then press
You can ignore the warning about a bootable partition.
- Select [Quit] and press Enter.