[oclug] Boot problem
Brad Barnett
lists at l8r.net
Thu Dec 13 08:31:38 EST 2007
On Wed, 12 Dec 2007 22:40:12 -0500
james terris <shinden at sympatico.ca> wrote:
> Brad Barnett wrote:
> > On Wed, 12 Dec 2007 20:22:58 -0500
> > james terris <shinden at sympatico.ca> wrote:
> >
> >
> >>Hello everyone,
> >>
> >>I recently was trying to install Java on my linux debian server so I
> >can >run Tomcat.
> >>
> >>During the apt-get install java-package (I think) it asked to update
> >>glibc. The install seemed to go ok although it wouldn't recognize my
> >>java path settings so I rebooted the system.
> >>
> >>After rebooting it immediately goes to a prompt that simply says:
> >>grub>
> >>
> >> From that menu I was able to figure out that my boot/grub.menu.lst
> >file >had been renamed to boot/grub.menu.lst~ and replaced with a
> >default copy >(I assume) and my boot/initrd.img-2.4.27-2-386 file was
> >missing. >
> >>So, any idea how to get that initrd.img file back? I could reinstall
> >if >it came down to it I suppose but I would hope that that would be
> >>unnecesary. Is there some new way that grub boots that doesn't need
> >that >file any more?
> >>
> >
> >
> > I have a sneaking suspicion that you were running Debian Sarge, but
> > have 'stable' in apt's sources.list file, instead of 'sarge' or 'etch'
> > for release version.
> >
> > So, what has likely happened is that you have upgraded part of your
> > system to etch, while ignoring many substantial warnings, and are now
> > in a bit of trouble.
> >
> > What you'll need to do, for starters, is to find out what version of
> > Debian you were running. When you know, you're going to have to boot
> > off of something (a CD like Knoppix or a Debian CD with a rescue mode
> > on it). Once you have Linux booted, you'll need to mount your drive,
> > make sure dev and proc are available via a bind mount), and chroot to
> > your old system's root.
> >
> > If you didn't clean out your /var/cache/apt/archives directory, you
> > might have the .deb of your old kernel there. If so, and if your
> > system isn't totally borked, you may be able to simply do an apt-get
> > install --reinstall of that kernel, and all may be well. I suggest
> > this method, because more than your initrd may be missing from your
> > kernel.
> >
> > If you don't have your old kernel there, you can try to copy if off of
> > your install CD for that distro. If not that, you can edit your
> > /etc/apt/source.list file, and change your stable apt lines to 'sarge'
> > if you were indeed using that distro. Then do an apt-get update, and
> > install your old kernel again.
> >
> > I've been intentionally vague about some of this, because resolving
> > this issue over email (with the unknown true state of your system) is
> > probably beyond a reasonable expectation when IRC, Instant Messaging
> > and Live People are possibly other ways of getting help.
> >
> > As well, if every part of this message seems like gibberish to you, a
> > rescue of your current system is going to be a lot of work for you
> > mentally... as it will be quite the learning curve.
> >
> > Put another way, there are a lot of unknown variables with your
> > situation.
> > So, read what I've suggested above as a jumping board, and come back
> > with
> > more details if you want more help...
>
> Ok,
> The original contents of the boot folder are still there except for the
> initrd.img-2.4.27-2-386 file. I can see the different kernels that I had
> compiled.
Hmm. If you have other kernels there that you have compiled, then you
could likely boot off of them? Did you use initrd for those kernels, or
did you compile them without initrd? If you did use initrd for those
kernels, are their initrd files there?
If you can't boot from the main kernel, you could also boot from an older
kernel. Grub should handle this itself (and in fact you should
normally have more than one kernel line for grub shown when you boot).
Try booting from an older kernel.
Best thing at this point, if you do have older kernels on the system that
you think are OK, is to boot up with a rescue method, chroot into your
root filesystem, and run update-grub. Then edit your /boot/grub/menu.1st
(or perhaps first try your old, saved copy?) and make sure all is well.
>
> The last version of the kernel is 2.4.33, it says 3.3.5-13 for Debian
> and I do have "stable" in the sources.list file.
Ok, so one thing you're going to want to do, after you get out of this
problem, is to make sure you change those 'stable' lines to whatever
distro you are currently running. woody, sarge, etc, whatever. However,
probably the best bet, since the system is 1/2 upgraded, is to move to
stable in its entirety.
>
> Unfortunately, there were no warnings when I ran the apt-get. it
> completed successfully and there were no signs of anything unusual until
> I rebooted.
>
> Since the kernel seems to still be there what are the odds that simply
> booting off the cd, fixing the grub files and reinstalling grub allow it
> to boot properly again?
>
Well, the good news is that you don't have to actually reinstall all of
grub, since it is loading at boot time. All you need to do is fix your
/boot/grub/menu.1st, and all should be well.
Since you have older kernels, try reinstating your old menu.1st, taking a
look at it, and booting with it. You can also try running update-grub
from a chroot..
More information about the OCLUG
mailing list