How To Fix LILO

Author: Steven Neiland

Warning: This blog entry was written two or more years ago. Therefore, it may contain broken links, out-dated or misleading content, or information that is just plain wrong. Please read on with caution.

So this weekend I was playing around with different configurations for installing Linux and Windows. Well somewhere along the line I managed to break lilo. Fortunately fixing it was not that hard. Here are the steps I followed to fix it.

Steps To Fix Lilo

To get started first insert your Slackware install disk and boot up your machine. When you boot up just select he defaults. Once the machine is booted up run the following commands.

Note: My system was installed to "/dev/sda1". You may have to modify there commands to suit your configuration.

//Create A Temporary Directory
mkdir /foo

//Mount the drive the system is installed to, to the created temp directory
mount /dev/sda1 /foo

//mount bind the proc/sys/dev folders
mount --bind /proc /foo/proc
mount --bind /sys /foo/sys
mount --bind /dev /foo/dev

//Change Apparent Root To The Mounted Temp Directory
chroot foo

//Now we edit the lilo conf file
vi /etc/lilo.conf

//Reinstall the boot loaded

//Exit the command screen

With these commands run you should now be able to reboot your system and have Lilo working correctly.

Reader Comments

  • Please keep comments on-topic.
  • Please do not post unrelated questions or large chunks of code.
  • Please do not engage in flaming/abusive behaviour.
  • Comments that contain advertisments or appear to be created for the purpose of link building, will not be published.

Archives Blog Listing