Product SiteDocumentation Site

A.2.10. part (required) - Create Physical Partition

Creates a partition on the system.
For a detailed example of part in action, see Section A.15.1, “Advanced Partitioning Example”.
part|partition mntpoint --name=name --device=device --rule=rule [options]

Warning

All partitions created are formatted as part of the installation process unless --noformat and --onpart= are used.

Note

If partitioning fails for any reason, diagnostic messages appear on virtual console 3.
mntpoint
Where the partition is mounted. The value must be of one of the following:
/path
A path to the mount point - for example, / or /home
swap
The partition is used as swap space.
To determine the size of the swap partition automatically, use the --recommended option:
swap --recommended
The size assigned will be effective but not precisely calibrated for your system.
To determine the size of the swap partition automatically but also allow extra space for your system to hibernate, use the --hibernation option:
swap--hibernation
The size assigned will be equivalent to the swap space assigned by --recommended plus the amount of RAM on your system.
For the swap sizes assigned by these commands, see the section describing swap in Section 5.4.10.6, “Recommended Partitioning Scheme”.
raid.id
The partition is used for software RAID (see raid).
pv.id
biosboot
The partition will be used for a BIOS Boot partition. A 1 MB BIOS boot partition is necessary on BIOS-based systems using a GUID Partition Table (GPT); the boot loader will be installed into it. It is not necessary on UEFI systems. Also see Section A.2.10, “part (required) - Create Physical Partition”.
/boot/efi
An EFI System Partition. An EFI partition at least 50 MB in size is necessary on UEFI-based systems; the recommended size is 200 MB. It is not necessary on BIOS systems. Also see Section A.2.10, “part (required) - Create Physical Partition”.
--size=
The minimum partition size in megabytes. Specify an integer value here such as 500 (do not include the unit).

Important

If the --size value is too small, the installation will fail. Set the --size value as the minimum amount of space you require. For size recommendations, see Section 5.4.10.6, “Recommended Partitioning Scheme”.
--maxsize=
The maximum partition size in megabytes when the partition is set to grow. Specify an integer value here such as 500 (do not include the unit).
--resize
Resize an existing partition. When using this option, specify the new size (in megabytes) using the --size= option and the target partition using the --onpart= option.
--grow
Tells the partition to grow to fill available space (if any), or up to the maximum size setting.

Note

If you use --grow= without setting --maxsize= on a swap partition, Anaconda will limit the maximum size of the swap partition. For systems that have less than 2 GB of physical memory, the imposed limit is twice the amount of physical memory. For systems with more than 2 GB, the imposed limit is the size of physical memory plus 2 GB.
--noformat
Specifies that the partition should not be formatted, for use with the --onpart command.
--onpart= or --usepart=
Specifies the device on which to place the partition. For example:
partition /home --onpart=hda1
The above puts /home on /dev/hda1.
These options can also add a partition to a logical volume. For example:
partition pv.1 --onpart=hda2
The device must already exist on the system; the --onpart option will not create it.
--ondisk= or --ondrive=
Forces the partition to be created on a particular disk. For example, --ondisk=sdb puts the partition on the second SCSI disk on the system.
To specify a multipath device that does not use logical volume management (LVM), use the format disk/by-id/dm-uuid-mpath-WWID, where WWID is the world-wide identifier for the device. For example, to specify a disk with WWID 2416CD96995134CA5D787F00A5AA11017, use:
part / --fstype=xfs --grow --asprimary --size=8192 --ondisk=disk/by-id/dm-uuid-mpath-2416CD96995134CA5D787F00A5AA11017
Multipath devices that use LVM are not assembled until after Anaconda has parsed the Kickstart file. Therefore, you cannot specify these devices in the format dm-uuid-mpath. Instead, to specify a multipath device that uses LVM, use the format disk/by-id/scsi-WWID, where WWID is the world-wide identifier for the device. For example, to specify a disk with WWID 58095BEC5510947BE8C0360F604351918, use:
part / --fstype=xfs --grow --asprimary --size=8192 --ondisk=disk/by-id/scsi-58095BEC5510947BE8C0360F604351918

Warning

Never specify multipath devices by device names like mpatha. Device names such as this are not specific to a particular disk. The disk named /dev/mpatha during installation might not be the one that you expect it to be. Therefore, the clearpart command could target the wrong disk.
--asprimary
Forces the partition to be allocated as a primary partition. If the partition cannot be allocated as primary (usually due to too many primary partitions being already allocated), the partitioning process will fail. This option only makes sense when the disk uses a Master Boot Record (MBR); for GUID Partition Table (GPT)-labeled disks this option has no meaning. For information about primary (and extended) partitions, see Section 5.4.10.6, “Recommended Partitioning Scheme”.
--fsprofile=
Specifies a usage type to be passed to the program that makes a filesystem on this partition. A usage type defines a variety of tuning parameters to be used when making a filesystem. For this option to work, the filesystem must support the concept of usage types and there must be a configuration file that lists valid types. For ext2, ext3, ext4, this configuration file is /etc/mke2fs.conf.
--fstype=
Sets the file system type for the partition. Valid values are xfs, ext2, ext3, ext4, swap, vfat, efi and biosboot. For information about supported file systems, see Section 5.4.10.5, “Device, File System and RAID Types”.
--fsoptions=
Specifies a free form string of options to be used when mounting the filesystem. This string will be copied into the /etc/fstab file of the installed system and should be enclosed in quotes. For example:
--fsoptions="ro, x-systemd.device-timeout=0"
--mkfsoptions=
Specifies additional parameters to be passed to the program that makes a filesystem on this partition. No processing is done on the list of arguments, so they must be supplied in a format that can be passed directly to the mkfs program. This means multiple options should be comma-separated or surrounded by double quotes, depending on the filesystem.
--label=
Assign a label to an individual partition.
--recommended
Determine the size of the partition automatically. For details about the recommended scheme, see Section 5.4.10.6, “Recommended Partitioning Scheme”.

Important

This option can only be used for partitions which result in a file system such as the /boot partition and swap space. It can not be used to create partitionsm, LVM physical or logical volumes or RAID members.
--onbiosdisk
Forces the partition to be created on a particular disk as discovered by the BIOS.
--encrypted
Specifies that this partition should be encrypted, using the passphrase provided in the --passphrase option. If you do not specify a passphrase, Anaconda uses the default, system-wide passphrase set with the autopart --passphrase command, or stops the installation and prompts you to provide a passphrase if no default is set.
--passphrase=
Specifies the passphrase to use when encrypting this partition. You must use this option together with the --encrypted option; by itself it has no effect.
--cipher=
Specifies which type of encryption will be used if the Anaconda default aes-xts-plain64 is not satisfactory. You must use this option together with the --encrypted option; by itself it has no effect. Available types of encryption are listed in the Fedora Security Guide, available at http://docs.fedoraproject.org/. Using either aes-xts-plain64 or aes-cbc-essiv:sha256 is strongly recommended.
--escrowcert=URL_of_X.509_certificate
Stores data encryption keys of all encrypted volumes as files in /root, encrypted using the X.509 certificate from the URL specified with URL_of_X.509_certificate. The keys are stored as a separate file for each encrypted volume. This option is only meaningful if --encrypted is specified.
--backuppassphrase
Add a randomly-generated passphrase to each encrypted partition. Store these passphrases in separate files in /root, encrypted using the X.509 certificate specified with --escrowcert. This option is only meaningful if --escrowcert is specified.