|
|

楼主 |
发表于 2006-11-26 13:27:20
|
显示全部楼层
这个问题说老实话,我还没有想到。今天又查看了grub的文档。找到这么一段。
stage1
This is an essential image used for booting up GRUB. Usually, this is embedded in an MBR or the boot sector of a partition. Because a PC boot sector is 512 bytes, the size of this image is exactly 512 bytes.
中文大意:stage 1——这是用来启动grub的基本文件。它一般被写入到MBR或者一个分区的启动扇区中。因为PC的启动扇区大小为512字节,这个文件的大小正好是512字节。
All stage1 must do is to load Stage 2 or Stage 1.5 from a local disk. Because of the size restriction, stage1 encodes the location of Stage 2 (or Stage 1.5) in a block list format, so it never understand any filesystem structure.
中文大意:stage1所有要完成的工作是从一个本地硬盘上装载stage2或者stage1.5。因为大小的限制,stage1将stage2(或stage1.5)的位置以块列表格式编码,所以,它不了解任何文件系统的结构。
e2fs_stage1_5
fat_stage1_5
ffs_stage1_5
jfs_stage1_5
minix_stage1_5
reiserfs_stage1_5
vstafs_stage1_5
xfs_stage1_5
These are called Stage 1.5, because they serve as a bridge between stage1 and stage2, that is to say, Stage 1.5 is loaded by Stage 1 and Stage 1.5 loads Stage 2. The difference between stage1 and *_stage1_5 is that the former doesn't understand any filesystem while the latter understands one filesystem (e.g. e2fs_stage1_5 understands ext2fs). So you can move the Stage 2 image to another location safely, even after GRUB has been installed.
中文大意:这些都被叫做stage1.5,因为它们在stage1和stage2之间起到桥梁的作用,也就是说,stage1加载stage1.5,stage1.5加载stage2。stage1和stage1.5的区别在于前者不理解文件系统结构而后者了解特定的文件系统。因此,你甚至可以在grub已经安装后,安全地将stage2文件移动到另一个位置。
While Stage 2 cannot generally be embedded in a fixed area as the size is so large, Stage 1.5 can be installed into the area right after an MBR, or the boot loader area of a ReiserFS or a FFS.
中文大意:stage2因为体积过大,一般无法被写入硬盘的某个特定的连续位置,而stage1.5可以被写入恰好位于MBR或ReiserFS、FFS之后的位置。
根据这段文档,我的理解是正确的,stage1是无法理解文件系统的。那它之所以能找到stage1.5,我想两种可能,第一:安装程序把stage1.5写在紧跟stage1的硬盘位置上,如刚才最后一段些的。第二:安装程序把stage1.5的绝对位置(柱面、扇区)编码到stage1中。我估计第一种可能性比较大。 |
|