Chainloading Grub from Lilo

Recently, I had problems with an old system in that once I'd installed the OS, it wouldn't boot.  It continually restarted itself.  I put this down to the new installation using grub, since previously it was working fine with lilo.

Now, I'd just installed Ubuntu Server 8.10 and figured I'll just remove grub and use lilo instead.  However, the problem was that when you updated the system, the kernel installations would always try to call a script called "update-grub".  So I had to leave grub installed, so that this script would run successfully and allow the kernels to be installed and configured correctly.  Otherwise, each time you attempted to update the system, it would try to configure the kernels again.  The other problem is that Ubuntu will not update your lilo.conf automatically.  So it means you'd have to do it manually.

Well, the best way, was in fact to chainload grub from lilo.  That way, the grub config is updated automatically, and, since lilo is using chainloading grub, you don't have to worry about modifying lilo.conf manually.

Effectively, all you need to do is install grub to your /boot partition or whever /boot is located.  In my instance, it's located on /dev/sda2.  So:

grub --no-floppy
root (hd0,1)
setup (hd0,1)
quit

the main thing being you're not installing grub to the mbr, but to the location of where /boot resides.  Now, for configuring /etc/lilo.conf:

lba32
boot=/dev/sda
prompt
timeout=50
default=Ubuntu

other=/dev/sda2
  label=Ubuntu

then just do:

lilo -v

and you're now chainloading grub from lilo!  I had to do this, because I had a Highpoint controller, which was the main cause of my problems with grub.