Repairing LILO

At the time of this writing, both of the documentation that I refer to when I accidentally break my Lilo are offline! So here is my guide:

All you need is the first CD or DVD of Slackware. Any version will do but preferably the latest version if possible.

Boot with defaults.

Do this:

mkdir /spreadlove
mount /dev/sda1 /spreadlove
mount --bind /proc /spreadlove/proc
mount --bind /sys /spreadlove/sys
mount --bind /dev /spreadlove/dev
chroot spreadlove
vi /etc/lilo.conf
lilo
exit
reboot

Of course, change sda1 to something else if you know it’s not sda1.