Node:Basic usage, Next:, Up:Invoking the grub shell



Introduction into the grub shell

You can use the command grub for installing GRUB under your operating systems and for a testbed when you add a new feature into GRUB or when fix a bug. grub is almost the same as the Stage 2, and, in fact, it shares the source code with the Stage 2 and you can use the same commands (see Commands) in grub. It is emulated by replacing BIOS calls with UNIX system calls and libc functions.

The command grub accepts the following options:

--help
Print a summary of the command-line options and exit.
--version
Print the version number of GRUB and exit.
--verbose
Print some verbose messages for debugging purpose.
--device-map=file
Use the device map file file. The format is described in Device map.
--no-floppy
Do not probe any floppy drive. This option has no effect if the option --device-map is specified (see Device map).
--probe-second-floppy
Probe the second floppy drive. If this option is not specified, the grub shell does not probe it, as that sometimes takes a long time. If you specify the device map file (see Device map), the grub shell just ignores this option.
--config-file=file
Read the configuration file file instead of /boot/grub/menu.lst. The format is the same as the normal GRUB syntax. See Filesystem, for more information.
--boot-drive=drive
Set the stage2 boot_drive to drive. This argument should be an integer (decimal, octal or hexadecimal).
--install-partition=par
Set the stage2 install_partition to par. This argument should be an integer (decimal, octal or hexadecimal).
--no-config-file
Do not use the configuration file even if it can be read.
--no-curses
Do not use the curses interface even if it is available.
--batch
This option has the same meaning as --no-config-file --no-curses.
--read-only
Disable writing to any disk.
--hold
Wait until a debugger will attach. This option is useful when you want to debug the startup code.