summaryrefslogtreecommitdiffstats
path: root/disk-utils/cfdisk.8
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 14:30:35 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 14:30:35 +0000
commit378c18e5f024ac5a8aef4cb40d7c9aa9633d144c (patch)
tree44dfb6ca500d32cabd450649b322a42e70a30683 /disk-utils/cfdisk.8
parentInitial commit. (diff)
downloadutil-linux-378c18e5f024ac5a8aef4cb40d7c9aa9633d144c.tar.xz
util-linux-378c18e5f024ac5a8aef4cb40d7c9aa9633d144c.zip
Adding upstream version 2.38.1.upstream/2.38.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--disk-utils/cfdisk.8238
-rw-r--r--disk-utils/cfdisk.8.adoc159
2 files changed, 397 insertions, 0 deletions
diff --git a/disk-utils/cfdisk.8 b/disk-utils/cfdisk.8
new file mode 100644
index 0000000..9b85d24
--- /dev/null
+++ b/disk-utils/cfdisk.8
@@ -0,0 +1,238 @@
+'\" t
+.\" Title: cfdisk
+.\" Author: [see the "AUTHOR(S)" section]
+.\" Generator: Asciidoctor 2.0.15
+.\" Date: 2022-05-11
+.\" Manual: System Administration
+.\" Source: util-linux 2.38.1
+.\" Language: English
+.\"
+.TH "CFDISK" "8" "2022-05-11" "util\-linux 2.38.1" "System Administration"
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.ss \n[.ss] 0
+.nh
+.ad l
+.de URL
+\fI\\$2\fP <\\$1>\\$3
+..
+.als MTO URL
+.if \n[.g] \{\
+. mso www.tmac
+. am URL
+. ad l
+. .
+. am MTO
+. ad l
+. .
+. LINKSTYLE blue R < >
+.\}
+.SH "NAME"
+cfdisk \- display or manipulate a disk partition table
+.SH "SYNOPSIS"
+.sp
+\fBcfdisk\fP [options] [\fIdevice\fP]
+.SH "DESCRIPTION"
+.sp
+\fBcfdisk\fP is a curses\-based program for partitioning any block device. The default device is \fI/dev/sda\fP.
+.sp
+Note that \fBcfdisk\fP provides basic partitioning functionality with a user\-friendly interface. If you need advanced features, use \fBfdisk\fP(8) instead.
+.sp
+All disk label changes will remain in memory only, and the disk will be unmodified until you decide to write your changes. Be careful before using the write command.
+.sp
+Since version 2.25 \fBcfdisk\fP supports MBR (DOS), GPT, SUN and SGI disk labels, but no longer provides any functionality for CHS (Cylinder\-Head\-Sector) addressing. CHS has never been important for Linux, and this addressing concept does not make any sense for new devices.
+.sp
+Since version 2.25 \fBcfdisk\fP also does not provide a \(aqprint\(aq command any more. This functionality is provided by the utilities \fBpartx\fP(8) and \fBlsblk\fP(8) in a very comfortable and rich way.
+.sp
+If you want to remove an old partition table from a device, use \fBwipefs\fP(8).
+.SH "OPTIONS"
+.sp
+\fB\-h\fP, \fB\-\-help\fP
+.RS 4
+Display help text and exit.
+.RE
+.sp
+\fB\-V\fP, \fB\-\-version\fP
+.RS 4
+Print version and exit.
+.RE
+.sp
+\fB\-L\fP, \fB\-\-color\fP[\fB=\fP\fIwhen\fP]
+.RS 4
+Colorize the output. The optional argument \fIwhen\fP can be \fBauto\fP, \fBnever\fP or \fBalways\fP. If the \fIwhen\fP argument is omitted, it defaults to \fBauto\fP. The colors can be disabled, for the current built\-in default see \fB\-\-help\fP output. See also the \fBCOLORS\fP section.
+.RE
+.sp
+\fB\-\-lock\fP[=\fImode\fP]
+.RS 4
+Use exclusive BSD lock for device or file it operates. The optional argument \fImode\fP can be \fByes\fP, \fBno\fP (or 1 and 0) or \fBnonblock\fP. If the \fImode\fP argument is omitted, it defaults to \fByes\fP. This option overwrites environment variable \fB$LOCK_BLOCK_DEVICE\fP. The default is not to use any lock at all, but it\(cqs recommended to avoid collisions with \fBsystemd\-udevd\fP(8) or other tools.
+.RE
+.sp
+\fB\-r\fP, \fB\-\-read\-only\fP
+.RS 4
+Forced open in read\-only mode.
+.RE
+.sp
+\fB\-z\fP, \fB\-\-zero\fP
+.RS 4
+Start with an in\-memory zeroed partition table. This option does not zero the partition table on the disk; rather, it simply starts the program without reading the existing partition table. This option allows you to create a new partition table from scratch or from an \fBsfdisk\fP(8)\-compatible script.
+.RE
+.SH "COMMANDS"
+.sp
+The commands for \fBcfdisk\fP can be entered by pressing the corresponding key (pressing \fIEnter\fP after the command is not necessary). Here is a list of the available commands:
+.sp
+\fBb\fP
+.RS 4
+Toggle the bootable flag of the current partition. This allows you to select which primary partition is bootable on the drive. This command may not be available for all partition label types.
+.RE
+.sp
+\fBd\fP
+.RS 4
+Delete the current partition. This will convert the current partition into free space and merge it with any free space immediately surrounding the current partition. A partition already marked as free space or marked as unusable cannot be deleted.
+.RE
+.sp
+\fBh\fP
+.RS 4
+Show the help screen.
+.RE
+.sp
+\fBn\fP
+.RS 4
+Create a new partition from free space. \fBcfdisk\fP then prompts you for the size of the partition you want to create. The default size is equal to the entire available free space at the current position.
+.sp
+The size may be followed by a multiplicative suffix: KiB (=1024), MiB (=1024*1024), and so on for GiB, TiB, PiB, EiB, ZiB and YiB (the "iB" is optional, e.g., "K" has the same meaning as "KiB").
+.RE
+.sp
+\fBq\fP
+.RS 4
+Quit the program. This will exit the program without writing any data to the disk.
+.RE
+.sp
+\fBr\fP
+.RS 4
+Reduce or enlarge the current partition. \fBcfdisk\fP then prompts you for the new size of the partition. The default size is the current size. A partition marked as free space or marked as unusable cannot be resized.
+.sp
+\fBNote that reducing the size of a partition might destroy data on that partition.\fP
+.RE
+.sp
+\fBs\fP
+.RS 4
+Sort the partitions in ascending start\-sector order. When deleting and adding partitions, it is likely that the numbering of the partitions will no longer match their order on the disk. This command restores that match.
+.RE
+.sp
+\fBt\fP
+.RS 4
+Change the partition type. By default, new partitions are created as \fILinux\fP partitions.
+.RE
+.sp
+\fBu\fP
+.RS 4
+Dump the current in\-memory partition table to an \fBsfdisk\fP(8)\-compatible script file.
+.sp
+The script files are compatible between \fBcfdisk\fP, \fBfdisk\fP(8) \fBsfdisk\fP(8) and other libfdisk applications. For more details see \fBsfdisk\fP(8).
+.sp
+It is also possible to load an sfdisk\-script into \fBcfdisk\fP if there is no partition table on the device or when you start \fBcfdisk\fP with the \fB\-\-zero\fP command\-line option.
+.RE
+.sp
+\fBW\fP
+.RS 4
+Write the partition table to disk (you must enter an uppercase W). Since this might destroy data on the disk, you must either confirm or deny the write by entering `yes\(aq or `no\(aq. If you enter `yes\(aq, \fBcfdisk\fP will write the partition table to disk and then tell the kernel to re\-read the partition table from the disk.
+.sp
+The re\-reading of the partition table does not always work. In such a case you need to inform the kernel about any new partitions by using \fBpartprobe\fP(8) or \fBpartx\fP(8), or by rebooting the system.
+.RE
+.sp
+\fBx\fP
+.RS 4
+Toggle extra information about a partition.
+.RE
+.sp
+\fIUp Arrow\fP, \fIDown Arrow\fP
+.RS 4
+Move the cursor to the previous or next partition. If there are more partitions than can be displayed on a screen, you can display the next (previous) set of partitions by moving down (up) at the last (first) partition displayed on the screen.
+.RE
+.sp
+\fILeft Arrow\fP, \fIRight Arrow\fP
+.RS 4
+Select the preceding or the next menu item. Hitting \fIEnter\fP will execute the currently selected item.
+.RE
+.sp
+All commands can be entered with either uppercase or lowercase letters (except for \fBW\fPrite). When in a submenu or at a prompt, you can hit the \fIEsc\fP key to return to the main menu.
+.SH "COLORS"
+.sp
+The output colorization is implemented by \fBterminal\-colors.d\fP(5) functionality.
+Implicit coloring can be disabled by an empty file
+.RS 3
+.ll -.6i
+.sp
+\fI/etc/terminal\-colors.d/cfdisk.disable\fP
+.br
+.RE
+.ll
+.sp
+for the \fBcfdisk\fP command or for all tools by
+.RS 3
+.ll -.6i
+.sp
+\fI/etc/terminal\-colors.d/disable\fP
+.br
+.RE
+.ll
+.sp
+The user\-specific \fI$XDG_CONFIG_HOME/terminal\-colors.d\fP
+or \fI$HOME/.config/terminal\-colors.d\fP overrides the global setting.
+.sp
+Note that the output colorization may be enabled by default, and in this case
+\fIterminal\-colors.d\fP directories do not have to exist yet.
+.sp
+\fBcfdisk\fP does not support color customization with a color\-scheme file.
+.SH "ENVIRONMENT"
+.sp
+\fBCFDISK_DEBUG\fP=all
+.RS 4
+enables cfdisk debug output.
+.RE
+.sp
+\fBLIBFDISK_DEBUG\fP=all
+.RS 4
+enables libfdisk debug output.
+.RE
+.sp
+\fBLIBBLKID_DEBUG\fP=all
+.RS 4
+enables libblkid debug output.
+.RE
+.sp
+\fBLIBSMARTCOLS_DEBUG\fP=all
+.RS 4
+enables libsmartcols debug output.
+.RE
+.sp
+\fBLIBSMARTCOLS_DEBUG_PADDING\fP=on
+.RS 4
+use visible padding characters. Requires enabled \fBLIBSMARTCOLS_DEBUG\fP.
+.RE
+.sp
+\fBLOCK_BLOCK_DEVICE\fP=<mode>
+.RS 4
+use exclusive BSD lock. The mode is "1" or "0". See \fB\-\-lock\fP for more details.
+.RE
+.SH "AUTHORS"
+.sp
+.MTO "kzak\(atredhat.com" "Karel Zak" ""
+.sp
+The current \fBcfdisk\fP implementation is based on the original \fBcfdisk\fP from \c
+.MTO "martin\(atcs.unc.edu" "Kevin E. Martin" "."
+.SH "SEE ALSO"
+.sp
+\fBfdisk\fP(8),
+\fBparted\fP(8),
+\fBpartprobe\fP(8),
+\fBpartx\fP(8),
+\fBsfdisk\fP(8)
+.SH "REPORTING BUGS"
+.sp
+For bug reports, use the issue tracker at \c
+.URL "https://github.com/util\-linux/util\-linux/issues" "" "."
+.SH "AVAILABILITY"
+.sp
+The \fBcfdisk\fP command is part of the util\-linux package which can be downloaded from \c
+.URL "https://www.kernel.org/pub/linux/utils/util\-linux/" "Linux Kernel Archive" "." \ No newline at end of file
diff --git a/disk-utils/cfdisk.8.adoc b/disk-utils/cfdisk.8.adoc
new file mode 100644
index 0000000..97fad62
--- /dev/null
+++ b/disk-utils/cfdisk.8.adoc
@@ -0,0 +1,159 @@
+//po4a: entry man manual
+////
+cfdisk.8 -- man page for cfdisk
+Copyright 1994 Kevin E. Martin (martin@cs.unc.edu)
+Copyright (C) 2014 Karel Zak <kzak@redhat.com>
+
+Permission is granted to make and distribute verbatim copies of this
+manual provided the copyright notice and this permission notice are
+preserved on all copies.
+
+Permission is granted to copy and distribute modified versions of this
+manual under the conditions for verbatim copying, provided that the
+entire resulting derived work is distributed under the terms of a
+permission notice identical to this one.
+////
+= cfdisk(8)
+:doctype: manpage
+:man manual: System Administration
+:man source: util-linux {release-version}
+:page-layout: base
+:command: cfdisk
+
+== NAME
+
+cfdisk - display or manipulate a disk partition table
+
+== SYNOPSIS
+
+*cfdisk* [options] [_device_]
+
+== DESCRIPTION
+
+*cfdisk* is a curses-based program for partitioning any block device. The default device is _/dev/sda_.
+
+Note that *cfdisk* provides basic partitioning functionality with a user-friendly interface. If you need advanced features, use *fdisk*(8) instead.
+
+All disk label changes will remain in memory only, and the disk will be unmodified until you decide to write your changes. Be careful before using the write command.
+
+Since version 2.25 *cfdisk* supports MBR (DOS), GPT, SUN and SGI disk labels, but no longer provides any functionality for CHS (Cylinder-Head-Sector) addressing. CHS has never been important for Linux, and this addressing concept does not make any sense for new devices.
+
+Since version 2.25 *cfdisk* also does not provide a 'print' command any more. This functionality is provided by the utilities *partx*(8) and *lsblk*(8) in a very comfortable and rich way.
+
+If you want to remove an old partition table from a device, use *wipefs*(8).
+
+== OPTIONS
+
+include::man-common/help-version.adoc[]
+
+*-L*, *--color*[**=**__when__]::
+Colorize the output. The optional argument _when_ can be *auto*, *never* or *always*. If the _when_ argument is omitted, it defaults to *auto*. The colors can be disabled, for the current built-in default see *--help* output. See also the *COLORS* section.
+
+*--lock*[=_mode_]::
+Use exclusive BSD lock for device or file it operates. The optional argument _mode_ can be *yes*, *no* (or 1 and 0) or *nonblock*. If the _mode_ argument is omitted, it defaults to *yes*. This option overwrites environment variable *$LOCK_BLOCK_DEVICE*. The default is not to use any lock at all, but it's recommended to avoid collisions with *systemd-udevd*(8) or other tools.
+
+*-r*, *--read-only*::
+Forced open in read-only mode.
+
+*-z*, *--zero*::
+Start with an in-memory zeroed partition table. This option does not zero the partition table on the disk; rather, it simply starts the program without reading the existing partition table. This option allows you to create a new partition table from scratch or from an *sfdisk*(8)-compatible script.
+
+== COMMANDS
+
+The commands for *cfdisk* can be entered by pressing the corresponding key (pressing _Enter_ after the command is not necessary). Here is a list of the available commands:
+
+*b*::
+Toggle the bootable flag of the current partition. This allows you to select which primary partition is bootable on the drive. This command may not be available for all partition label types.
+
+*d*::
+Delete the current partition. This will convert the current partition into free space and merge it with any free space immediately surrounding the current partition. A partition already marked as free space or marked as unusable cannot be deleted.
+
+*h*::
+Show the help screen.
+
+*n*::
+Create a new partition from free space. *cfdisk* then prompts you for the size of the partition you want to create. The default size is equal to the entire available free space at the current position.
++
+The size may be followed by a multiplicative suffix: KiB (=1024), MiB (=1024*1024), and so on for GiB, TiB, PiB, EiB, ZiB and YiB (the "iB" is optional, e.g., "K" has the same meaning as "KiB").
+
+*q*::
+Quit the program. This will exit the program without writing any data to the disk.
+
+*r*::
+Reduce or enlarge the current partition. *cfdisk* then prompts you for the new size of the partition. The default size is the current size. A partition marked as free space or marked as unusable cannot be resized.
++
+*Note that reducing the size of a partition might destroy data on that partition.*
+
+*s*::
+Sort the partitions in ascending start-sector order. When deleting and adding partitions, it is likely that the numbering of the partitions will no longer match their order on the disk. This command restores that match.
+
+*t*::
+Change the partition type. By default, new partitions are created as _Linux_ partitions.
+
+*u*::
+Dump the current in-memory partition table to an **sfdisk**(8)-compatible script file.
++
+The script files are compatible between *cfdisk*, *fdisk*(8) *sfdisk*(8) and other libfdisk applications. For more details see *sfdisk*(8).
++
+It is also possible to load an sfdisk-script into *cfdisk* if there is no partition table on the device or when you start *cfdisk* with the *--zero* command-line option.
+
+*W*::
+Write the partition table to disk (you must enter an uppercase W). Since this might destroy data on the disk, you must either confirm or deny the write by entering `yes' or `no'. If you enter `yes', *cfdisk* will write the partition table to disk and then tell the kernel to re-read the partition table from the disk.
++
+The re-reading of the partition table does not always work. In such a case you need to inform the kernel about any new partitions by using *partprobe*(8) or *partx*(8), or by rebooting the system.
+
+*x*::
+Toggle extra information about a partition.
+
+_Up Arrow_, _Down Arrow_::
+Move the cursor to the previous or next partition. If there are more partitions than can be displayed on a screen, you can display the next (previous) set of partitions by moving down (up) at the last (first) partition displayed on the screen.
+
+_Left Arrow_, _Right Arrow_::
+Select the preceding or the next menu item. Hitting _Enter_ will execute the currently selected item.
+
+All commands can be entered with either uppercase or lowercase letters (except for **W**rite). When in a submenu or at a prompt, you can hit the _Esc_ key to return to the main menu.
+
+include::man-common/colors.adoc[]
+*cfdisk* does not support color customization with a color-scheme file.
+
+== ENVIRONMENT
+
+*CFDISK_DEBUG*=all::
+enables cfdisk debug output.
+
+*LIBFDISK_DEBUG*=all::
+enables libfdisk debug output.
+
+*LIBBLKID_DEBUG*=all::
+enables libblkid debug output.
+
+*LIBSMARTCOLS_DEBUG*=all::
+enables libsmartcols debug output.
+
+*LIBSMARTCOLS_DEBUG_PADDING*=on::
+use visible padding characters. Requires enabled *LIBSMARTCOLS_DEBUG*.
+
+*LOCK_BLOCK_DEVICE*=<mode>::
+use exclusive BSD lock. The mode is "1" or "0". See *--lock* for more details.
+
+== AUTHORS
+
+mailto:kzak@redhat.com[Karel Zak]
+
+The current *cfdisk* implementation is based on the original *cfdisk* from mailto:martin@cs.unc.edu[Kevin E. Martin].
+
+== SEE ALSO
+
+*fdisk*(8),
+*parted*(8),
+*partprobe*(8),
+*partx*(8),
+*sfdisk*(8)
+
+include::man-common/bugreports.adoc[]
+
+include::man-common/footer.adoc[]
+
+ifdef::translation[]
+include::man-common/translation.adoc[]
+endif::[]