Rescure - Debian LILO failure after upgraded to 3.1
Anthony de Boer
adb-tlug-AbAJl/g/NLXk1uMJSBkQmQ at public.gmane.org
Tue Jun 21 17:44:45 UTC 2005
Seneca wrote:
> On Tue, Jun 21, 2005 at 12:42:07PM -0400, Phillip Qin wrote:
> > I upgraded my debian from 3.0 to 3.1 sarge but I didn't upgrade the kernel
> > to sarge's 2.4 kernel. I rebooted my server and all I see is LI and beeps.
> > Any thought on how to bring the system back?
>
> Use some other bootable media, such as a livecd, to boot from and mount
> your root partition. After fixing any problems with lilo's config,
> rerun lilo using that fixed config (you may need to download a copy of
> lilo, depending on what's on the bootdisk). Alternately, you can switch
> bootloaders, if you really want.
You can usually use the copy of /sbin/lilo already on your hard drive,
eg. boot from a CD or such, then:
# mount /dev/hda1 /mnt
# chroot /mnt /bin/bash
# lilo
# ^D
# umount /dev/hda1
Notes: you need to know which device was your root partition, if you had
a /boot you need to mount it too, the chroot command puts you into the
harddrive's environment running its bash, and lilo may show errors, but
hopefully you've got your favourite editor and can fix that. The
control-D takes you back out to the CD boot environment so you can
unmount your HD filesystem and reboot cleanly.
If /boot was hda1 and root was hda3, root has to go first, so
# mount /dev/hda3 /mnt
# mount /dev/hda1 /mnt/boot
and the rest roughly as above, unmounting in reverse order.
The chroot command was originally for issues like this (running one copy
of the OS virtually under another), long before people started chrooting
daemons for security.
--
Anthony de Boer
--
The Toronto Linux Users Group. Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml
More information about the Legacy
mailing list