How to replace GRUB with LILO on a remote Linux server

We generally prefer to use LILO (which comes with Owl) rather than GRUB (a more popular choice these days) on remote Linux servers that we administer. This is due to LILO's pre-reboot configuration file parsing and the “lilo -R” feature, which we rely upon for our remote reboots.

On many occasions, we're given a server with GRUB pre-installed, and we want to replace GRUB with LILO (usually along with replacing the system with Owl). Unfortunately, there's some risk that we make an error in the LILO configuration, so the server will fail to come back up, and GRUB will no longer be there too.

Luckily, there's a way to add a fallback to GRUB from LILO. Simply copy GRUB's MBR to a partition's boot sector:

dd if=/dev/sda of=/dev/sda1 bs=512 count=1

Then specify the fallback to GRUB in /etc/lilo.conf like this:


In fact, make the fallback the default - either by listing the above section first (before any image sections) or by specifying default=grub. Then activate the new “LILO native” label (one that uses image) with lilo -R (giving the label name as that command's argument) - and reboot. If everything goes well, the “LILO native” label will boot up successfully. If not, the next reboot will result in a fallback to GRUB (via LILO). In order to automate this next reboot on some possible failures, specify append=“panic=10” or addappend=“panic=10” (as appropriate) on the “LILO native” target.

The above has been tested with migration from CentOS 5.5 (GRUB) to Owl 3.0 (LILO).

internal/grub-lilo.txt · Last modified: 2011/01/11 23:48 by solar
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate to DokuWiki Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki Powered by OpenVZ Powered by Openwall GNU/*/Linux