路虽弥,不行不至;事虽少,不做不成。
分类: LINUX
2006-11-14 11:24:31
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 — 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:
chainloader +1 |
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 — 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
p
Warning | |
---|---|
The install command overwrites any information already located on the MBR. |
kernel
The following is an example kernel command:
kernel /vmlinuz-2.4.21 root=/dev/hda5 |
The option in the previous example specifies that the root file system for Linux is located on the hda5 partition.
root (
The following is an example root command:
root (hd0,0) |
rootnoverify (
Other commands are also available; type help --all for a full list of commands. For a description of all GRUB commands, refer to the documentation available online at