Installation guide
Chapter 4. Partitions
26
Tip
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 print 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 /proc/
partitions to make sure the kernel recognizes the new partition.
4.2.2. Formatting and Labeling the Partition
The partition still does not have a file system. Create the file system:
/sbin/mkfs -t ext3 /dev/sda6
Warning
Formatting the partition permanently destroys any data that currently exists on the partition.
Next, give the file system on the partition a label. For example, if the file system on the new partition is
/dev/sda6 and you want to label it /work, use:
e2label /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. /work) as root.
4.2.3. Add to /etc/fstab
As root, edit the /etc/fstab file to include the new partition using the partition's UUID. Use the
blkid -L label command to retrieve the partition's UUID. The new line should look similar to the
following:
UUID=93a0429d-0318-45c0-8320-9676ebf1ca79 /work ext3 defaults
1 2
The first column should contain UUID= followed by the file system's UUID. The second column should
contain the mount point for the new partition, and the next column should be the file system type (for
example, ext3 or swap). If you need more information about the format, read the man page with the
command man fstab.
If the fourth column is the word defaults, the partition is mounted at boot time. To mount the partition
without rebooting, as root, type the command: