dist-upgrade installed new kernel = KERNEL PANIC [SOLVED]

James Gray james at grayonline.id.au
Wed Nov 23 14:00:32 UTC 2005


On Wed, 23 Nov 2005 23:34, Dennis Kaarsemaker wrote:
> On wo, 2005-11-23 at 22:58 +1100, James Gray wrote:
> > Great.  That's just super.  I noticed the Bugtraq message (USN-219-1)
> > about a new kernel to fix some vulnerabilties so like a good little boy
> > I go through the "apt-get update && apt-get -u dist-upgrade" and voila.
> >  New kernel, grub updated, now reboot.
> >
> > Reboot gets as far as uncompressing the kernel (2.6.12-10-686) then
> > trying to load the initrd.  It then barfs saying it ran out of
> > compressed data and can't find the root file system.  Surprise,
> > surprise.
> >
> > This will teach me for doing an update the night before a customer
> > demo. Sigh.  With a bit of luck, I *might* get this fixed before I fly
> > out in 5 hours time.
>
> You can still boot into the old kernel, do that and do dpkg-reconfigure
> linux-image-2.6.12-10-686

Erm - that would be true except my /boot partition is ridiculously tiny 
(15MB) and can really only accommodate 1 kernel at a time.  So I had to 
reboot "blind" with the new kernel as I removed the old kernel to fit the 
new one.

Anyway, turns out the 15MB partition (WTF was I smoking when I set that?!) 
meant the initrd that was created by the postinst script didn't finish 
writing before the /boot partition filled up.  IOW, the compressed cramfs 
initrd.img was never written out correctly.

A little googling on my other machine turned up this (watch the wrap):
http://www.edseek.com/archives/2004/03/22/creating-an-initrd-image-on-debian-gnulinux/

So after pulling out my trusty Knoppix CD, setting up a chroot, I created a 
new initrd.img and could boot my 2.6.12-10-686 Ubuntu kernel again.  I now 
know more about creating initial ram disks than I ever really wanted to.

Here's the traps I fell into:
1. 15MB for /boot really isn't enough.  Multiply that by about 10 and you're
   in the right ball park.
2. When a package throws half a screen of warning message telling you in
   detail why whatever you're trying to do is a "bad thing" - FFS, READ IT!!
3. Never remove a working kernel until you've verified the new kernel is OK.
4. Know how to dig yourself out of a hole (or have a spare machine to find
   the answer).

The most embarrassing thing for me is that I have been a Unix engineer for 
more than a decade, I've been playing with Linux since the pre 1.0 kernel, 
I have a bachelor's degree in Comp Sci and I got cocky and rushed a kernel 
upgrade.  No matter how good you think you are, there's always something 
waiting around the corner to bite you on the arse!  I'm feeling a little 
sheepish....asbestos suit on - flame away!

It's late.  I have to leave for the airport in 3 hours.  I haven't slept.  
Tomorrow should make for entertaining product demos...now, where did I 
leave my amphetamines?

Take care all!

James
-- 
For every bloke who makes his mark, there's half a dozen waiting to rub it 
out.
		-- Andy Capp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20051124/26e10928/attachment.sig>


More information about the ubuntu-users mailing list