Debian Codegraph @

upstream/debian-trixie/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
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,
66 .BR parted
67 will present a command prompt. Possible commands are:
68 .RS
69 .TP
70 .B help \fI[command]\fP
71 Print general help, or help on \fIcommand\fP if specified.
72 .TP
73 .B align-check \fItype\fP \fIpartition\fP
74 Check if \fIpartition\fP satisfies the alignment constraint of \fItype\fP.
75 \fItype\fP must be "minimal" or "optimal".
76 .TP
77 .B mklabel \fIlabel-type\fP
78 Create a new disklabel (partition table) of \fIlabel-type\fP. \fIlabel-type\fP
79 should be one of "aix", "amiga", "bsd", "dvh", "gpt", "loop", "mac", "msdos",
80 "pc98", or "sun".
81 .TP
82 .B mkpart [\fIpart-type\fP \fIname\fP \fIfs-type\fP] \fIstart\fP \fIend\fP
83 Create a new partition. \fIpart-type\fP may be specified only with msdos and
84 dvh partition tables, it should be one of "primary", "logical", or "extended".
85 \fIname\fP is required for GPT partition tables and \fIfs-type\fP is optional.
86 \fIfs-type\fP can be one of "btrfs", "ext2", "ext3", "ext4", "fat16", "fat32",
87 "hfs", "hfs+", "linux-swap", "ntfs", "reiserfs", "udf", or "xfs".
88 .TP
89 .B name \fIpartition\fP \fIname\fP
90 Set the name of \fIpartition\fP to \fIname\fP. This option works only on Mac,
91 PC98, and GPT disklabels. The name can be placed in double quotes, if necessary.
92 And depending on the shell may need to also be wrapped in single quotes so that
93 the shell doesn't strip off the double quotes.
94 .TP
95 .B print \fIprint-type\fP
96 Display the partition table.
97 \fIprint-type\fP is optional, and can be one of devices, free, list, or all.
98 .TP
99 .B quit
100 Exit from \fBparted\fP.
101 .TP
102 .B rescue \fIstart\fP \fIend\fP
103 Rescue a lost partition that was located somewhere between \fIstart\fP and
104 \fIend\fP. If a partition is found, \fBparted\fP will ask if you want to
105 create an entry for it in the partition table.
106 .TP
107 .B resizepart \fIpartition\fP \fIend\fP
108 Change the \fIend\fP position of \fIpartition\fP. Note that this does not
109 modify any filesystem present in the partition.
110 .TP
111 .B rm \fIpartition\fP
112 Delete \fIpartition\fP.
113 .TP
114 .B select \fIdevice\fP
115 Choose \fIdevice\fP as the current device to edit. \fIdevice\fP should usually
116 be a Linux hard disk device, but it can be a partition, software raid device,
117 or an LVM logical volume if necessary.
118 .TP
119 .B set \fIpartition\fP \fIflag\fP \fIstate\fP
120 Change the state of the \fIflag\fP on \fIpartition\fP to \fIstate\fP.
121 Supported flags are: "boot", "root", "swap", "hidden", "raid", "lvm", "lba",
122 "legacy_boot", "irst", "msftres", "esp", "chromeos_kernel", "bls_boot", "linux-home",
123 "no_automount", "bios_grub", and "palo".
124 \fIstate\fP should be either "on" or "off".
125 .TP
126 .B unit \fIunit\fP
127 Set \fIunit\fP as the unit to use when displaying locations and sizes, and for
128 interpreting those given by the user when not suffixed with an explicit unit.
129 \fIunit\fP can be one of "s" (sectors), "B" (bytes), "kB", "MB", "KiB", "MiB", "GB",
130 "GiB", "TB", "TiB", "%" (percentage of device size), "cyl" (cylinders), "chs"
131 (cylinders, heads, sectors), or "compact" (megabytes for input, and a
132 human-friendly form for output).
133 .TP
134 .B toggle \fIpartition\fP \fIflag\fP
135 Toggle the state of \fIflag\fP on \fIpartition\fP.
136 .TP
137 .B type \fIpartition\fP \fIid\fP or \fIuuid\fP
138 On MS-DOS set the type aka. partition id of \fIpartition\fP to
139 \fIid\fP. The \fIid\fP is a value between "0x01" and "0xff". On GPT
140 the type-uuid of \fIpartition\fP to \fIuuid\fP.
141 .TP
142 .B disk_set \fIflag\fP \fIstate\fP
143 Change a \fIflag\fP on the disk to \fIstate\fP. A flag can be either "on" or "off".
144 Some or all of these flags will be available, depending on what disk label you
145 are using. Supported flags are: "pmbr_boot" on GPT to enable the boot flag on the
146 GPT's protective MBR partition.
147 .TP
148 .B disk_toggle \fIflag\fP
149 Toggle the state of the disk \fIflag\fP.
150 .TP
151 .B version
152 Display version information and a copyright message.
153 .RE
154 .SH REPORTING BUGS
155 Report bugs to <[email protected]>
156 .SH SEE ALSO
157 .BR fdisk (8),
158 .BR mkfs (8),
159 The \fIparted\fP program is fully documented in the
160 .BR info(1)
161 format
162 .IR "GNU partitioning software"
163 manual which is distributed with the parted-doc Debian package.
164 .SH AUTHOR
165 This manual page was written by Timshel Knoll <[email protected]>,
166 for the Debian GNU/Linux system (but may be used by others).