Linux系统中存储设备的两种表示方法(2)
2、hd[0-n] 表示方法的应用;
这种一般是应用在GRUB的/boot所位于的硬盘分区的指定上;在GRUB的命令行和GRUB的配置文件menu.lst 中都要应用到;比如我们要把GRUB写到硬盘的MBR上,在GRUB的命令行模式中要通过root (hd[0-n],y)来指定;这里的root (hd[0-n],y),在GRUB中就/boot所位于的分区;不要搞错了,有时/boot和Linux的根/并不是处于同一个分区的,就看您安装 Linux时怎么安装的了;而我们前面所说的root=/dev/hd[a-z]X来指定的是Linux 根/所位于的分区;虽然有时/boot和/同处一个分区,但两种表示方法在GRUB中各有用途;明白了吧;比如/boot位于同一个硬盘分区,就可以用类 似下的方法来把GRUB写到硬盘的MBR上;举个例子;
[root@localhost ~]# grub 注:运行GRUB;
grub> root (hd0,6) 注:比如/boot位于 (hd0,6)分区上,应该这样
Filesystem type is ext2fs, partition type 0x83
grub> setup (hd0)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... yes
Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 15 sectors are embedded.
succeeded
Running "install /boot/grub/stage1 (hd0) (hd0)1+15 p (hd0,6)/boot/grub/stage2
/boot/grub/grub.conf"... succeeded
Done.
grub>quit 注:退出GRUB命令行模式;
建议您看看kernel的文档;可能中文文档并不能满足您的需要,最好还是英文的。
顶(0)
踩(0)
- 最新评论