Re: LILO (fwd)

Werner Almesberger (almesber@lrc.di.epfl.ch)
Wed, 20 Aug 1997 18:51:19 +0200 (MET DST)


Jim Nance wrote:
> If anyone has some spare time (do such people exist?) it would make a
> nice project for someone to change LILO so that it operated more like
> silo, milo, or aboot. These linux boot loaders for the sparc and alpha
> load a second stage boot loader which can understand the file system,

Well, the fundamental design of LILO is to allow booting from pretty much
any file system without needing to teach the boot loader about its
structure. Of course you can add some special code for ext2, but I doubt
it's worth the effort. Also, with things like MD and non-classical FS
designs (e.g. reiserfs) becoming popular, straight ext2 may lose some of
its ubiquity.

> thus you don't have to rerun LILO every time you want to boot a new kernel.

If this is all you need, there are a few possibilities to address the
problem:
- run a script like the attached one every once in a while and before
a reboot or shutdown (you also need to change the kernel update
procedure to create the new kernel as foo.new and to rename it to
avoid races)
- add functionality to the system to monitor file changes and write a
little demon that reacts on this

But I'm actually not sure if the situation is still that bad. Most people
seem to spot one of the many warning that tell them to re-run /sbin/lilo
when installing a new kernel, and act accordingly.

- Werner

---------------------------------- cut here -----------------------------------

#!/bin/sh
MAP=/boot/map
[ -f $MAP ] || {
/sbin/lilo
exit
}
for n in /etc/lilo.conf \
`/sbin/lilo -q | awk '{print $1}' | xargs -n 1 /sbin/lilo -I |
grep -v ^/dev`; do
[ $n -nt $MAP ] && {
/sbin/lilo
break
}
done

-- 
  _________________________________________________________________________
 / Werner Almesberger, DI-LRC,EPFL,CH   werner.almesberger@lrc.di.epfl.ch /
/_IN_R_133__Tel_+41_21_693_6621__Fax_+41_21_693_6610_____________________/