Debian Codegraph @

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