<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2654.45">
<TITLE>RE: [TLUG]: Rescure - Debian LILO failure after upgraded to 3.1</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2>That's what I need. My / is on /dev/hda2 and /boot is on /dev/hda1. mounting /dev/hda2 is fine. When I was trying to mount /dev/hda1, it says</FONT></P>
<P><FONT SIZE=2>Wrong fs type, superblock ......</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>