Rescure - Debian LILO failure after upgraded to 3.1

Phillip Qin Phillip.Qin-szgMhqSEIEG+XT7JhA+gdA at public.gmane.org
Tue Jun 21 18:33:07 UTC 2005


Almost close. I did following mounts:

# mount /dev/hda2 /mnt/hda2
# mount /dev/hda1 /mnt/hda1
# mount --bind /mnt/hda1 /mnt/hda2/boot

I then
# chroot /mnt/hda2 /bin/bash
# lilo

FATAL: Open /dev/hda Permision denied



-----Original Message-----
From: Anthony de Boer [mailto:adb-tlug-AbAJl/g/NLXk1uMJSBkQmQ at public.gmane.org] 
Sent: June 21, 2005 1:45 PM
To: 'tlug-lxSQFCZeNF4 at public.gmane.org'
Subject: Re: [TLUG]: Rescure - Debian LILO failure after upgraded to 3.1


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gtalug.org/pipermail/legacy/attachments/20050621/c2fc51be/attachment.html>


More information about the Legacy mailing list