Next: , Previous: mklabel, Up: Command explanations

2.4.5 mkpart

— Command: mkpart [part-type fs-type name] start end

Creates a new partition, without creating a new file system on that partition. This is useful for creating partitions for file systems (or LVM, etc.) that Parted doesn't support. You may specify a file system type, to set the appropriate partition code in the partition table for the new partition. fs-type is required for data partitions (i.e., non-extended partitions). start and end are the offset from the beginning of the disk, that is, the “distance” from the start of the disk.

part-type is one of ‘primary’, ‘extended’ or ‘logical’, and may be specified only with ‘msdos’ or ‘dvh’ partition tables. A name must be specified for a ‘gpt’ partition table. Neither part-type nor name may be used with a ‘sun’ partition table.

fs-type must be one of these supported file systems:


          (parted) mkpart logical 0.0 692.1

Create a logical partition that will contain an ext2 file system. The partition will start at the beginning of the disk, and end 692.1 megabytes into the disk.