Page suivante Page précédente Table des matières | GRUB-HOWTO: A la découverte du shell GRUB par le grub-shell |
En guise d'avant goût, nous allons explorer les possibilités du GRUB par
l'émulation Unix de son shell, c'est-à-dire par le programme grub
.
C'est parti :
$ /usr/local/sbin/grub
Les premières lignes affichées sont explicites :
Probing devices to guess BIOS drives. This may take a long time. GRUB version 0.5.97 (640K lower / 3072K upper memory) [ Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists the possible completions of a device/filename. ] grub>
Il s'agit donc d'un mini-shell (disponible évidemment également dans le stage2), qui supporte le complétement pour les noms de fichiers, et qui affiche la liste des commandes internes (builtins) lorsque l'on actionne la touche <TAB> sur la ligne de commande. En voici le résultat :
grub> Possible commands are: blocklist boot cat chainloader cmp color configfile debug device displayapm displaymem embed find fstest geometry halt help hide impsp robe initrd install ioprobe kernel lock makeactive map md5crypt module moduleno unzip partnew parttype password pause quit read reboot root rootnoverify savedefault serial setkey setup terminal testload testvbe unhide uppermem vbeprobe
L'intégralité des commandes est documentée, déjà, dans les pages info du
grub, mais aussi en ligne. La commande help <commande>
vous
affiche une description de ce que celle-ci fait. Puisque nous allons
l'évoquer juste après, regardons ce qu'affiche l'aide pour root
:
grub> help root root: root [DEVICE [HDBIAS]] Set the current "root device" to the device DEVICE, then attempt to mount it to get the partition size (for passing the partition descriptor in `ES:ESI', used by some chain-loaded gestionnaire d'amorçages), the BSD drive-type (for booting BSD kernels using their native boot format), and correctly determine the PC partition where a BSD sub-partition is located. The optional HDBIAS parameter is a number to tell a BSD kernel how many BIOS drive numbers are on controllers before the current one. For example, if there is an IDE disk and a SCSI disk, and your FreeBSD root partition is on the SCSI disk, then use a `1' for HDBIAS. rootnoverify: rootnoverify [DEVICE [HDBIAS]] Similar to `root', but don't attempt to mount the partition. This is useful for when an OS is outside of the area of the disk that GRUB can read, but setting the correct root device is still desired. Note that the items mentioned in `root' which derived from attempting the mount will NOT work correctly. grub>
Keskessé ? C'est un truc expliqué dans la section suivante. Pour l'instant,
quittons le grub-shell en entrant quit
...
Page suivante Page précédente Table des matières |