首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >fdisk (专家模式)选项

fdisk (专家模式)选项
EN

Unix & Linux用户
提问于 2014-02-02 20:47:32
回答 2查看 10.9K关注 0票数 3

在带有fdisk (util-linux 2.20.1)的GNU/Linux上,当使用fdisk /dev/sda3时,有相当多的选项,甚至还有“专家模式”(x)。其中大部分是通过m选项解释的。

但我在这些文件上找不到任何文档,maninfo页面也是如此。因为我现在不想在我的文件系统上摸索--知道吗?

为了说明这一点:我不是在谈论“常规”选项,例如fdisk -v,而是指必须首先启动fdisk的选项。我的猜测是,我可能会在另一个相关的man页面上获得好运,但到目前为止我什么也找不到。我错过了什么吗?

EN

回答 2

Unix & Linux用户

回答已采纳

发布于 2014-02-02 21:02:50

这一页写着

代码语言:javascript
复制
 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 源包讲述了以下故事:

代码语言:javascript
复制
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.
票数 4
EN

Unix & Linux用户

发布于 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的源树中,这些命令记录为:

代码语言:javascript
复制
 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): _

它还提供了使用说明。关于专家命令的问题,它写道:

代码语言:javascript
复制
 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后,显示的菜单如下:

代码语言:javascript
复制
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的意思是“更改柱面数”。用户要小心。

票数 2
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/112197

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档