hd0,"。如果有多个硬盘,继续进行,在 ("hd2" 中输入名称并在名称后紧跟着输入逗号,但不要按 Enter 键。部分完成的
root 命令看起来如下:
grub>; root (hd0,
现在,继续操作,再按一次 Tab 键。GRUB 将显示特定硬盘上所有分区的列表,以及它们的文件系统类型。在我的系统中,按 Tab
键时得到以下列表:
grub>; root (hd0, (tab,按tab一下键)
Possible partitions are:
Partition num: 0, Filesystem type is fat, partition type 0x6
Partition num: 2, Filesystem type is ext2fs, partition type 0x83
Partition num: 4, Filesystem type unknown, partition type 0x7
Partition num: 5, Filesystem type is ext2fs, partition type 0x83
Partition num: 6, Filesystem type is fat, partition type 0xb
Partition num: 7, Filesystem type is fat, partition type 0xb
Partition num: 8, Filesystem type is ext2fs, partition type 0x83
Partition num: 9, Filesystem type unknown, partition type 0x82
如您所见,GRUB 的交互式硬盘和分区名称实现功能非常有条理。这些,只需要好好理解 GRUB
新奇的硬盘和分区命名语法,然后就可以继续操作了
grub>; root (hd0,
现在已安装了 root 文件系统,到装入内核的时候了
grub>; kernel /boot/vmlinuz-2.4.2 root=/dev/hda5 ro
[Linux-bzImage, setup=0x1200, size=0xe1a30]
您已经安装了 root 文件系统并装入了内核。现在,可以引导了。只要输入 "boot",Linux
引导过程就将开始。是不是很cool啊,GRUB的menu.lst更像一个linux下的脚本程序。
5 常见grub除错方法的思路
首先进去Linux的rescue模式!
用软盘或光盘启动,然后在启动的提示符输入:linux rescue
按照提示进入一个Shell状态,你可以到/mnt/下面看到一个sysimage这么目录,进去以后,就是你安装linux的/分区.
使用命令将根分区变为当前目录的根分区:chroot /mnt/sysimage
然后转到/sbin/这个目录中.
使用fdisk -l 显示当前分区情况,然后使用#grub-install
/dev/hdx(x为你使用的是那块硬盘安装的,一般情况下是hda)
使用exit推出chroot,再使用exit退出linux rescue模式,系统将重新启动!取出光盘,应该可以看到grub安装好了.
在具体的环境中,编辑/boot/grub/grub.conf文件和menu.lst文件. |