Debian Codegraph @

upstream/fedora-44/man8/parted.8

raw
1 .TH PARTED 8 "2021 September 28" parted "GNU Parted Manual"
2 .SH NAME
3 parted \- a partition manipulation program
4 .SH SYNOPSIS
5 .B parted
6 [options] [device [command [options...]...]]
7 .SH DESCRIPTION
8 .B parted
9 is a program to manipulate disk partitions. It supports multiple partition
10 table formats, including MS-DOS and GPT. It is useful for creating space for
11 new operating systems, reorganising disk usage, and copying data to new hard
12 disks.
13 .PP
14 This manual page documents \fBparted\fP briefly. Complete documentation is
15 distributed with the package in GNU Info format.
16 .SH OPTIONS
17 .TP
18 .B -h, --help
19 displays a help message
20 .TP
21 .B -l, --list
22 lists partition layout on all block devices
23 .TP
24 .B -m, --machine
25 displays machine parseable output
26 .TP
27 .B -j, --json
28 displays JSON output
29 .TP
30 .B -s, --script
31 never prompts for user intervention
32 .TP
33 .B -f, --fix
34 automatically answer "fix" to exceptions in script mode
35 .TP
36 .B -v, --version
37 displays the version
38 .TP
39 .B -a \fIalignment-type\fP, --align \fIalignment-type\fP
40 Set alignment for newly created partitions, valid alignment types are:
41 .RS
42 .IP none
43 Use the minimum alignment allowed by the disk type.
44 .IP cylinder
45 Align partitions to cylinders.
46 .IP minimal
47 Use minimum alignment as given by the disk topology information. This and
48 the opt value will use layout information provided by the disk to align the
49 logical partition table addresses to actual physical blocks on the disks.
50 The min value is the minimum alignment needed to align the partition properly to
51 physical blocks, which avoids performance degradation.
52 .IP optimal
53 Use optimum alignment as given by the disk topology information. This
54 aligns to a multiple of the physical block size in a way that guarantees
55 optimal performance.
56 .RE
57 .SH COMMANDS
58 .TP
59 .B [device]
60 The block device to be used. When none is given, \fBparted\fP will use the
61 first block device it finds.
62 .TP
63 .B [command [options]]
64 Specifies the command to be executed. If no command is given, \fBparted\fP
65 will present a command prompt. Possible commands are:
66 .RS
67 .TP
68 .B help \fI[command]\fP
69 Print general help, or help on \fIcommand\fP if specified.
70 .TP
71 .B align-check \fItype\fP \fIpartition\fP
72 Check if \fIpartition\fP satisfies the alignment constraint of \fItype\fP.
73 \fItype\fP must be "minimal" or "optimal".
74 .TP
75 .B mklabel \fIlabel-type\fP
76 Create a new disklabel (partition table) of \fIlabel-type\fP. \fIlabel-type\fP
77 should be one of "aix", "amiga", "bsd", "dvh", "gpt", "loop", "mac", "msdos",
78 "pc98", or "sun".
79 .TP
80 .B mkpart [\fIpart-type\fP \fIname\fP \fIfs-type\fP] \fIstart\fP \fIend\fP
81 Create a new partition. \fIpart-type\fP may be specified only with msdos and
82 dvh partition tables, it should be one of "primary", "logical", or "extended".
83 \fIname\fP is required for GPT partition tables and \fIfs-type\fP is optional.
84 \fIfs-type\fP can be one of "btrfs", "ext2", "ext3", "ext4", "fat16", "fat32",
85 "hfs", "hfs+", "linux-swap", "ntfs", "reiserfs", "udf", or "xfs".
86 .TP
87 .B name \fIpartition\fP \fIname\fP
88 Set the name of \fIpartition\fP to \fIname\fP. This option works only on Mac,
89 PC98, and GPT disklabels. The name can be placed in double quotes, if necessary.
90 And depending on the shell may need to also be wrapped in single quotes so that
91 the shell doesn't strip off the double quotes.
92 .TP
93 .B print \fIprint-type\fP
94 Display the partition table.
95 \fIprint-type\fP is optional, and can be one of devices, free, list, or all.
96 .TP
97 .B quit
98 Exit from \fBparted\fP.
99 .TP
100 .B rescue \fIstart\fP \fIend\fP
101 Rescue a lost partition that was located somewhere between \fIstart\fP and
102 \fIend\fP. If a partition is found, \fBparted\fP will ask if you want to
103 create an entry for it in the partition table.
104 .TP
105 .B resizepart \fIpartition\fP \fIend\fP
106 Change the \fIend\fP position of \fIpartition\fP. Note that this does not
107 modify any filesystem present in the partition.
108 .TP
109 .B rm \fIpartition\fP
110 Delete \fIpartition\fP.
111 .TP
112 .B select \fIdevice\fP
113 Choose \fIdevice\fP as the current device to edit. \fIdevice\fP should usually
114 be a Linux hard disk device, but it can be a partition, software raid device,
115 or an LVM logical volume if necessary.
116 .TP
117 .B set \fIpartition\fP \fIflag\fP \fIstate\fP
118 Change the state of the \fIflag\fP on \fIpartition\fP to \fIstate\fP.
119 Supported flags are: "boot", "root", "swap", "hidden", "raid", "lvm", "lba",
120 "legacy_boot", "irst", "msftres", "esp", "chromeos_kernel", "bls_boot",
121 "linux-home", "no_automount", "bios_grub", and "palo".
122 \fIstate\fP should be either "on" or "off".
123 .TP
124 .B unit \fIunit\fP
125 Set \fIunit\fP as the unit to use when displaying locations and sizes, and for
126 interpreting those given by the user when not suffixed with an explicit unit.
127 \fIunit\fP can be one of "s" (sectors), "B" (bytes), "kB", "MB", "KiB", "MiB", "GB",
128 "GiB", "TB", "TiB", "%" (percentage of device size), "cyl" (cylinders), "chs"
129 (cylinders, heads, sectors), or "compact" (megabytes for input, and a
130 human-friendly form for output).
131 .TP
132 .B toggle \fIpartition\fP \fIflag\fP
133 Toggle the state of \fIflag\fP on \fIpartition\fP.
134 .TP
135 .B type \fIpartition\fP \fIid\fP or \fIuuid\fP
136 On MS-DOS set the type aka. partition id of \fIpartition\fP to
137 \fIid\fP. The \fIid\fP is a value between "0x01" and "0xff". On GPT
138 the type-uuid of \fIpartition\fP to \fIuuid\fP.
139 .TP
140 .B disk_set \fIflag\fP \fIstate\fP
141 Change a \fIflag\fP on the disk to \fIstate\fP. A flag can be either "on" or
142 "off". Some or all of these flags will be available, depending on what disk
143 abel you are using. Supported flags are: "pmbr_boot" on GPT to enable the
144 boot flag on the GPT's protective MBR partition.
145 .TP
146 .B disk_toggle \fIflag\fP
147 Toggle the state of the disk \fIflag\fP.
148 .TP
149 .B version
150 Display version information and a copyright message.
151 .RE
152 .SH UNITS
153 \fBparted\fP will compute sensible ranges for the locations you specify when using
154 units like "GB", "MB", etc. Use the sector unit "s" or IEC binary units like
155 "GiB", "MiB", to specify exact locations.
156 When you specify start or end values using IEC binary units like "MiB",
157 "GiB", "TiB", etc., \fBparted\fP treats those values as exact, and equivalent to
158 the same number specified in bytes (i.e., with the "B" suffix), in that it
159 provides no helpful range of sloppiness. Contrast that with a partition
160 start request of "4GB", which may actually resolve to some sector up to 500MB
161 before or after that point. Thus, when creating a partition in an exact
162 location you should use units of bytes ("B"), sectors ("s"), or IEC binary units
163 like "MiB", "GiB", but not "MB", "GB", etc.
164 .SH REPORTING BUGS
165 Report bugs to <[email protected]>
166 .SH SEE ALSO
167 .BR fdisk (8),
168 .BR mkfs (8),
169 The \fIparted\fP program is fully documented in the
170 .BR info (1)
171 format
172 .I "GNU partitioning software"
173 manual.
174 .SH AUTHOR
175 This manual page was written by Timshel Knoll <[email protected]>,
176 for the Debian GNU/Linux system (but may be used by others).