Kernel Panic after Kernel update - what am I doing wrong?

Hi Folks,

I have just tried to update my kernel from 2.6.24.5 to 2.6.39-rc3 on a Slackware 12.1 distribution. I have successfully updated the kernel before, but it was from a newer distribution and newer kernel(Slackware 13.1 and 2.6.33.4).

After I updated and rebooted, I got the following error:


List of all partitions:
0300          4194302 hda  driver: ide-cdrom
0800        312571224 sda  driver: sd
  0801        244197560 sda1 00000000-0000-0000-0000-000000000sda1
  0802         68372640 sda2 00000000-0000-0000-0000-000000000sda2
No filesystem could mount root, tried:  romfs
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,1)
Pid: 1, comm: swapper Not tainted 2.6.39-rc3-smp #1
Call Trace:
 [<c103322b>] ? printk+0x1b/0x20
 [<c10322fa>] panic+0x5a/0x180
 [<c14bacf7>] mount_block_root+0x187/0x260
 [<c10afb47>] ? sys_mknod+0x27/0x30
 [<c14ba530>] ? do_early_param+0xa0/0xa0
 [<c14bae33>] mount_root+0x63/0xd0
 [<c14baff3>] prepare_namespace+0x153/0x1b0
 [<c10a1deo>] ? sys_access+0x20/0x30
 [<c14ba64c>] kernel_init+0x11c/0x150
 [>c13461b6>] kernel_thread_helper+0x6/0xd

Open in new window


Here are the steps, I took to update the kernel:

1. Unpack the kernel file:


cp linux-2.6.39-rc3.tar.bz2 /usr/src
cd /usr/src
tar jxvf linux-2.6.39-rc3.tar.bz2

Open in new window

2. Copy the old config to the new kernel source directory:

cp/usr/src/linux/.config /usr/src/linux-2.6.39-rc3

Open in new window


3. Configure the new kernel:

make oldconfig

Open in new window


In the above step, I just hit 'enter' for every question, accepting the default.

4. I also ran the menu config to make sure some things were installed, like support for USB 3.0.

make menuconfig

Open in new window


5. Compile the kernel:

make bzImage
make modules
make modules_install

Open in new window


6. Install the kernel:

cd /boot
rm vmlinuz
ln -s vmlinuz-huge-smp-2.6.24.5-smp vmlin24
cp /usr/src/linux-2.6.39-rc3/arch/x86/boot/bzImage /boot/vmlinuz-2.6.39-rc3
ln -s vmlinuz-2.6.39-rc3 vmlin39

Open in new window


7. Edit lilo.conf so I can choose which kernel to boot to.

# Linux bootable partition config begins
image = /boot/vmlin24
  root = /dev/sda1
  label = Linux2.6.24.5
  read-only
image = /boot/vmlin39
  root = /dev/sda1
  label = Linux2.6.39-rc3
  read-only
# Linux bootable partition config ends

Open in new window


8. Run lilo

lilo

Open in new window


9. Reboot and select Linux2.6.39-rc3 to boot.

Then, the error happens. I would appreciate any assistance to help me figure out what I did wrong or what the problem might be.

Thanks,
Equinn
LVL 1
Elena QuinnAsked:
Who is Participating?
 
arnoldCommented:
copying a .config file is not a good idea as there are other changes that might not be caught with this.
usually you should run the make menu and then go through the new kernel to match the loading/inclusion of modules/drivers that are referenced in the make menu of the existing functional kernel.  once you complete the kernel you build should include all the needed modules/drivers to boot your system with everything functioning.
0
 
wesly_chenCommented:
check this
http://itslaves.com/web/guest/forum/message_boards/message/66813
---------- quote -----
A SATA disk was used, and the libraries were missing for it - in the initrd.gz file.
0
 
Elena QuinnAuthor Commented:
Hi Wesly,

First, I don't know what that is.  Where do I find it and what do I do about it?

Second, the old kernel was using a SATA disk and it is able to boot and I used that config to configure the new kernel.  So wouldn't that have avoided this problem?

I'm new at this so I apologize if I'm supposed to know this.

Thanks,
Equinn
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
joolsCommented:
You need to recreate the initrd with the drivers for the card your root file system is on

I've not used slackware before so I use mkinitrd to do it after updating modules.conf

0
 
wesly_chenCommented:
0
 
Elena QuinnAuthor Commented:
Wesly,

Thanks for the readme.  I don't understand why I would need an initrd.gz, if it wasn't being used on the previous kernel.  I didn't see anything about it in lilo.conf.

Also, on my previous attempts that were successful (granted from a newer kernel), I didn't have to do that.

Thanks,
Equinn
0
 
wesly_chenCommented:
> on my previous attempts that were successful
It depends on the change from version to version.
2.6.39-rc3 is beta version so it usually is not fully tested with compatibility.
So it is recommended that you create the initrd.
0
 
arnoldCommented:
ls -l /boot you should have an initrd set of files there.
This is always built with the kernel.

you have to go through the kernel module/drivers/features and enable to ones you need.
Have not run the kernel build recently.
as wesly_chen pointed out your new kernel is missing a module/driver.

Why are you copyin, I think there was a make install <> that dealt with copying the bzimage/etc. into the /boot and configuring lilo accordingly.
0
 
joolsCommented:
the error you posted seems to indicate that the system does not have the drivers to find the operating system, you should at least confirm that the initrd is actually correct or if you can supply more information.
0
 
Elena QuinnAuthor Commented:
OK, I couldn't find any 'initrd' files in the /boot directory.  Then I ran the mkinitrd like the tutorial suggested and it made the initird..gz file.  Then I edited lilo.conf and ran lilo.  But I still couldn't boot. It had a different error, something about something not being where it was supposed to be, and gave me a prompt so I could "fix it" (yeah, right.  clearly they don't know the level of newbie they're dealing with).  

So then I went back and reconfigured the kernel and made sure that the SATA drivers and the file system were both built in.  I recompiled and installed and low and behold it booted.  I still don't quite understand why those things wouldn't automatically be in the original config file.  I thought using  'make oldconfig' would take everthing the original kernel had and make it the same in the new kernel.  I don't think I will ever quite understand Linux.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.