parted
parted is a disk partitioning and partition resizing program. It allows you to create, destroy, resize, move and copy ext2, ext3, linux-swap, FAT and FAT32 partitions. This is useful for creating space for new operating systems, reorganising disk usage, and copying data to new hard disks.[1]
- GNU Project Homepage [EN]
- parted [EN] @ Fedora Package
Documentation
- man 8 'parted' [EN]
Syntax
parted [PARAMETER ...] [DEVICE]
Parameters
- -a TYPE, --align TYPE
- Set alignment for newly created partitions, valid alignment types are: none, cylinder, minimal and optimal.
Commands
- align-check TYPE [NUMBER]
- Determine whether the starting sector of partition NUMBER meets the disk’s selected alignment criteria. TYPE must be minimal, optimal or an abbreviation.
- mklabel LABEL
- Creates a new disk label, of type label-type. The new disk label will have no partitions. This command (normally) won’t technically destroy your data, but it will make it basically unusable, and you will need to use the rescue command to recover any partitions. Parted works on all partition tables.
- LABEL must be one of these supported disk labels:
- bsd
- loop (raw disk access)
- gpt
- mac
- msdos
- pc98
- sun
- 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:
- ext2
- fat16, fat32
- hfs, hfs+, hfsx
- linux-swap
- NTFS
- reiserfs
- ufs
- btrfs
- quit
- Quits Parted.
- print [NUMBER]
- Displays the partition table on the device parted is editing, or detailed information about a particular partition.
- set NUMBER FLAG STATE
- Changes a flag on the partition with number number. A flag can be either on or off. Some or all of these flags will be available, depending on what disk label you are using:
- bios_grub
- Enable this to record that the selected partition is a GRUB BIOS partition (GPT only).
References
- ↑ man 8 'parted'