LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-05-2011, 01:38 PM   #1
Equinn
LQ Newbie
 
Registered: Feb 2008
Location: California
Distribution: Slackware 13.1
Posts: 24

Rep: Reputation: 0
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:
Code:
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
Here are the steps, I took to update the kernel:

1. Unpack the kernel file:
Code:
cp linux-2.6.39-rc3.tar.bz2 /usr/src
cd /usr/src
tar jxvf linux-2.6.39-rc3.tar.bz2
2. Copy the old config to the new kernel source directory:
Code:
cp/usr/src/linux/.config /usr/src/linux-2.6.39-rc3
3. Configure the new kernel:
Code:
make oldconfig
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.
Code:
make menuconfig
5. Compile the kernel:
Code:
make bzImage
make modules
make modules_install
6. Install the kernel:
Code:
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
7. Edit lilo.conf so I can choose which kernel to boot to.
Code:
# 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
8. Run lilo
Code:
lilo
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
 
Old 05-06-2011, 01:29 AM   #2
plpl303a
Member
 
Registered: May 2011
Posts: 52

Rep: Reputation: 3
Quote:
Originally Posted by Equinn View Post
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,1)

This says that the kernel can't mount the / partition. The "unknown-block(8,1)" gives the device major/minor numbers. On my system, I see this:

$ ls -l /dev/sda1
brw-rw----. 1 root disk 8, 1 May 6 00:06 /dev/sda1

So it looks like your kernel is missing the drivers for your hard disk controller (probably SATA, maybe SCSI).

You'd need an initrd if any of the drivers required for system bootup are in modules... I've found it easier to just make sure all of the ones needed for the system to boot are compiled into the kernel rather than as modules.
 
Old 05-06-2011, 07:15 AM   #3
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL
Distribution: Funtoo
Posts: 6,926

Rep: Reputation: 128Reputation: 128
Quote:
Originally Posted by Equinn View Post
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:

< snip >

5. Compile the kernel:
Code:
make bzImage
make modules
make modules_install
With 2.6 kernels you issue "make" and then "make modules_install".
You should then be able to copy it from arch/$ARCH/boot/bzImage
to /boot without changing directories; though you can cd, it's just not
necessary.

Quote:
Originally Posted by Equinn View Post
6. Install the kernel:
Code:
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
You should NEVER remove the working kernel (technically you didn't). The one I setup
when installing an OS (many times a custom and not distro kernel even) is ALWAYS left
in place and it remains /boot/vmlinuz no matter how many new ones. This is /boot on my
laptop, running two Gentoo kernels (one for Nvidia, one for nouveau) and Slackware:
Code:
lrwxrwxrwx  1 root root      32 Mar  9 04:46 vmlinuz -> vmlinuz-generic-smp-2.6.33.4-smp
-rw-r--r--  1 root root 2900736 Jan 28 11:34 vmlinuz-2.6.37
-rw-r--r--  1 root root 2904320 Apr 21 14:41 vmlinuz-2.6.37-nvidia
-rw-r--r--  1 root root 3063616 May  3 17:55 vmlinuz-2.6.39-rc5-git7-nouveau
-rw-r--r--  1 root root 2545840 May 13  2010 vmlinuz-generic-2.6.33.4
-rw-r--r--  1 root root 2662400 May 12  2010 vmlinuz-generic-smp-2.6.33.4-smp
-rw-r--r--  1 root root 5243760 May 13  2010 vmlinuz-huge-2.6.33.4
-rw-r--r--  1 root root 5421536 May 12  2010 vmlinuz-huge-smp-2.6.33.4-smp
To expand on what the other poster said, you MUST have your / fs and support for
the disk controller / is on built into the kernel, or an initial ram disk image (initrd), in
order to boot the system.

This is my small but adequate Kernel Rebuild Guide - hope it helps you.

Edit: Though I didn't go back and check, maybe the kernel you were running has
support for IDE drives and not PATA drives ... bears checking. If you can't find the issue
on your own, post (in code tags) the output of "lspci -k" from that working kernel, and
the .config for your new kernel (post a link to the file somewhere), and I'll be glad to look
them over and give you an opinion.

Last edited by Bruce Hill; 05-06-2011 at 07:20 AM.
 
Old 05-10-2011, 03:10 PM   #4
Equinn
LQ Newbie
 
Registered: Feb 2008
Location: California
Distribution: Slackware 13.1
Posts: 24

Original Poster
Rep: Reputation: 0
OK - I went back and reconfigured making sure the filesystem and SATA drivers were built in and now I can boot.

When I tried the initrd thing, it didn't work. It gave me a different error (can't remember now - something wasn't where it was supposed to be), but it also wouldn't boot.

Anyway, it's working now. Not sure why when I did 'make oldconfig' it wouldn't have done that automatically, since it's the same SATA drive and same filesystem. And there were no initrd files anywhere in the '/boot' directory. Sometimes I think I'm never going to get this Linux thing.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
RHEL4 Strange kernel panic on boot. Kernel Update no solution RattleSn@ke Red Hat 3 02-07-2009 03:24 AM
Trying to Update kernel. Kernel Panic!! lebabyg Fedora 3 03-12-2006 05:28 AM
Kernel Panic...I did something wrong, but I do not know what? sarajevo Debian 3 02-06-2006 05:27 AM
Kernel Panic after trying to update Kernel to 2.6 several times LearningToLive Slackware 10 01-19-2006 08:57 AM
YaST Online Update + AMD kernel patch = kernel panic THX1138 Linux - General 3 10-26-2003 04:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration