Инструменты пользователя

Инструменты сайта


software:linux_server:lfs:lfs-12.1:man:cfdisk_8

Это старая версия документа!


cfdisk

Имя

cfdisk - отображение или управление таблицей разделов диска

Синопсис

cfdisk [options] [device]

Описание

cfdisk — это программа на основе curses для разбиения любого блочного устройства. Устройство по умолчанию — /dev/sda .

Обратите внимание, что cfdisk предоставляет базовую функциональность разбиения на разделы с удобным интерфейсом. Если вам нужны расширенные функции, используйте fdisk(8) .

Все изменения меток дисков останутся только в памяти, и диск не будет изменен, пока вы не решите записать свои изменения. Будьте осторожны перед использованием команды записи.

Начиная с версии 2.25 cfdisk поддерживает метки дисков MBR (DOS), GPT, SUN и SGI, но больше не предоставляет никаких функций для адресации CHS (Cylinder-Head-Sector). CHS никогда не был важен для Linux, и эта концепция адресации не имеет никакого смысла для новых устройств.

Начиная с версии 2.25 cfdisk также больше не предоставляет команду 'print'. Эта функциональность предоставляется утилитами partx(8) и lsblk(8) очень удобным и богатым способом.

Если вы хотите удалить старую таблицу разделов с устройства, используйте wipefs(8) .

Параметры

-L, –color[=when]

Раскрасить вывод. Необязательный аргумент when может быть auto , never или always . Если аргумент when опущен, по умолчанию используется auto . Цвета можно отключить, для текущего встроенного значения по умолчанию см. вывод –help. См. также раздел Цвета.

–lock[=mode]

Использовать исключительную блокировку BSD для устройства или файла, с которым он работает. Необязательный аргумент mode может быть yes , no (или 1 и 0) или nonblock. Если аргумент mode опущен, по умолчанию он равен yes . Этот параметр перезаписывает переменную окружения $LOCK_BLOCK_DEVICE. По умолчанию блокировка не используется вообще, но рекомендуется избегать конфликтов с systemd-udevd(8) или другими инструментами.

-r, –read-only

Принудительное открытие в режиме только для чтения.

-b, –sector-size sectorsize

Укажите размер сектора диска. Допустимые значения: 512, 1024, 2048 и 4096. Ядро знает размер сектора для обычных блочных устройств. Используйте эту опцию только на очень старых ядрах, при работе с образами дисков или для переопределения размера сектора ядра по умолчанию. Начиная с util-linux-2.17, fdisk различает логический и физический размер сектора. Эта опция изменяет оба размера сектора на указанный sectorsize.

-z, –zero

Запустить с обнуленной в памяти таблицей разделов. Эта опция не обнуляет таблицу разделов на диске; она просто запускает программу без чтения существующей таблицы разделов. Эта опция позволяет создать новую таблицу разделов с нуля или из совместимого со скриптом sfdisk(8).

-h, –help

Отобразить текст справки и выйти.

-V, –version

Показать версию и выйти.

COMMANDS

Команды для cfdisk можно вводить нажатием соответствующей клавиши (нажатие Enter после команды не обязательно). Вот список доступных команд:

b

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 Write). When in a submenu or at a prompt, you can hit the Esc key to return to the main menu.

COLORS

The output colorization is implemented by terminal-colors.d(5) functionality. Implicit coloring can be disabled by an empty file

/etc/terminal-colors.d/cfdisk.disable

for the cfdisk command or for all tools by

/etc/terminal-colors.d/disable

Since version 2.41, the $NO_COLOR environment variable is also supported to disable output colorization unless explicitly enabled by a command-line option.

The user-specific $XDG_CONFIG_HOME/terminal-colors.d or $HOME/.config/terminal-colors.d overrides the global setting.

Note that the output colorization may be enabled by default, and in this case terminal-colors.d directories do not have to exist yet.

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

Karel Zak kzak@redhat.com

The current cfdisk implementation is based on the original cfdisk from Kevin E. Martin martin@cs.unc.edu.

SEE ALSO

fdisk(8), parted(8), partprobe(8), partx(8), sfdisk(8)

REPORTING BUGS

For bug reports, use the issue tracker https://github.com/util-linux/util-linux/issues.

AVAILABILITY

The cfdisk command is part of the util-linux package which can be downloaded from Linux Kernel Archive https://www.kernel.org/pub/linux/utils/util-linux/.

Только авторизованные участники могут оставлять комментарии.
software/linux_server/lfs/lfs-12.1/man/cfdisk_8.1743840842.txt.gz · Последнее изменение: vladpolskiy