System information
# mkpart pri mary ext3 10 24 20 4 8
Note
If you use the mkpartfs command instead, the file system is created after the partition is
created. However, parted does not support creating an ext3 file system. Thus, if you wish to
create an ext3 file system, use mkpart and create the file system with the mkfs command as
described later.
The changes start taking place as soon as you press Enter, so review the command before
executing to it.
After creating the partition, use the pri nt command to confirm that it is in the partition table with the
correct partition type, file system type, and size. Also remember the minor number of the new partition
so that you can label any file systems on it. You should also view the output of cat
/pro c/parti ti o ns after parted is closed to make sure the kernel recognizes the new partition.
The maximum number of partitions parted will create is 128. While the GUID Partition Table (GPT)
specification allows for more partitions by growing the area reserved for the partition table, common
practice used by parted is to limit it to enough area for 128 partitions.
13.2.2. Format t ing and Labeling t he Part it ion
To format and label the partition use the following procedure:
Pro ced u re 13.2. Fo rmat an d lab el t h e part it io n
1. The partition still does not have a file system. To create one use the following command:
# /sbi n/mkfs -t ext3 /d ev/sda6
Warning
Formatting the partition permanently destroys any data that currently exists on the
partition.
2. Next, give the file system on the partition a label. For example, if the file system on the new
partition is /d ev/sd a6 and you want to label it /wo rk, use:
# e2l abel /dev/sda6 /work
By default, the installation program uses the mount point of the partition as the label to make sure the
label is unique. You can use any label you want.
Afterwards, create a mount point (e.g. /wo rk) as root.
13.2.3. Add t o /etc/fstab
As root, edit the /etc/fstab file to include the new partition using the partition's UUID. Use the
command bl ki d -o l i st for a complete list of the partition's UUID, or bl ki d d evi ce for
individual device details.
Chapt er 1 3. Part it ions
93