Home > Linux, Slackware > Re-installing lilo from a Slackware boot CD

Re-installing lilo from a Slackware boot CD

September 29th, 2009 Leave a comment Go to comments

So you broke lilo. Well done.

Insert your Slackware install DVD or CD1 and boot with defaults.
Once booted:

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

where /dev/sda1 is your installed / partition. Adjust as necessary.

Be Sociable, Share!
Categories: Linux, Slackware Tags: , , ,
  1. slava_dp
    November 13th, 2009 at 14:43 | #1

    Vim fail :) There’s only vi in the installer ;)

  2. November 13th, 2009 at 14:47 | #2

    @slava_dp
    Very good point.. I shall modify accordingly.

  3. mosk0bit
    November 13th, 2009 at 21:23 | #3

    In chroot, you are out of limitation of the installation CD and have all editors installed in the system at your disposal (unless /usr is mounted on a separate partition).

  4. November 14th, 2009 at 10:15 | #4

    @mosk0bit
    @slava_dp

    An even better point! I knew there was a reason I used vim in the first place.

    I will still leave the article as vi though since vim cannot be guaranteed to be part of the installed environment.

  5. lazenby
    November 6th, 2012 at 08:11 | #5

    I had to type “chroot /foo”.

    No “/” = no workee.

  6. November 29th, 2012 at 08:46 | #6

    @lazenby
    Fair point.. “chroot foo” assumes you were in “/” to start with (which often you are in this scenario).

    I’ve added the explicit forwardslash.

  1. April 28th, 2010 at 10:05 | #1
  2. April 28th, 2010 at 10:30 | #2
  3. June 25th, 2010 at 09:09 | #3
  4. July 6th, 2010 at 08:34 | #4
  5. July 6th, 2010 at 08:56 | #5
  6. May 13th, 2011 at 16:32 | #6
  7. March 12th, 2012 at 12:48 | #7
  8. June 3rd, 2013 at 10:52 | #8

Note: Commenter is allowed to use '@User+blank' to automatically notify your reply to other commenter. e.g, if ABC is one of commenter of this post, then write '@ABC '(exclude ') will automatically send your comment to ABC. Using '@all ' to notify all previous commenters. Be sure that the value of User should exactly match with commenter's name (case sensitive).