LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] whoops

[ILUG] whoops

Kenn Humborg kenn at avalon.wombat.ie
Thu Oct 7 11:23:07 IST 1999


On Thu, Oct 07, 1999 at 09:45:22AM +0100, John McCormac wrote:
> Ken Guest wrote:
> > 
> > ok,
> > I did something unbelievably daft last night.
> > Compiled a SuSE 5.2 kernel for ip forwarding,
> > made a backup copy of the existing one and put
> > the new kernel in place.
> > And then rebooted.
> > 
> > 2 seconds later I realised 'b*&%*&% I forgot to
> > run lilo!'
> 
> Use a boot floppy to boot the system. (I think that there is a good
> emergency root disk on Slackware 4.0 and probably most of the distros).
> After booting, and switching to the emergency floppy, mount the root,
> move the kernels. Then reboot again. This time, mount your / partition
> from the boot: parameter. Then you may be able to run lilo again.

Moving the kernels back will not guarantee that the old kernel ends up
in the same sectors on disk.  In fact, here is a tip:

TIP OF THE DAY:  When copying a kernel over another kernel, always backup
                 the old kernel by moving it, not copying it.  For example:

                    # mv /boot/vmlinuz /boot/vmlinuz.backup
                    # cp /usr/src/.../zImage /boot/vmlinuz

                 Do not do:

                    # cp /boot/vmlinuz /boot/vmlinuz.backup
                    # cp /usr/src/.../zImage /boot/vmlinuz

                 Doing it the first way ensures that the old kernel still
                 resides in the same sectors that it always did so that 
                 LILO can still find it if you forget to re-run lilo (or
                 if you get a power failure before you get a chance to
                 run it).

Easier way to solve Ken's problam...

1. boot from emergency boot floppy.
2. Mount your old root partition manually:

   # mount -t ext2 /dev/hdXX /mnt

3. Pop in a blank floppy.
4. Locate your original kernel and copy it to the floppy

   # cp /mnt/boot/vmlinuz /dev/fd0

5. Sync and reboot.
6. Kernel will load from floppy and system will start as normal.
7. Run lilo!

It's a good idea to keep a plain kernel-boot floppy around.
See the rdev(8) man page for info on configuring the root device
and other stuff on a raw kernel.

Later,
Kenn





More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell