Friday, February 04, 2005

GRUBbing

For past two days I was stuck on this issue with GRUB. I downloaded L4Linux-Fiasco bootable CD last weekend. Running L4Linux out of the CD was very easy, considering my failed attempts with L4Linux-pistachio. But booting from the CD did not mounted the harddisk filesystem. So I reverse engineered the booting mechanism from the CD and tried to change my Grub Bootloader to load the fiasco kernel and L4Linux module. I copied these binaries from CD to my harddisk /boot.

But this was not sufficient. The booting of this kind with gnu-grub fails - but it fails gracefully giving very useful message that you need Desden's modified grub bootloader to load their kernel. So there started my GRUBbing. Out of total lack of common sense, it took me couple of days of how to download dresden's grub source code. But even after building the grub binaries, it was very hard to figure out how to install it. "make install" places the binaries in some bin, sbin directories, but I knew that it has to do something more subtle (below the file system) to install the new bootloader. I manually replaced some binaries from /boot/grub, /sbin/, /usr/local/bin etc., even after knowing that it wasn't of any use. Meanwhile I read through GRUB manual, posted on mailing list, but no use. I ran grub-install script, but still no use. You have to give to grub-install the device on which you want to load the bootloader. I naively gave /dev/hda6, the device which holds my '/' mount. Then yesterday I found this link

http://www.sims.berkeley.edu/~jhall/grub_install_hda1.html

talking about recovering the system after the person had accidently installed the grub stage1 onto his windows partition. There I found out that to reinstall the grub you need to execute grub-install with /dev/hda.

This worked...

After some twiking of grub.conf I got the machine booted with fiasco and L4Linux binaries downloaded from the CD. However this worked, the binaries are somehow tied to the CD and won't mount my hard disk file systems and won't even work without CD. So I am planning now to build all those binaries separately and boot them.

Meanwhile I will again give a shot to booting L4Linux-Pistachio with my new GRUB.

No comments: