📄 cfdisk.8
字号:
.\" cfdisk.8 -- man page for cfdisk.\" Copyright 1994 Kevin E. Martin (martin@cs.unc.edu).\".\" 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..\".\" " for hilit mode.TH CFDISK 8 "3 June 1995" "The BOGUS Linux Release" "Linux Programmer's Manual".SH NAMEcfdisk \- Curses based disk partition table manipulator for Linux.SH SYNOPSIS.BI "cfdisk [ \-avz ] [ \-c " cylinders " ] [ \-h " heads " ]".BI "[ \-s " sectors-per-track " ] [ -P " opt " ] [ " device " ]".SH DESCRIPTION.B cfdiskis a curses based program for partitioning a hard disk drive. The.I devicecan be any one of the following:.sp.nf.RS/dev/hda [default]/dev/hdb/dev/sda/dev/sdb/dev/sdc/dev/sdd.RE.fi.B cfdiskfirst tries to read the geometry of the hard disk. If it fails, anerror message is displayed and.B cfdiskexits. This should only happen when partitioning a SCSI drive on anadapter without a BIOS. To correct this problem, you can set the.IR cylinders ", " heads " and " sectors-per-trackon the command line. Next,.B cfdisktries to read the current partition table from the disk drive. If itis unable to figure out the partition table, an error is displayed andthe program will exit. This might also be caused by incorrectgeometry information, and can be overridden on the command line.Another way around this problem is with the.B \-zoption. This will ignore the partition table on the disk.The main display is composed of four sections, from top to bottom: theheader, the partitions, the command line and a warning line. Theheader contains the program name and version number followed by thedisk drive and its geometry. The partitions section always displaysthe current partition table. The command line is the place wherecommands and text are entered. The available commands are usuallydisplayed in brackets. The warning line is usually empty except whenthere is important information to be displayed. The current partitionis highlighted with reverse video (or an arrow if the.B \-aoption is given). All partition specific commands apply to thecurrent partition.The format of the partition table in the partitions section is, fromleft to right: Name, Flags, Partition Type, Filesystem Type and Size.The name is the partition device name. The flags can be.IR Boot ,which designates a bootable partition or.IR NC ,which stands for "Not Compatible with DOS or OS/2". DOS, OS/2 andpossibly other operating systems require the first sector of the firstpartition on the disk and all logical partitions to begin on thesecond head. This wastes the second through the last sector of thefirst track of the first head (the first sector is taken by thepartition table itself)..B cfdiskallows you to recover these "lost" sectors with the maximize command.RB ( m )..I Note:.BR fdisk (8)and some early versions of DOS create all partitions with the numberof sectors already maximized. For more information, see the maximizecommand below. The partition type can be one of.IR Primary " or " Logical .For unallocated space on the drive, the partition type can also be.IR Pri/Log ,or empty (if the space is unusable). The filesystem type sectiondisplays the name of the filesystem used on the partition, if known.If it is unknown, then.I Unknownand the hex value of the filesystem type are displayed. A specialcase occurs when there are sections of the disk drive that cannot beused (because all of the primary partitions are used). When this isdetected, the filesystem type is displayed as.IR Unusable .The size field displays the size of the partition in megabytes (bydefault). It can also display the size in sectors and cylinders (seethe change units command below). If an asterisks.RB ( * )appears after the size, this means that the partition is not alignedon cylinder boundaries..SH "DOS 6.x WARNING"The DOS 6.x FORMAT command looks for some information in the firstsector of the data area of the partition, and treats this informationas more reliable than the information in the partition table. DOSFORMAT expects DOS FDISK to clear the first 512 bytes of the data areaof a partition whenever a size change occurs. DOS FORMAT will look atthis extra information even if the /U flag is given -- we considerthis a bug in DOS FORMAT and DOS FDISK.The bottom line is that if you use cfdisk or fdisk to change the size of aDOS partition table entry, then you must also use.B ddto zero the first 512 bytes of that partition before using DOS FORMAT toformat the partition. For example, if you were using cfdisk to make a DOSpartition table entry for /dev/hda1, then (after exiting fdisk or cfdiskand rebooting Linux so that the partition table information is valid) youwould use the command "dd if=/dev/zero of=/dev/hda1 bs=512 count=1" to zerothe first 512 bytes of the partition. Note:.B BE EXTREMELY CAREFULif you use the.B ddcommand, since a small typo can make all of the data on your disk useless.For best results, you should always use an OS-specific partition tableprogram. For example, you should make DOS partitions with the DOS FDISKprogram and Linux partitions with the Linux fdisk or Linux cfdisk program..SH COMMANDS.B cfdiskcommands can be entered by pressing the desired key (pressing.I Enterafter the command is not necessary). Here is a list of the availablecommands:.TP.B bToggle bootable flag of the current partition. This allows you toselect which primary partition is bootable on the drive..TP.B dDelete the current partition. This will convert the current partitioninto free space and merge it with any free space immediatelysurrounding the current partition. A partition already marked as freespace or marked as unusable cannot be deleted..TP.B gChange the disk geometry (cylinders, heads, or sectors-per-track)..B WARNING:This option should only be used by people who know what they aredoing. A command line option is also available to change the diskgeometry. While at the change disk geometry command line, you canchoose to change cylinders.RB ( c ),heads.RB ( h ),and sectors per track.RB ( s ).The default value will be printed at the prompt which you can acceptby simply pressing the.I Enterkey, or you can exit without changes by pressing the.I ESCkey. If you want to change the default value, simply enter thedesired value and press.IR Enter .The altered disk parameter values do not take effect until you returnthe main menu (by pressing.IR Enter " or " ESCat the change disk geometry command line. If you change the geometrysuch that the disk appears larger, the extra sectors are added at theend of the disk as free space. If the disk appears smaller, thepartitions that are beyond the new last sector are deleted and thelast partition on the drive (or the free space at the end of thedrive) is made to end at the new last sector..TP.B hPrint the help screen..TP.B mMaximize disk usage of the current partition. This command willrecover the the unused space between the partition table and thebeginning of the partition, but at the cost of making the partitionincompatible with DOS, OS/2 and possibly other operating systems.This option will toggle between maximal disk usage and DOS, OS/2,etc. compatible disk usage. The default when creating a partition isto create DOS, OS/2, etc. compatible partitions..TP.B nCreate new partition from free space. If the partition type is.IR Primary " or " Logical ,a partition of that type will be created, but if the partition type is.IR Pri/Log ,you will be prompted for the type you want to create. Be aware that(1) there are only four slots available for primary partitions and (2)since there can be only one extended partition, which contains all ofthe logical drives, all of the logical drives must be contiguous (withno intervening primary partition).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -