]> git.ipfire.org Git - thirdparty/util-linux.git/blob - disk-utils/sfdisk.8
Manual pages: wording fix: "another" ==> "other"
[thirdparty/util-linux.git] / disk-utils / sfdisk.8
1 .\" sfdisk.8 -- man page for sfdisk
2 .\" Copyright (C) 2014 Karel Zak <kzak@redhat.com>
3 .\"
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
7 .\"
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
12 .\"
13 .TH SFDISK 8 "June 2015" "util-linux" "System Administration"
14 .SH NAME
15 sfdisk \- display or manipulate a disk partition table
16 .SH SYNOPSIS
17 .B sfdisk
18 [options]
19 .I device
20 .RB [ \-N
21 .IR partition-number ]
22 .sp
23 .B sfdisk
24 [options]
25 .I command
26 .SH DESCRIPTION
27 .B sfdisk
28 is a script-oriented tool for partitioning any block device. It
29 runs in interactive mode if executed on terminal (stdin refers to a terminal).
30
31 Since version 2.26
32 .B sfdisk
33 supports MBR (DOS), GPT, SUN and SGI disk labels, but no longer provides any
34 functionality for CHS (Cylinder-Head-Sector) addressing. CHS has
35 never been important for Linux, and this addressing concept does not make any
36 sense for new devices.
37 .sp
38 .B sfdisk
39 (since version 2.26)
40 .B aligns the start and end of partitions
41 to block-device I/O limits when relative sizes are specified, when the default
42 values are used or when multiplicative suffixes (e.g., MiB) are used for sizes.
43 It is possible that partition size will be optimized (reduced or enlarged) due
44 to alignment if the start offset is specified exactly in sectors and partition
45 size relative or by multiplicative suffixes.
46
47 The recommended way is not to specify start offsets at all and specify
48 partition size in MiB, GiB (or so). In this case sfdisk align all partitions
49 to block-device I/O limits (or when I/O limits are too small then to megabyte
50 boundary to keep disk layout portable). If this default behaviour is unwanted
51 (usually for very small partitions) then specify offsets and sizes in
52 sectors. In this case sfdisk entirely follows specified numbers without any
53 optimization.
54 .sp
55 .B sfdisk
56 does not create the standard system partitions for SGI and SUN disk labels like
57 .BR fdisk (8)
58 does.
59 It is necessary to explicitly create all partitions including whole-disk system
60 partitions.
61
62 .B sfdisk
63 uses BLKRRPART (reread partition table) ioctl to make sure that the device is
64 not used by system or other tools (see also \-\-no-reread). It's possible that
65 this feature or another sfdisk activity races with \fBudevd\fR. The recommended way
66 how to avoid possible collisions is to use \fB\-\-lock\fR option.
67 The exclusive lock will cause udevd to skip the event handling on the device.
68 .PP
69 The sfdisk prompt is only a hint for users and a displayed partition number does
70 not mean that the same partition table entry will be created (if -N not
71 specified), especially for tables with gaps.
72
73 .SH COMMANDS
74 The commands are mutually exclusive.
75 .TP
76 .RB [ \-N " \fIpartition-number\fR] " \fIdevice\fR
77 The default \fBsfdisk\fR command is to read the specification for the desired
78 partitioning of \fIdevice\fR from standard input, and then create a partition
79 table according to the specification. See below for the description of the
80 input format. If standard input is a terminal, then \fBsfdisk\fR starts an
81 interactive session.
82 .sp
83 If the option \fB\-N\fR is specified, then the changes are applied to
84 the partition addressed by \fIpartition-number\fR. The unspecified fields
85 of the partition are not modified.
86 .sp
87 Note that it's possible to address an unused partition with \fB\-N\fR.
88 For example, an MBR always contains 4 partitions, but the number of used
89 partitions may be smaller. In this case \fBsfdisk\fR follows the default
90 values from the partition table and does not use built-in defaults for the
91 unused partition given with \fB\-N\fR. See also \fB\-\-append\fR.
92 .TP
93 .BR \-A , " \-\-activate \fIdevice " [ \fIpartition-number...]
94 Switch on the bootable flag for the specified partitions and switch off the
95 bootable flag on all unspecified partitions. The special placeholder '\-'
96 may be used instead of the partition numbers to switch off the bootable flag
97 on all partitions.
98
99 The activation command is supported for MBR and PMBR only. If GPT label is detected
100 than sfdisk prints warning and automatically enter PMBR.
101
102 If no \fIpartition-number\fR is specified, then list the partitions with an
103 enabled flag.
104 .TP
105 .BR "\-\-delete \fIdevice " [ \fIpartition-number ...]
106 Delete all or the specified partitions.
107 .TP
108 .BR \-d , " \-\-dump " \fIdevice\fR
109 Dump the partitions of a device in a format that is usable as input to \fBsfdisk\fR.
110 See the section \fBBACKING UP THE PARTITION TABLE\fR.
111 .TP
112 .BR \-g , " \-\-show\-geometry " [ \fIdevice ...]
113 List the geometry of all or the specified devices. For backward
114 compatibility the deprecated option \fB\-\-show\-pt\-geometry\fR have the same
115 meaning as this one.
116 .TP
117 .BR \-J , " \-\-json " \fIdevice\fR
118 Dump the partitions of a device in JSON format. Note that \fBsfdisk\fR is
119 not able to use JSON as input format.
120 .TP
121 .BR \-l , " \-\-list " [ \fIdevice ...]
122 List the partitions of all or the specified devices. This command can be used
123 together with \fB\-\-verify\fR.
124 .TP
125 .BR \-F , " \-\-list-free " [ \fIdevice ...]
126 List the free unpartitioned areas on all or the specified devices.
127 .TP
128 .BR "\-\-part\-attrs \fIdevice partition-number " [ \fIattributes ]
129 Change the GPT partition attribute bits. If \fIattributes\fR is not specified,
130 then print the current partition settings.
131 .sp
132 The \fIattributes\fR argument is a
133 comma- or space-delimited list of bits. The currently supported attribute
134 bits are: RequiredPartition, NoBlockIOProtocol, LegacyBIOSBootable
135 and GUID-specific bits in the range from 48 to 63. For example, the string
136 "RequiredPartition,50,51" sets three bits.
137 .TP
138 .BR "\-\-part\-label \fIdevice partition-number " [ \fIlabel ]
139 Change the GPT partition name (label). If \fIlabel\fR is not specified,
140 then print the current partition label.
141 .TP
142 .BR "\-\-part\-type \fIdevice partition-number " [ \fItype ]
143 Change the partition type. If \fItype\fR is not specified, then print the
144 current partition type.
145 .sp
146 The \fItype\fR argument is hexadecimal for MBR,
147 GUID for GPT, type alias (e.g. "linux") or type shortcut (e.g. 'L').
148 For backward compatibility the options \fB\-c\fR and
149 \fB\-\-id\fR have the same meaning as this one.
150 .TP
151 .BR "\-\-part\-uuid \fIdevice partition-number " [ \fIuuid ]
152 Change the GPT partition UUID. If \fIuuid\fR is not specified,
153 then print the current partition UUID.
154 .TP
155 .BR "\-\-disk\-id \fIdevice " [ \fIid ]
156 Change the disk identifier. If \fIid\fR is not specified,
157 then print the current identifier. The identifier is UUID for GPT
158 or unsigned integer for MBR.
159 .TP
160 .BR \-r , " \-\-reorder " \fIdevice
161 Renumber the partitions, ordering them by their start offset.
162 .TP
163 .BR \-s , " \-\-show\-size " [ \fIdevice ...]
164 List the sizes of all or the specified devices in units of 1024 byte size.
165 This command is DEPRECATED in favour of
166 .BR blockdev (8).
167 .TP
168 .BR \-T , " \-\-list\-types"
169 Print all supported types for the current disk label or the label specified by
170 \fB\-\-label\fR.
171 .TP
172 .BR \-V , " \-\-verify " [ \fIdevice ...]
173 Test whether the partition table and partitions seem correct.
174 .TP
175 .BR "\-\-relocate \fIoper " \fIdevice
176 Relocate partition table header. This command is currently supported for GPT header only.
177 The argument \fIoper\fP can be:
178 .RS
179 .TP
180 .B gpt-bak-std
181 Move GPT backup header to the standard location at the end of the device.
182 .TP
183 .B gpt-bak-mini
184 Move GPT backup header behind the last partition. Note that UEFI
185 standard requires the backup header at the end of the device and partitioning
186 tools can automatically relocate the header to follow the standard.
187 .RE
188 .SH OPTIONS
189 .TP
190 .BR \-a , " \-\-append"
191 Don't create a new partition table, but only append the specified partitions.
192 .sp
193 Note that unused partition maybe be re-used in this case although it is not the
194 last partition in the partition table. See also \fB\-N\fR to specify entry in
195 the partition table.
196 .TP
197 .BR \-b , " \-\-backup"
198 Back up the current partition table sectors before starting the partitioning.
199 The default backup file name is ~/sfdisk-<device>-<offset>.bak; to use another
200 name see option \fB\-O\fR, \fB\-\-backup\-file\fR.
201 .TP
202 .BR \-\-color [ =\fIwhen ]
203 Colorize the output. The optional argument \fIwhen\fP
204 can be \fBauto\fR, \fBnever\fR or \fBalways\fR. If the \fIwhen\fR argument is omitted,
205 it defaults to \fBauto\fR. The colors can be disabled; for the current built-in default
206 see the \fB\-\-help\fR output. See also the \fBCOLORS\fR section.
207 .TP
208 .BR \-f , " \-\-force"
209 Disable all consistency checking.
210 .TP
211 .B \-\-Linux
212 Deprecated and ignored option. Partitioning that is compatible with
213 Linux (and other modern operating systems) is the default.
214 .TP
215 \fB\-\-lock\fR[=\fImode\fR]
216 Use exclusive BSD lock for device or file it operates. The optional argument
217 \fImode\fP can be \fByes\fR, \fBno\fR (or 1 and 0) or \fBnonblock\fR. If the \fImode\fR
218 argument is omitted, it defaults to \fB"yes"\fR. This option overwrites
219 environment variable \fB$LOCK_BLOCK_DEVICE\fR. The default is not to use any
220 lock at all, but it's recommended to avoid collisions with udevd or other
221 tools.
222 .TP
223 .BR \-n , " \-\-no\-act"
224 Do everything except writing to the device.
225 .TP
226 .B \-\-no\-reread
227 Do not check through the re-read-partition-table ioctl whether the device is in use.
228 .TP
229 .B \-\-no\-tell\-kernel
230 Don't tell the kernel about partition changes. This option is recommended together
231 with \fB\-\-no\-reread\fR to modify a partition on used disk. The modified partition
232 should not be used (e.g., mounted).
233 .TP
234 .BR \-O , " \-\-backup\-file " \fIpath
235 Override the default backup file name. Note that the device name and offset
236 are always appended to the file name.
237 .TP
238 .BR \-\-move-data [ =\fIpath ]
239 Move data after partition relocation, for example when moving the beginning
240 of a partition to another place on the disk. The size of the partition has
241 to remain the same, the new and old location may overlap. This option requires
242 option \fB\-N\fR in order to be processed on one specific partition only.
243
244 The optional \fIpath\fR specifies log file name. The log file contains information
245 about all read/write operations on the partition data. The word "@default" as
246 a \fIpath\fR forces sfdisk to use ~/sfdisk-<devname>.move for the log. The log is
247 optional since v2.35.
248
249 Note that this operation is risky and not atomic. \fBDon't forget to backup your data!\fR
250
251 See also \fB\-\-move\-use\-fsync\fR.
252
253 In the example below, the first command creates a 100MiB free area before
254 the first partition and moves the data it contains (e.g., a filesystem),
255 the next command creates a new partition from the free space (at offset 2048),
256 and the last command reorders partitions to match disk order
257 (the original sdc1 will become sdc2).
258 .RS
259 .sp
260 .B "echo '+100M,' | sfdisk \-\-move-data /dev/sdc \-N 1"
261 .br
262 .B "echo '2048,' | sfdisk /dev/sdc \-\-append
263 .br
264 .B sfdisk /dev/sdc \-\-reorder
265 .sp
266 .RE
267
268 .TP
269 .B \-\-move\-use\-fsync
270 Use fsync system call after each write when move data to a new location by
271 \fB\-\-move\-data\fR.
272 .TP
273 .BR \-o , " \-\-output " \fIlist
274 Specify which output columns to print. Use
275 .B \-\-help
276 to get a list of all supported columns.
277 .sp
278 The default list of columns may be extended if \fIlist\fP is
279 specified in the format \fI+list\fP (e.g., \fB\-o +UUID\fP).
280 .TP
281 .BR \-q , " \-\-quiet"
282 Suppress extra info messages.
283 .TP
284 .BR \-u , " \-\-unit S"
285 Deprecated option. Only the sector unit is supported. This option is not
286 supported when using the \-\-show-size command.
287 .TP
288 .BR \-X , " \-\-label " \fItype
289 Specify the disk label type (e.g., \fBdos\fR, \fBgpt\fR, ...). If this option
290 is not given, then \fBsfdisk\fR defaults to the existing label, but if there
291 is no label on the device yet, then the type defaults to \fBdos\fR. The default
292 or the current label may be overwritten by the "label: <name>" script header
293 line. The option \fB\-\-label\fR does not force \fBsfdisk\fR to create empty
294 disk label (see the \fBEMPTY DISK LABEL\fR section below).
295 .TP
296 .BR \-Y , " \-\-label\-nested " \fItype
297 Force editing of a nested disk label. The primary disk label has to exist already.
298 This option allows to edit for example a hybrid/protective MBR on devices with GPT.
299
300 .TP
301 .BR \-w , " \-\-wipe "\fIwhen
302 Wipe filesystem, RAID and partition-table signatures from the device, in order
303 to avoid possible collisions. The argument \fIwhen\fR can be \fBauto\fR,
304 \fBnever\fR or \fBalways\fR. When this option is not given, the default is
305 \fBauto\fR, in which case signatures are wiped only when in interactive mode;
306 except the old partition-table signatures which are always wiped before create
307 a new partition-table if the argument \fIwhen\fR is not \fBnever\fR. In all
308 cases detected signatures are reported by warning messages before a new
309 partition table is created. See also
310 .BR wipefs (8)
311 command.
312
313 .TP
314 .BR \-W , " \-\-wipe-partitions "\fIwhen
315 Wipe filesystem, RAID and partition-table signatures from a newly created
316 partitions, in order to avoid possible collisions. The argument \fIwhen\fR can
317 be \fBauto\fR, \fBnever\fR or \fBalways\fR. When this option is not given, the
318 default is \fBauto\fR, in which case signatures are wiped only when in
319 interactive mode and after confirmation by user. In all cases detected
320 signatures are reported by warning messages after a new partition is created.
321 See also
322 .BR wipefs (8)
323 command.
324
325 .TP
326 .BR \-v , " \-\-version"
327 Display version information and exit.
328 .TP
329 .BR \-h , " \-\-help"
330 Display help text and exit.
331
332 .SH INPUT FORMATS
333 .B sfdisk
334 supports two input formats and generic header lines.
335
336 .B Header lines
337 .RS
338 The optional header lines specify generic information that apply to the partition
339 table. The header-line format is:
340 .RS
341 .sp
342 .B "<name>: <value>"
343 .sp
344 .RE
345 The currently recognized headers are:
346 .RS
347 .TP
348 .B unit
349 Specify the partitioning unit. The only supported unit is \fBsectors\fR.
350 .TP
351 .B label
352 Specify the partition table type. For example \fBdos\fR or \fBgpt\fR.
353 .TP
354 .B label-id
355 Specify the partition table identifier. It should be a hexadecimal number
356 (with a 0x prefix) for MBR and a UUID for GPT.
357 .TP
358 .B first-lba
359 Specify the first usable sector for GPT partitions.
360 .TP
361 .B last-lba
362 Specify the last usable sector for GPT partitions.
363 .TP
364 .B table-length
365 Specify the maximal number of GPT partitions.
366 .TP
367 .B grain
368 Specify minimal size in bytes used to calculate partitions alignment. The
369 default is 1MiB and it's strongly recommended to use the default. Do not
370 modify this variable if you're not sure.
371 .TP
372 .B sector-size
373 Specify sector size. This header is informative only and it is not used when
374 sfdisk creates a new partition table, in this case the real device specific
375 value is always used and sector size from the dump is ignored.
376 .RE
377 .sp
378 Note that it is only possible to use header lines before the first partition
379 is specified in the input.
380 .RE
381
382 .B Unnamed-fields format
383 .RS
384 .RS
385 .sp
386 .I start size type bootable
387 .sp
388 .RE
389 where each line fills one partition descriptor.
390 .sp
391 Fields are separated by whitespace, comma or semicolon possibly
392 followed by whitespace; initial and trailing whitespace is ignored.
393 Numbers can be octal, decimal or hexadecimal; decimal is the default.
394 When a field is absent, empty or specified as '\-' a default value is
395 used. But when the \fB\-N\fR option (change a single partition) is
396 given, the default for each field is its previous value.
397 .sp
398 The default value of
399 .I start
400 is the first non-assigned sector aligned according to device I/O limits.
401 The default start offset for the first partition is 1 MiB. The offset may
402 be followed by the multiplicative suffixes (KiB, MiB, GiB, TiB, PiB,
403 EiB, ZiB and YiB) then the number is interpreted as offset in bytes.
404 .sp
405 The default value of
406 .I size
407 indicates "as much as possible"; i.e., until the next partition or
408 end-of-device. A numerical argument is by default interpreted as a
409 number of sectors, however if the size is followed by one of the
410 multiplicative suffixes (KiB, MiB, GiB, TiB, PiB, EiB, ZiB and YiB)
411 then the number is interpreted as the size of the partition in bytes
412 and it is then aligned according to the device I/O limits. A '+' can
413 be used instead of a number to enlarge the partition as much as
414 possible. Note '+' is equivalent to the default behaviour for a new
415 partition; existing partitions will be resized as required.
416 .sp
417 The partition
418 .I type
419 is given in hex for MBR (DOS) where 0x prefix is optional; a GUID string for
420 GPT; a shortcut or an alias. It's recommended to use two letters for MBR hex codes to
421 avoid collision between deprecated shortcut 'E' and '0E' MBR hex code. For backward
422 compatibility sfdisk tries to interpret
423 .I type
424 as a shortcut as a first possibility in partitioning scripts although on other places (e.g.
425 \fB\-\-part-type command)\fR it tries shortcuts as the last possibility.
426
427 Since v2.36 libfdisk supports partition type aliases as extension to shortcuts. The alias is a
428 simple human readable word (e.g. "linux").
429
430 Supported shortcuts and aliases:
431 .RS
432 .TP
433 .B L - alias 'linux'
434 Linux; means 83 for MBR and 0FC63DAF-8483-4772-8E79-3D69D8477DE4 for GPT.
435 .TP
436 .B S - alias 'swap'
437 swap area; means 82 for MBR and 0657FD6D-A4AB-43C4-84E5-0933C84B4F4F for GPT
438 .TP
439 .B Ex - alias 'extended'
440 MBR extended partition; means 05 for MBR. The original shortcut 'E' is deprecated due to collision with
441 0x0E MBR partition type.
442 .TP
443 .B H - alias 'home'
444 home partition; means 933AC7E1-2EB4-4F13-B844-0E14E2AEF915 for GPT
445 .TP
446 .B U - alias 'uefi'
447 EFI System partition, means EF for MBR and C12A7328-F81F-11D2-BA4B-00A0C93EC93B for GPT
448 .TP
449 .B R - alias 'raid'
450 Linux RAID; means FD for MBR and A19D880F-05FC-4D3B-A006-743F0F84911E for GPT
451 .TP
452 .B V - alias 'lvm'
453 LVM; means 8E for MBR and E6D6D379-F507-44C2-A23C-238F2A3DF928 for GPT
454 .RE
455 .PP
456 The default
457 .I type
458 value is
459 .I linux
460 .sp
461 The shortcut 'X' for Linux extended partition (85) is deprecated in favour of 'Ex'.
462
463 .I bootable
464 is specified as [\fB*\fR|\fB-\fR], with as default not-bootable. The
465 value of this field is irrelevant for Linux - when Linux runs it has
466 been booted already - but it might play a role for certain boot
467 loaders and for other operating systems.
468 .RE
469
470 .B Named-fields format
471 .RS
472 This format is more readable, robust, extensible and allows to specify additional
473 information (e.g., a UUID). It is recommended to use this format to keep your scripts
474 more readable.
475 .RS
476 .sp
477 .RI [ "device \fB:" ] " name" [\fB= value "], ..."
478 .sp
479 .RE
480 The
481 .I device
482 field is optional. \fBsfdisk\fR extracts the partition number from the
483 device name. It allows to specify the partitions in random order.
484 This functionality is mostly used by \fB\-\-dump\fR.
485 Don't use it if you are not sure.
486
487 The
488 .I value
489 can be between quotation marks (e.g., name="This is partition name").
490 The currently supported fields are:
491 .RS
492 .TP
493 .BI start= number
494 The first non-assigned sector aligned according to device I/O limits. The default
495 start offset for the first partition is 1 MiB. The offset may be followed by
496 the multiplicative suffixes (KiB, MiB, GiB, TiB, PiB, EiB, ZiB and YiB) then
497 the number is interpreted as offset in bytes.
498 .TP
499 .BI size= number
500 Specify the partition size in sectors. The number may be followed by the multiplicative
501 suffixes (KiB, MiB, GiB, TiB, PiB, EiB, ZiB and YiB), then it's interpreted as size
502 in bytes and the size is aligned according to device I/O limits.
503 .TP
504 .B bootable
505 Mark the partition as bootable.
506 .TP
507 .BI attrs= string
508 Partition attributes, usually GPT partition attribute bits. See
509 \fB\-\-part\-attrs\fR for more details about the GPT-bits string format.
510 .TP
511 .BI uuid= string
512 GPT partition UUID.
513 .TP
514 .BI name= string
515 GPT partition name.
516 .TP
517 .BI type= code
518 A hexadecimal number (without 0x) for an MBR partition, a GUID for a GPT partition,
519 or a shortcut as for unnamed-fields format.
520 For backward compatibility the \fBId=\fR field has the same meaning.
521 .RE
522 .RE
523
524 .SH EMPTY DISK LABEL
525 .B sfdisk
526 does not create partition table without partitions by default. The lines with
527 partitions are expected in the script by default. The empty partition table has
528 to be explicitly requested by "label: <name>" script header line without any
529 partitions lines. For example:
530 .RS
531 .sp
532 .B "echo 'label: gpt' | sfdisk /dev/sdb"
533 .sp
534 .RE
535 creates empty GPT partition table. Note that the \fB\-\-append\fR disables this feature.
536
537 .SH BACKING UP THE PARTITION TABLE
538 It is recommended to save the layout of your devices.
539 .B sfdisk
540 supports two ways.
541 .sp
542 Use the \fB\-\-dump\fR option to save a description of the device layout
543 to a text file. The dump format is suitable for later \fBsfdisk\fR input.
544 For example:
545 .RS
546 .sp
547 .B "sfdisk \-\-dump /dev/sda > sda.dump"
548 .sp
549 .RE
550 This can later be restored by:
551 .RS
552 .sp
553 .B "sfdisk /dev/sda < sda.dump"
554 .RE
555
556 If you want to do a full (binary) backup of all sectors where the
557 partition table is stored,
558 then use the \fB\-\-backup\fR option. It writes the sectors to
559 ~/sfdisk-<device>-<offset>.bak files. The default name of the backup file can
560 be changed with the \fB\-\-backup\-file\fR option. The backup files
561 contain only raw data from the \fIdevice\fR.
562 Note that the same concept of backup files is used by
563 .BR wipefs (8).
564 For example:
565 .RS
566 .sp
567 .B "sfdisk \-\-backup /dev/sda"
568 .sp
569 .RE
570 The GPT header can later be restored by:
571 .RS
572 .sp
573 .nf
574 .B "dd if=~/sfdisk-sda-0x00000200.bak of=/dev/sda \e"
575 .B " seek=$((0x00000200)) bs=1 conv=notrunc"
576 .fi
577 .sp
578 .RE
579 Note that \fBsfdisk\fR since version 2.26 no longer provides the \fB\-I\fR option to
580 restore sectors.
581 .BR dd (1)
582 provides all necessary functionality.
583
584 .SH COLORS
585 Implicit coloring can be disabled by an empty file \fI/etc/terminal-colors.d/sfdisk.disable\fR.
586
587 See
588 .BR terminal-colors.d (5)
589 for more details about colorization configuration. The logical color names
590 supported by
591 .B sfdisk
592 are:
593 .TP
594 .B header
595 The header of the output tables.
596 .TP
597 .B warn
598 The warning messages.
599 .TP
600 .B welcome
601 The welcome message.
602
603 .SH ENVIRONMENT
604 .IP SFDISK_DEBUG=all
605 enables sfdisk debug output.
606 .IP LIBFDISK_DEBUG=all
607 enables libfdisk debug output.
608 .IP LIBBLKID_DEBUG=all
609 enables libblkid debug output.
610 .IP LIBSMARTCOLS_DEBUG=all
611 enables libsmartcols debug output.
612 .IP LOCK_BLOCK_DEVICE=<mode>
613 use exclusive BSD lock. The mode is "1" or "0". See \fB\-\-lock\fR for more details.
614
615 .SH NOTES
616 Since version 2.26 \fBsfdisk\fR no longer provides the \fB\-R\fR or
617 \fB\-\-re\-read\fR option to force the kernel to reread the partition table.
618 Use \fBblockdev \-\-rereadpt\fR instead.
619 .PP
620 Since version 2.26 \fBsfdisk\fR does not provide the \fB\-\-DOS\fR, \fB\-\-IBM\fR, \fB\-\-DOS\-extended\fR,
621 \fB\-\-unhide\fR, \fB\-\-show\-extended\fR, \fB\-\-cylinders\fR, \fB\-\-heads\fR, \fB\-\-sectors\fR,
622 \fB\-\-inside\-outer\fR, \fB\-\-not\-inside\-outer\fR options.
623
624 .SH AUTHORS
625 Karel Zak <kzak@redhat.com>
626 .PP
627 The current sfdisk implementation is based on the original sfdisk
628 from Andries E. Brouwer.
629
630 .SH SEE ALSO
631 .BR fdisk (8),
632 .BR cfdisk (8),
633 .BR parted (8),
634 .BR partprobe (8),
635 .BR partx (8)
636
637 .SH AVAILABILITY
638 The sfdisk command is part of the util-linux package and is available from
639 https://www.kernel.org/pub/linux/utils/util-linux/.