GRUB Commands
99
9.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:
•
boot
— Boots the operating system or chain loader that was last loaded.
•
chainloader
</path/to/file>
— Loads the specified file as a chain loader. If the file is
located on the first sector of the specified partition, use the blocklist notation,
+1
, instead of the file
name.
The following is an example
chainloader
command:
chain1
•
displaymem
— Displays the current use of memory, based on information from the BIOS. This is
useful to determine how much RAM a system has prior to booting it.
•
initrd
</path/to/initrd>
— Enables users to specify an initial RAM disk to use when
booting. An
initrd
is necessary when the kernel needs certain modules in order to boot properly,
such as when the root partition is formatted with the ext3 file system.
The following is an example
initrd
command:
initrd -/initrd-2.6.8-1.523.img
•
install
<stage-1>
<install-disk>
<stage-2>
p
config-file
— Installs GRUB to the
system MBR.
•
<stage-1>
— Signifies a device, partition, and file where the first boot loader image can be
found, such as
(hd0,0)/grub/stage1
.
•
<install-disk>
— Specifies the disk where the stage 1 boot loader should be installed, such
as
(hd0)
.
•
<stage-2>
— Passes the stage 2 boot loader location to the stage 1 boot loader, such as
(hd0,0)/grub/stage2
.
•
p
<config-file>
— This option tells the
install
command to look for the menu configuration
file specified by
<config-file>
, such as
(hd0,0)/grub/grub.conf
.
Warning
The
install
command overwrites any information already located on the MBR.
•
kernel
</path/to/kernel>
<option-1>
<option-N>
... — Specifies the kernel file to load
when booting the operating system. Replace
</path/to/kernel>
with an absolute path from the
Summary of Contents for ENTERPRISE LINUX 5 - VIRTUAL SERVER ADMINISTRATION
Page 12: ...xii ...
Page 20: ......
Page 30: ...12 ...
Page 32: ...14 ...
Page 82: ...64 ...
Page 106: ...88 ...
Page 122: ...104 ...
Page 124: ...106 ...
Page 126: ......
Page 132: ...114 ...
Page 168: ...150 ...
Page 182: ...164 ...
Page 192: ...174 ...
Page 194: ......
Page 236: ...218 ...
Page 238: ...220 ...
Page 270: ......
Page 274: ...256 ...
Page 278: ...260 ...
Page 292: ...274 ...
Page 294: ......
Page 300: ...282 ...
Page 304: ......
Page 316: ...298 ...
Page 370: ...352 ...
Page 384: ...366 ...
Page 385: ...Part VII Appendix ...
Page 386: ......