|
发表于 2007-1-31 11:41:43
|
显示全部楼层
为什么不自己去info一下grub呢? 为什么不自己去找寻答案呢? 发现答案的快乐应该比别人告诉你更强烈吧?
info 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.
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.
`stage2'
This is the core image of GRUB. It does everything but booting up
itself. Usually, this is put in a filesystem, but that is not required.
`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.
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.
从这里可以看出stage1 一段嵌入MBR 的迷你代码。stage2 是主要部分,但是不是必须的( 在有stage1_5存在的情况下)!在 stage1 把控制权传递给stage2或stage1_5 后,就由stage2或stage1_5来接管所有事情。 |
|