<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>
<META content="MSHTML 6.00.2800.1505" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=633400519-21062005>Finally... Thank you Anthony. Here is the simple
solution:</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=633400519-21062005></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=633400519-21062005>boot
from any live CD or boot disk</SPAN></FONT></DIV>
<DIV><FONT><SPAN class=633400519-21062005>
<P><FONT face=Arial><FONT color=#0000ff size=2># mount /dev/hda2
/mnt/hda2 <SPAN class=633400519-21062005>-o dev</SPAN><BR># mount /dev/hda1
/mnt/hda1 <BR># mount --bind /mnt/hda1 /mnt/hda2/boot </FONT></FONT></P>
<P><FONT face=Arial><FONT color=#0000ff size=2># chroot /mnt/hda2 /bin/bash
<BR># lilo </FONT></FONT></P></SPAN></FONT></DIV>
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Phillip Qin
[mailto:Phillip.Qin-szgMhqSEIEG+XT7JhA+gdA@public.gmane.org] <BR><B>Sent:</B> June 21, 2005 2:33
PM<BR><B>To:</B> 'tlug-lxSQFCZeNF4@public.gmane.org'<BR><B>Subject:</B> RE: [TLUG]: Rescure - Debian
LILO failure after upgraded to 3.1<BR><BR></FONT></DIV>
<P><FONT size=2>Almost close. I did following mounts:</FONT> </P>
<P><FONT size=2># mount /dev/hda2 /mnt/hda2</FONT> <BR><FONT size=2># mount
/dev/hda1 /mnt/hda1</FONT> <BR><FONT size=2># mount --bind /mnt/hda1
/mnt/hda2/boot</FONT> </P>
<P><FONT size=2>I then</FONT> <BR><FONT size=2># chroot /mnt/hda2
/bin/bash</FONT> <BR><FONT size=2># lilo</FONT> </P>
<P><FONT size=2>FATAL: Open /dev/hda Permision denied</FONT> </P><BR><BR>
<P><FONT size=2>-----Original Message-----</FONT> <BR><FONT size=2>From: Anthony
de Boer [<A
href="mailto:adb-tlug-AbAJl/g/NLXk1uMJSBkQmQ@public.gmane.org">mailto:adb-tlug-AbAJl/g/NLXk1uMJSBkQmQ@public.gmane.org</A>]
</FONT><BR><FONT size=2>Sent: June 21, 2005 1:45 PM</FONT> <BR><FONT size=2>To:
'tlug-lxSQFCZeNF4@public.gmane.org'</FONT> <BR><FONT size=2>Subject: Re: [TLUG]: Rescure - Debian LILO
failure after upgraded to 3.1</FONT> </P><BR>
<P><FONT size=2>Seneca wrote:</FONT> <BR><FONT size=2>> On Tue, Jun 21, 2005
at 12:42:07PM -0400, Phillip Qin wrote:</FONT> <BR><FONT size=2>> > I
upgraded my debian from 3.0 to 3.1 sarge but I didn't upgrade the
</FONT><BR><FONT size=2>> > kernel to sarge's 2.4 kernel. I rebooted my
server and all I see is </FONT><BR><FONT size=2>> > LI and beeps. Any
thought on how to bring the system back?</FONT> <BR><FONT size=2>>
</FONT><BR><FONT size=2>> Use some other bootable media, such as a livecd, to
boot from and </FONT><BR><FONT size=2>> mount your root partition.
After fixing any problems with lilo's </FONT><BR><FONT size=2>> config, rerun
lilo using that fixed config (you may need to download a </FONT><BR><FONT
size=2>> copy of lilo, depending on what's on the bootdisk).
Alternately, you </FONT><BR><FONT size=2>> can switch bootloaders, if you
really want.</FONT> </P>
<P><FONT size=2>You can usually use the copy of /sbin/lilo already on your hard
drive, eg. boot from a CD or such, then:</FONT> </P>
<P><FONT size=2> # mount /dev/hda1 /mnt</FONT> <BR><FONT size=2> #
chroot /mnt /bin/bash</FONT> <BR><FONT size=2> # lilo</FONT> <BR><FONT
size=2> # ^D</FONT> <BR><FONT size=2> # umount /dev/hda1</FONT> </P>
<P><FONT size=2>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.</FONT></P>
<P><FONT size=2>If /boot was hda1 and root was hda3, root has to go first,
so</FONT> </P>
<P><FONT size=2> # mount /dev/hda3 /mnt</FONT> <BR><FONT size=2> #
mount /dev/hda1 /mnt/boot</FONT> </P>
<P><FONT size=2>and the rest roughly as above, unmounting in reverse
order.</FONT> </P>
<P><FONT size=2>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.</FONT></P>
<P><FONT size=2>-- </FONT><BR><FONT size=2>Anthony de Boer</FONT> <BR><FONT
size=2>--</FONT> <BR><FONT size=2>The Toronto Linux Users
Group. Meetings: <A href="http://tlug.ss.org"
target=_blank>http://tlug.ss.org</A></FONT> <BR><FONT size=2>TLUG requests:
Linux topics, No HTML, wrap text below 80 columns How to UNSUBSCRIBE: <A
href="http://tlug.ss.org/subscribe.shtml"
target=_blank>http://tlug.ss.org/subscribe.shtml</A></FONT> </P></BODY></HTML>