boot
— 引导操作系统或者最后被装载的 chain 装载程序。
chainloader </path/to/file>
— 把指定的文件装载为 chain 装载程序。如果这个文件位于指定分区的第一个扇区,则使用块列表标记 +1
来代替文件名。
下面是 chainloader
命令的一个示例:
chainloader +1
displaymem
— 根据 BIOS 信息,显示当前的内存使用情况。这对在引导前确认系统有多少内存很有用。
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 or ext4 file system.
下面是 initrd
命令的一个示例:
initrd /initrd-2.6.8-1.523.img
install <stage-1>
<install-disk>
<stage-2>
p
config-file
— 把 GRUB 安装到系统的主引导分区里。
<stage-1>
— 指定可以找到第一阶段引导装载程序映像的设备、分区和文件,如(hd0,0)/grub/stage1
。
<install-disk>
— 指定用来安装第一阶段引导装载程序映像应该的磁盘,如 (hd0)
。
<stage-2>
— 把第二阶段引导装载程序的位置传递给第一阶段引导装载程序,如 (hd0,0)/grub/stage2
。
p
<config-file>
— 这个选项告诉 install
命令来寻找 <config-file>
所指定的菜单配置文件,如 (hd0,0)/grub/grub.conf
。
Warning
install
命令覆盖主引导分区里任何已有的信息。
kernel </path/to/kernel>
<option-1>
<option-N>
... — 指定引导操作系统时装载的内核文件。用相对于 root 命令指定的分区的绝对路径来替换 </path/to/kernel>
。用 Linux 内核选项来替换 <option-1>
,如 root=/dev/VolGroup00/LogVol00
可以指定系统根分区所在的设备。你可以用空格隔开传入内核的多个选项。
下面是 kernel
命令的一个示例:
kernel /vmlinuz-2.6.8-1.523 ro root=/dev/VolGroup00/LogVol00
前面例子里的选项指定了 Linux 的根文件系统位于 hda5
分区。
root (<device-type>
<device-number>
,<partition>
)
— 配置 GRUB 的根分区,如 (hd0,0)
,并挂载这个分区。
下面是 root
命令的一个示例:
root (hd0,0)
rootnoverify (<device-type>
<device-number>
,<partition>
)
— 配置 GRUB 的根分区,就象 root
命令一样,但不挂载此分区。