Show Table of Contents
13.4. Setting a Partition Type
The partition type, not to be confused with the file system type, is used by a running system only rarely. However, the partition type matters to on-the-fly generators, such as
systemd-gpt-auto-generator, which use the partition type to, for example, automatically identify and mount devices.
You can start the
fdiskutility and use the
tcommand to set the partition type. The following example shows how to change the partition type of the first partition to 0x83, default on Linux:
fdisk /dev/sdcCommand (m for help):
1Partition type (type L to list all types):
83Changed type of partition 'Linux LVM' to 'Linux'.
partedutility provides some control of partition types by trying to map the partition type to 'flags', which is not convenient for end users. The
partedutility can handle only certain partition types, for example LVM or RAID. To remove, for example, the lvm flag from the first partition with
parted /dev/sdc 'set 1 lvm off'
For a list of commonly used partition types and hexadecimal numbers used to represent them, see the Partition Types table in the Partitions: Turning One Drive Into Many appendix of the Red Hat Enterprise Linux 7 Installation Guide.