Sunday, February 25, 2007

Grub vs Lilo

Every six months (or so) when I upgrade to the next version of ubuntu this little contest replays itself. Every time I think to myself, maybe THIS time I can replace lilo with grub. And every time grub loses.

I don't know why. It is not like I don't make an effort. Maybe my hardware is just weird, although even that seems unlikely: It is a pretty standard via chipset with a seagate SATA drive.

The symptoms are pretty much the same. Grub fails to boot the machine. It fails to get to stage2, I never get the menu or the shell, just an error message: GRUB Hard Disk Error. I go through the motions tree or four times, then I give up and install lilo, which always works first time.

I must admit that grub works fine on other systems, but somehow lilo is still my trusted champion. For all it's inflexibility (not being able to edit things at boot time) I find it to be way more flexible than grub.

During a short stint with OS/2 I learned that the idea behind grub isn't really new. OS/2 had it for ages. FreeBSD too. The idea being that the boot loader has the ability to read the filesystem, which means more flexibility at boot time, as opposed to the static block-based method used by more primitive loaders. Specifically, the OS/2 loader makes use of a mini-ifs (installable filesystem) that contains just enough functionality to read the required parts of the filesystem: the OS/2 kernel and CONFIG.SYS. From CONFIG.SYS it later obtains the correct drivers to load, one of which is the real IFS that provides full support for the target filesystem. One clever bloke actually wrote an IFS for ext2, which means you can run OS/2 from ext2.

Yet this ability to read the filesystem is always limited to some extend, and while useful, there is still great complexity involded as the tiny MBR can hardly contain everything needed to boot into a bootloader shell. I suspect my problem with grub is probably the inability to find stage1_5 or stage2, which means that is suffers pretty much from the same problems lilo often suffers from, except that it occurs so early in the boot cycle that it loses all it's so called benefits.

If grub was to offer me any other benefit I might even work a little harder at getting it going, but I really just want the machine to boot. I cannot for the life of me see any point in spending hours getting grub going when lilo will do the job right here and right now.

So I'm back with lilo until feisty makes it onto this here machine... when I'll probably go through this excercise again.

0 Comments:

Post a Comment

<< Home