在带有fdisk (util-linux 2.20.1)的GNU/Linux上,当使用fdisk /dev/sda3时,有相当多的选项,甚至还有“专家模式”(x)。其中大部分是通过m选项解释的。
但我在这些文件上找不到任何文档,man和info页面也是如此。因为我现在不想在我的文件系统上摸索--知道吗?
为了说明这一点:我不是在谈论“常规”选项,例如fdisk -v,而是指必须首先启动fdisk的选项。我的猜测是,我可能会在另一个相关的man页面上获得好运,但到目前为止我什么也找不到。我错过了什么吗?
发布于 2014-02-02 21:02:50
这一页写着
Expert mode can be used to force the drive geometry to match another drive:
x: Enter expert mode
c: Change the number of cylinders
h: Change the number of heads
r: Return to normal mode此外,fdisk/README.fdisk on 源包讲述了以下故事:
Extra commands for experts
--------------------------
The eXtra command `x' puts `fdisk' into `expert' mode, in which a
slightly different set of commands is available. The Active, Delete,
List, New, Type, Verify, and `eXpert' commands are not available in
expert mode. The commands Write and Quit are available as in ordinary
mode, the Print command is available, but produces output in a slightly
different format, and of course the Menu command prints the expert
menu. There are several new commands.
1. The Return command brings you back to the main menu.
2. The Extended command prints the list of table entries which point
to other tables. Ordinary users do not need this information.
The data is shown as it is stored. The same format is used for
the expert Print command.
3. The dangerous Begin command allows you to move the start of data
in a partition away from its beginning. Other systems create
partitions with this format, and it is sometimes useful to be able
to reproduce it.
4. The slightly dangerous Cylinders command allows you to change the
available number of cylinders. For SCSI disk owners, note that we
require not the actual number of physical cylinders, but the
number of logical cylinders used by DOS and other operating
systems.
5. The extremely dangerous Heads and Sectors commands allow you to
change the number of heads and sectors. It should not be
necessary to use these commands unless you have a SCSI disk, whose
geometry Linux is not always able to determine. SCSI disk owners
note that we need not the actual number of heads or of sectors per
track, but the number believed to exist by DOS and other operating
systems. *Warning*: If you set either of these numbers to a bad
value, you may lose all data on your disk.
Always, after giving any of the commands Begin, Cylinder, Heads, or
Sectors, you should Return to the main menu and give the Verify command.发布于 2014-02-02 21:17:03
手册页很简短。最终文件是来源,例如:
https://www.kernel.org/pub/linux/utils/util-linux/v2.24/
幸运的是,源代码提供了一些友好的文档。在util-linux-2.24-rc1/Documentation/fdisk.txt的源树中,这些命令记录为:
Give the command `m', and you should see this menu:
Command action
a toggle a bootable flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
p print the partition table
q quit without saving changes
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)
Command (m for help): _它还提供了使用说明。关于专家命令的问题,它写道:
The eXtra command `x' puts `fdisk' into `expert' mode, in which a
slightly different set of commands is available. The Active, Delete,
List, New, Type, Verify, and `eXpert' commands are not available in
expert mode. The commands Write and Quit are available as in ordinary
mode, the Print command is available, but produces output in a slightly
different format, and of course the Menu command prints the expert
menu. There are several new commands.
1. The Return command brings you back to the main menu.
2. The Extended command prints the list of table entries which point
to other tables. Ordinary users do not need this information.
The data is shown as it is stored. The same format is used for
the expert Print command.
3. The dangerous Begin command allows you to move the start of data
in a partition away from its beginning. Other systems create
partitions with this format, and it is sometimes useful to be able
to reproduce it.
4. The slightly dangerous Cylinders command allows you to change the
available number of cylinders. For SCSI disk owners, note that we
require not the actual number of physical cylinders, but the
number of logical cylinders used by DOS and other operating
systems.
5. The extremely dangerous Heads and Sectors commands allow you to
change the number of heads and sectors. It should not be
necessary to use these commands unless you have a SCSI disk, whose
geometry Linux is not always able to determine. SCSI disk owners
note that we need not the actual number of heads or of sectors per
track, but the number believed to exist by DOS and other operating
systems. *Warning*: If you set either of these numbers to a bad
value, you may lose all data on your disk.
Always, after giving any of the commands Begin, Cylinder, Heads, or
Sectors, you should Return to the main menu and give the Verify command.点击x for expert后,显示的菜单如下:
Command action
b move beginning of data in a partition
c change number of cylinders
d print the raw data in the partition table
e list extended partitions
f fix partition order
g create an IRIX (SGI) partition table
h change number of heads
i change the disk identifier
m print this menu
p print the partition table
q quit without saving changes
r return to main menu
s change number of sectors/track
v verify the partition table
w write table to disk and exit
Expert command (m for help):_请注意,专家菜单使用了许多与普通菜单相同的字母,但这些字母的含义有所不同。例如,在普通菜单中,c意味着一个相当无害的“切换dos兼容性标志”,而在专家菜单中,c的意思是“更改柱面数”。用户要小心。
https://unix.stackexchange.com/questions/112197
复制相似问题