Thursday, December 6, 2012

How to repair LILO on Slackware

The day before yesterday I spent horsing around tryihg to get gtk+3 installed. In the process I removed the pkg for gdk-pixbuf2-2.23.3 (because I wanted to replace it with gdk-pixbuf-2.26.1). I realized that this broke x for xfce. After terminating the x server I could not resurrect it. According to the messages in the console, it was because gdk-pixbuf was missing.

I thought this was odd, as I had just updated gdk pixbuff. I went ahead and rebooted my system. Because I still have some data I need to salvage from the previous windows install, I am using a dual boot system. So, I allowed lilo to boot slackware, but was instead met with a wierd error stating there was no space/ LILO was out of bounds?

So, I had to break out with the install disk to repair lilo. I've done this now a few times, but I thought I'd repost these directions in case anyone needs them.

1. Boot into Slackware installation environment appropriate for your system.

2. mkdir /foo

3. mount /dev/sda1 /foo

4.  mount --bind /proc /foo/proc

5.  mount --bind /sys /foo/sys

6.  mount --bind /dev /foo/dev

7. chroot /foo

8. vi /etc/lilo.conf (make any changes if neccessary)

9. lilo

10. exit

11. reboot

Where /dev/sda1 is your root partition. Of course, if you are one of those people who dedicated a partition for /etc, then you will want to mount this too. Foo can be replaced with any arbitrary name.

Running LILO after making any neccessary changes will reinstall LILO. You should now be able to boot your system!

Once I restored LILO, I was able to boot successfully again. However, I still had the same issue launching the x server due to the missing  gdk-pixbuf2-2.23.3 library. I simply removed the new version and reinstalled the pkg off of the install disk, and I was good to go!

Sources:

a. http://blog.tpa.me.uk/2009/09/29/re-installing-lilo-from-a-slackware-boot-cd/

Credit for this procedure goes to Zordrak.

Note: Although I'm sure this procedure was meant for Slackware 12, I've successfully done this on 13.0 and 13.37. I'm certain it will work for 14.0, and future revisions (unless things start to drastically change, or if we go to grub :)

Diego