On Tue, 01 Mar 2005 15:25:24 -0400
Luis F. Araujo wrote:

> As far as i know lilo needs to record the address in the HD where the 
> kernel is located,
> make it very hardware-depedent, that's why even if you change a minimal 
> option in the kernel
> (for example tweaking a few things in .config), you need to re-run lilo.

Thats right, more particularly the lilo bootloader does not understand
filesystems at all. It understands raw blocks on the hard drive.

When you run lilo (the executable not the bootloader)  after changing
the config file or installing a new kernel it records the block numbers
of the kernel file (and the initrd if there is one i guess?) into a map.

On boot the lilo boot loader can read the map and say "give me blocks
123,124 & 536 on the first hard drive, I am gonna treat that as a kernel and 
try and boot it"

This has two corollaries:

1. if you install a new kernel, even with the same name, it is going to
be on different blocks on the hard drive and you need to re-run lilo to
get a new map created

2. when you run lilo *all* of the kernels in your lilo.conf have to be
on filesystems that are mounted, or else lilo cannot create the map.


OTOH grub understands (many) filesystems [1], and you can tell it the
kernel is (hd0,1)/boot/vmlinuz - it will find that file even if you
delete the old vmlinuz and install a new one on different disk blocks.


[1] on my server at work grub has stage 1.5 files for the following
filesystems: ext2/3,jfs,xfs,minix,fat,vstafs (whatever that is),ffs
(ditto) and reiser. This does raise the option of having grub and its
menu file on a dos/win partition so that you can amend the menu from
windows or from linux. handy
> 
> Instead GRUB lets that job to the filesystem itself, (specifying root 
> partition), so even
> if you do big changes to the kernel, as long as you don't change the 
> filename (if you do,
> you only need to edit menu.lst) things will work fine without touching grub.

-- 
Nick Rout
Barrister & Solicitor
Christchurch
<http://www.rout.co.nz>
<[EMAIL PROTECTED]>

--
gentoo-user@gentoo.org mailing list

Reply via email to