Options fdisk (mode expert)

Sur GNU / Linux avec fdisk (util-linux 2.20.1) , quand on utilise, disons fdisk /dev/sda3 il y a pas mal d'options et même un "mode expert" ( x ). La plupart d'entre eux sont expliqués par l'option m .

Mais je ne peux pas find de documentation sur ceux-ci, ni sur l' man ni sur la page d' info . Comme je ne veux pas tâtonner avec mes filesystems pour le moment – une idée?

Pour que tout soit clair: je ne parle pas de l'option "regular", par exemple fdisk -v mais celles où fdisk doit être démarré. Ma conjecture était que je pourrais avoir de la chance dans une autre page de man mais je ne pouvais rien find jusqu'à présent. Ai-je manqué quelque chose?

Cette page dit

  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 

En outre, fdisk/README.fdisk sur le package source raconte l'histoire suivante:

 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 ensortinges 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. 

La page de manuel est brève. La documentation ultime est la source, par exemple:

https://www.kernel.org/pub/linux/utils/util-linux/v2.24/

Heureusement, la source fournit une documentation conviviale. En recherchant dans l'arborescence source à l' util-linux-2.24-rc1/Documentation/fdisk.txt , les commands sont documentées comme 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): _ 

Il continue à fournir des instructions d'utilisation. Sur la question des commands d' experts , il écrit:

  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 ensortinges 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. 

Après avoir frappé x pour expert, c'est le menu qui apparaît:

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

Notez que le menu expert utilise plusieurs des mêmes lettres que le menu normal, mais que ces lettres signifient quelque chose de différent . Par exemple, dans le menu normal, c signifie un indicateur de compatibilité "dos" relativement inoffensif, mais dans le menu expert, c signifie "changer le nombre de cylindres". Attention à l'user.