[lug] boot loader mystery

karl horlen horlenkarl at yahoo.com
Tue Jan 30 14:08:49 MST 2007


Thanks to all of those that replied.  I think I
understand this pretty well now. 

I found a great link that covers grub boot in detail
for those that want to know more (and visualize it):

http://www.pixelbeat.org/docs/disk/

The key to understanding the second part or my
question was this little nugget:

> b) In an MBR with GRUB installed, the Stage 1
> section of GRUB stored in
> the MBR does little more than store the physical
> disk location of, and
> load, GRUB Stage 1.5.  Stage 1.5 is typically stored
> in an empty section
> of the disk immediately following the MBR called the
> "DOS compatibility
> region" (usually 63 sectors long).  The Stage 1.5
> area contains
> filesystem specific code (e2fs, xfs, reiserfs, fat,
> iso, etc) that

What I failed to realize is that you "do" actually
install grub files/code  (stage 1.5) into known
sectors so that stage 1 can find them on boot.  It
does not access or use the stage files in /boot but
from their copied to locations in that dos
compatability region defined above and in the link I
posted.  

I didn't realize this because you only have to do that
grub install step one time.  When you install from CD,
that step is done for you automatically so you never
see it.  With lilo, you manually rewrite the boot map
to these known sectors every time you run "lilo". 
Thus it's more obvious that you're actually changing
those boot-related sectors.

That one-time install is one of the benefits of grub. 
The code needed to find and load filesystem kernels
never changes.  So it only needs to done once.

lilo on the otherhand, actually needs to know physical
locations of your boot files in the filesystem.  So
every time you update lilo.conf, you need to tell it
exactly where to get those files on the disk and
install those locations somewhere in that boot code.

> Disclaimer.. the above info is based on my fuzzy
> understanding of the
> boot process.  I take no responsibility if repeating
> it gets you fired,
> subjects you to public humiliation or causes your
> significant other to
> change their name and disappear to a foreign land
> with the children..

Your take was pretty near perfect! :-)
I haven't been deported yet.

thanks
> 
> -Ken
> 
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List:
> http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: lug.boulder.co.us port=6667
> channel=#colug
> 



 
____________________________________________________________________________________
Don't get soaked.  Take a quick peak at the forecast
with the Yahoo! Search weather shortcut.
http://tools.search.yahoo.com/shortcuts/#loc_weather



More information about the LUG mailing list