108
The following list gives the most useful commands:
•
boot — Boots the operating system or chain loader that has been previously specified and loaded.
•
chainloader <file-name> — Loads the specified file as a chain loader. To grab the file
at the first sector of the specified partition, you can use +1 as the file's name.
•
displaymem — Displays the current use of memory, based on information from the BIOS. This
is useful if you are not sure how much RAM a system has and have yet to boot it.
•
initrd <file-name> — Allows you to specify an initial RAM disk to use when booting,
necessary when the kernel needs certain modules in order to boot properly.
•
install <stage-1> <install-disk> <stage-2> p <config-file> — Installs GRUB to your MBR.
This allows the GRUB interfaces to come up when the system is rebooted.
This command can be configured in several different ways. However, you must specify a
<stage-1> , which signifies a device, partition, and file where the first boot loader image can
be found, such as (hd0,0)/grub/stage1. In addition, you must specify the disk where the
stage 1 boot loader should be installed, such as (hd0).
The <stage-2> section tells the stage 1 boot loader where the stage 2 boot loader is
located, such as (hd0,0)/grub/stage2.
that a menu configuration file is being specified in the <config-file> section, such as
(hd0,0)/grub/grub.conf.
•
kernel <kernel-file-name> <option-1> <option-N> — Specifies the kernel
file to load from GRUB's root filesystem when using direct loading to boot the operating system.
Options can follow the kernel command that will be passed to the kernel when it is loaded.
For Red Hat Linux, you may have a line that looks like this:
kernel /vmlinuz root=/dev/hda5
This line specifies that the vmlinuz file is loaded from GRUB's root filesystem, such as
(hd0,0). An option is also passed to the kernel specifying that the root filesystem for the Linux
This command will write over anything else in your MBR. If exe-
cuted, anything you have been using to boot your operating system
other than GRUB will be lost.
Make sure you know what you are doing before you execute this com-
mand.
WARNING
The p option tells the install command
Chapter 5:GRUB
Need help?
Do you have a question about the LINUX 7.2 and is the answer not in the manual?
Questions and answers