Grub Commands - Red Hat ENTERPRISE LINUX 3 Reference Manual

Hide thumbs Also See for ENTERPRISE LINUX 3:
Table of Contents

Advertisement

16
Command Line Interface
The command line interface is the most basic of the GRUB interfaces, but it is also the one
that grants the most control. The command line makes it possible to type any relevant GRUB
commands followed by the [Enter] key to execute them. This interface features some advanced
shell-like features, including [Tab] key completion, based on context, and [Ctrl] key combina-
tions when typing commands, such as [Ctrl]-[a] to move to the beginning of a line and [Ctrl]-[e]
to move to the end of a line. In addition, the arrow, [Home], [End], and [Delete] keys work as
they do in the
bash
Refer to Section 2.6 GRUB Commands, for a list of common commands.
2.5.1. Interfaces Load Order
When GRUB loads its second stage boot loader, it first searches for its configuration file. Once found,
it builds a menu list and displays the menu interface.
If the configuration file cannot be found, or if the configuration file is unreadable, GRUB loads the
command line interface, allowing the user to type commands to complete the boot process.
If the configuration file is not valid, GRUB prints out the error and asks for input. This helps the user
see precisely where the problem occurred. Pressing any key reloads the menu interface, where it is
then possible to edit the menu option and correct the problem based on the error reported by GRUB.
If the correction fails, GRUB reports an error and reloads the menu interface.

2.6. GRUB Commands

GRUB allows a number of useful commands in its command line interface. Some of the commands
accept options after their name; these options should be separated from the command and other options
on that line by space characters.
The following is a list of useful commands:
— Boots the operating system or chain loader that was last loaded.
boot
chainloader
located on the first sector of the specified partition, use the blocklist notation,
filename.
The following is an example
chainloader +1
— Displays the current use of memory, based on information from the BIOS. This is
displaymem
useful to determine how much RAM a system has prior to booting it.
initrd
/path/to/initrd
booting. An
initrd
such as when the root partition is formated with the ext3 file system.
The following is an example
initrd /initrd-2.4.21.ent.img
install
stage-1
to the system MBR.
— Signifies a device, partition, and file where the first boot loader image can be
stage-1
found, such as
(hd0,0)/grub/stage1
install-disk
as
.
(hd0)
shell.
— Loads the specified file as a chain loader. If the file is
/path/to/file
chainloader
— Enables users to specify an initial RAM disk to use when
is necessary when the kernel needs certain modules in order to boot properly,
command:
initrd
install-disk
— Specifies the disk where the stage 1 boot loader should be installed, such
command:
stage-2
p
.
Chapter 2. Boot Loaders
, instead of the
+1
— Installs GRUB
config-file

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ENTERPRISE LINUX 3 and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents