fdisk (modo expert) opções

3

No GNU / Linux com fdisk (util-linux 2.20.1) , ao usar, diga fdisk /dev/sda3 , há algumas opções e até um "modo especialista" ( x ). A maioria deles é explicada pela opção m .

Mas não consigo encontrar uma documentação sobre isso, nem na página man não na info . Como eu não quero me atrapalhar com meus sistemas de arquivos no momento - alguma idéia?

Só para deixar isso claro: não estou falando sobre a opção "regular", por exemplo, fdisk -v , mas aqueles em que fdisk primeiro teve que ser iniciado. Meu palpite era que eu poderia ter sorte em outra página man relacionada, mas não consegui encontrar nada até agora. Eu senti falta de alguma coisa?

    
por erch 02.02.2014 / 21:47

2 respostas

4

Esta página diz

 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

Além disso, fdisk/README.fdisk na fonte package conta a seguinte história:

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.
    
por 02.02.2014 / 22:02
2

A página man é breve. A documentação final é a fonte, por exemplo:

link

Felizmente, a fonte fornece uma documentação amigável. Olhando dentro da árvore de origem em util-linux-2.24-rc1/Documentation/fdisk.txt , os comandos são documentados como:

 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): _

Prossegue para fornecer instruções de uso. Sobre a questão dos comandos expert , escreve:

 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.

Depois de bater x para especialista, este é o menu que aparece:

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):_

Observe que o menu especializado usa muitas das mesmas letras que o menu normal, mas significa que essas letras significam algo diferente . Por exemplo, no menu normal, c significa um inócuo "alternar o sinalizador de compatibilidade", mas no menu especializado, c significa "alterar número de cilindros". Cuidado com o usuário.

    
por 02.02.2014 / 22:17

Tags