?
Solved

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

Posted on 2011-05-05
10
Medium Priority
?
1,000 Views
Last Modified: 2012-05-11
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
0
Comment
Question by:Elena Quinn
  • 3
  • 3
  • 2
  • +1
10 Comments
 
LVL 38

Expert Comment

by:wesly_chen
ID: 35702454
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
 
LVL 1

Author Comment

by:Elena Quinn
ID: 35702681
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
 
LVL 19

Expert Comment

by:jools
ID: 35702856
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
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 
LVL 38

Expert Comment

by:wesly_chen
ID: 35702887
0
 
LVL 81

Accepted Solution

by:
arnold earned 1336 total points
ID: 35703512
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
 
LVL 1

Author Comment

by:Elena Quinn
ID: 35708108
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
 
LVL 38

Assisted Solution

by:wesly_chen
wesly_chen earned 664 total points
ID: 35708172
> 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
 
LVL 81

Assisted Solution

by:arnold
arnold earned 1336 total points
ID: 35708287
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
 
LVL 19

Expert Comment

by:jools
ID: 35716656
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
 
LVL 1

Author Comment

by:Elena Quinn
ID: 35732750
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

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses
Course of the Month15 days, 10 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question