cnhnln 发表于 2005-7-14 13:45:21

关于grub的链式引导问题

rootnoverify 和 root 有什么区别阿?
什么时候需要用 makeactive 阿?

例如
title FreeBSD / GNU/KFreeBSD
        root (hd0,1)
        kernel /boot/loader

title SUN Solaris
        rootnoverify (hd1,1)
        makeactive
        chainloader +1

fakeroot 发表于 2005-7-14 13:53:24

rootnoverify device
Similar to root (see Section 13.3.31 , page 36), but don’t attempt to mount
the partition. This is useful for when an OS is outside of the area of the disk that
GRUB can read, but setting the correct root device is still desired. Note that the
items mentioned in root above which derived from attempting the mount will not
work correctly.

makeactive
Set the active partition on the root disk to GRUB’s root device. This command is
limited to primary PC partitions on a hard disk.

引自grub手册。

cnhnln 发表于 2005-7-22 01:35:20

多谢楼上的

去 http://www.gnu.org/software/grub/manual/html_node/Index.html#Index 看了看,发现grub好牛阿!原来每一个软件只是使用就够自己学半天的了



http://www.gnu.org/software/grub/manual/html_node/Chain-loading.html#Chain-loading

“makeactive” is not necessary for most of the modern operating systems.

不过还是没明白makeactive是把一个不活动的主分区makeactive,还是把一个已经是活动分区的主分区makeactive。应该是前者吧。系统读取mbr以后就把引导权交给了机器上唯一的一个活动的主分区了,再要想引导别的不活动的主分区就要makeactive了。不过我不用makeactive,一样可以引导freebsd5.x(前提是指定fb的切片,而不是挂载点。例如“root (hd0,1)”而不是“roor (hd0,1,a)”)。这可能就是手册上说的“This is not necessary for most of the modern operating systems.”

cnhnln 发表于 2005-7-22 02:04:43

rootnoverify 和 root 还不是太懂
挂载?不挂载?grub不支持的分区类型一样可以挂载阿,例如ntfs。只是会显示“Filesystem type unknown”
估计是:要直接引导一个内核就必须用 root,不能用 rootnoverify,当然前提当然是内核所在分区的文件系统在grub支持之列。如果不支持,例如ntfs那就没有办法直接引导了,就需要通过链式装载了。ufs2的fb用 rootnoverify 直接引导就不行,但是ext3的linux居然可以,奇怪阿 8O
感觉rootnoverify没啥用,root就足够了。因为不论grub是否支持那种文件系统,用 root 命令时都可以挂载,至多显示文件系统不支持而已

cnhnln 发表于 2005-7-24 18:14:12

经进一步试验,证实“root”是用来挂载分区的。
用“root”挂载后,就可以用“kernel”命令指明刚才挂载过的分区内某路径下的一个内核(如果没有挂载这个分区,自然也就无法识别到里面的内核了。所以才需要先挂在分区,然后才能引导内核),以便引导系统了。但是前提是grub需要能识别这个分区,否则虽然可以挂载,但还是不能指明这个分区中内核所在的具体路径。
页: [1]
查看完整版本: 关于grub的链式引导问题