Debian Codegraph @

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