15.1 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 fixing 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:
- Print a summary of the command-line options and exit.
- Print the version number of GRUB and exit.
- Print some verbose messages for debugging purpose.
- Use the device map file file. The format is described in
- Do not probe any floppy drive. This option has no effect if the option
--device-map is specified (see Device map).
- 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.
- 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.
- Set the stage2 boot_drive to drive. This argument should be
an integer (decimal, octal or hexadecimal).
- Set the stage2 install_partition to par. This argument
should be an integer (decimal, octal or hexadecimal).
- Do not use the configuration file even if it can be read.
- Do not use the screen handling interface by the curses even if it is
- This option has the same meaning as `--no-config-file --no-curses'.
- Disable writing to any disk.
- Wait until a debugger will attach. This option is useful when you want
to debug the startup code.