Reinstalling Lilo: Difference between revisions

From SlackWiki
Jump to navigation Jump to search
(Copy from old)
 
No edit summary
Line 1: Line 1:
Once upon a time you try to boot Slackware, something happens and lilo is messed up. You can fix lilo really easily, all you need is CD1 of Slackware. Boot the CD and when it says boot: then you type the following:
this covers straight unencrypted installs. just a simple installation with everything
installed under / mounted under /dev/sda1. No LVM or additional drives. if you're encrypted
or have an otherwise fancy install this wiki expects that you understand the intricacies of
your own system. for a more in depth look at how to chroot your installation
media (which can be extremely useful for more that just lilo)
see [https://docs.slackware.com/howtos:slackware_admin:how_to_chroot_from_media here]


: <code>huge.s root=/dev/hda1 noinitrd ro</code>
insert and boot your installation media


Now you change huge.s to the kernel you want to boot, root= should reflect the root partition of your Slackware install. Now when you type this you have Slackware booting up with the bare.i default kernel. Now at the login prompt you login as root and either type:
login as root when prompted but do not run setup


: <code>liloconfig</code>
'''Mounting'''


That will setup Lilo from a ncurses based menu. Now you can also edit lilo's config from a file:
mount /dev/sda1 /mnt


: <code>vi /etc/lilo.conf</code>
mount -o bind /dev /mnt/dev


Either way it will fix it hopefully, Now remember man lilo has all the hex errors if you need them. When you have all that setup you now can run:
mount -o bind /proc /mnt/proc


: <code>/sbin/lilo -v</code>
mount -o bind /sys /mnt/sys


Now you must run lilo every time you change /etc/lilo.conf to update the changes, Now restart without the CD and it should work.
'''Chrooting'''


[[Category:Tutorials]]
Once the partition is mounted, we can chroot to it:
 
chroot /mnt /bin/bash
 
now simply run "liloconfig" and follow the prompts

Revision as of 13:27, 28 October 2018

this covers straight unencrypted installs. just a simple installation with everything installed under / mounted under /dev/sda1. No LVM or additional drives. if you're encrypted or have an otherwise fancy install this wiki expects that you understand the intricacies of your own system. for a more in depth look at how to chroot your installation media (which can be extremely useful for more that just lilo) see here

insert and boot your installation media

login as root when prompted but do not run setup

Mounting

mount /dev/sda1 /mnt

mount -o bind /dev /mnt/dev

mount -o bind /proc /mnt/proc

mount -o bind /sys /mnt/sys

Chrooting

Once the partition is mounted, we can chroot to it:

chroot /mnt /bin/bash

now simply run "liloconfig" and follow the prompts