LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
Search this Thread
Old 06-09-2009, 03:36 PM   #1
akaUr
LQ Newbie
 
Registered: Jun 2009
Posts: 7

Rep: Reputation: 0
Question Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block


Hello!

I was just trying to build an LFS system. All was fine, but when i tried to boot, i got an error:

[ _time_ ] VFS: Cannot open root device "sda5" or unknown-block(2,0)
[ _time_ ] Please append a correct "root=" boot option; here are the available partitions:
[ _time_ ] Kernel panic - not syncing: VFS: Unable to mount fs on unknown-block(2,0)
[ _time_ ] Pid: 1, comm: swapper Not tainted 2.6.30-rc8 #1
[ _time_ ] [ _RAM_adress_ ] ? printk+0xf/0x11
[ _time_ ] [ _RAM_adress_ ] panic+0x39/0xd4
[ _time_ ] [ _RAM_adress_ ] mount_block_root+0x163/0x172
[ _time_ ] [ _RAM_adress_ ] ? sysenter_audit+0xb/0x25
[ _time_ ] [ _RAM_adress_ ] mount_root+0x66/0x84
[ _time_ ] [ _RAM_adress_ ] prepare_namespace+0x140/0x167
[ _time_ ] [ _RAM_adress_ ] kernel_init+0x148/0x157
[ _time_ ] [ _RAM_adress_ ] ? kernel_init+0x0/0x157
[ _time_ ] [ _RAM_adress_ ] kernel_thread_helper+0x7/0x10

Do you have any ideas?

Of cause, [ _time_ ] and [ _RAM_adress_ ] were values; but it is strage, they were different =), i think, no use of posting them.

I've searched a lot, but got nothing Not many, some people have had the same (likely same) problem, but their solutions not helped.

Maybe, i need to post more information, just say what i should post =)
 
Old 06-09-2009, 03:41 PM   #2
akaUr
LQ Newbie
 
Registered: Jun 2009
Posts: 7

Original Poster
Rep: Reputation: 0
As you see, now i use 2.6.30-rc8 kernel. I also tried 2.6.27.24, but.. I even tried to use .config files from the host (LFS LiveCD :P) but nothing helped.
 
Old 06-09-2009, 03:44 PM   #3
akaUr
LQ Newbie
 
Registered: Jun 2009
Posts: 7

Original Poster
Rep: Reputation: 0
/boot/grub/menu.lst:

Code:
default 0
timeout 4
color green/black light-green/black # i prefer these colours =)

title Linux 2.6.27.20-rc8 # linux entry
root (hd0,4)
kernel /boot/kernel-2.6.30-rc8 root=/dev/sda5 acpi=off # i have na acpi bug

title Windows XP # hmm.. windows :)
rootnoverify (hd0,0)
chainloader +1
.config file attached
Attached Files
File Type: txt config-2.6.30-rc8.txt (62.4 KB, 5 views)

Last edited by akaUr; 06-09-2009 at 03:56 PM.
 
Old 06-09-2009, 04:01 PM   #4
akaUr
LQ Newbie
 
Registered: Jun 2009
Posts: 7

Original Poster
Rep: Reputation: 0
I've saw an solution here. Just before my =) I havent seen it before, probably google havent cached it)
Trying now.
 
Old 06-09-2009, 04:21 PM   #5
akaUr
LQ Newbie
 
Registered: Jun 2009
Posts: 7

Original Poster
Rep: Reputation: 0
nothing. Problem is still actual.
 
Old 06-10-2009, 09:04 AM   #6
Unicks
LQ Newbie
 
Registered: Jun 2009
Posts: 3

Rep: Reputation: 0
Hvw you got an initrd.....img file

I have a very similar problem after creating a new kernel. Installatione did not create an initrd file. (RAM disk file with device drivers etc).
Use mkinitrd against kernel and or put line in grub which points to the correct initrd file.
 
Old 06-10-2009, 10:06 AM   #7
saivin
Member
 
Registered: Dec 2008
Location: Bengaluru, India
Distribution: CentOS, openSUSE, Mandriva, Slackware
Posts: 111

Rep: Reputation: 19
Quote:
Originally Posted by akaUr View Post
Hello!

I was just trying to build an LFS system. All was fine, but when i tried to boot, i got an error:

[ _time_ ] VFS: Cannot open root device "sda5" or unknown-block(2,0)
[ _time_ ] Please append a correct "root=" boot option..
Hi akaur, I had _exact_ error when I was compiling gentoo. You need to enable SATA support in your kernel. It worked for me.

Last edited by saivin; 06-10-2009 at 10:07 AM.
 
Old 06-16-2009, 05:12 AM   #8
sreeharsha.t
Member
 
Registered: Jan 2009
Location: Mumbai, India
Distribution: Fedora 9, 10,11, RHEL 5
Posts: 67

Rep: Reputation: 18
Cool

Quote:
Originally Posted by akaUr View Post
As you see, now i use 2.6.30-rc8 kernel. I also tried 2.6.27.24, but.. I even tried to use .config files from the host (LFS LiveCD :P) but nothing helped.
What saivin said is true. I too compiled LFS once and forgot to include SATA device drivers..

Try using the .config file from your linux ditribution's kernel source. Remember to change all '=m' to '=Y' in the config file if you are going for a static kernel compilation. I guess that's what they say for building LFS, right?

Last edited by sreeharsha.t; 06-16-2009 at 05:13 AM.
 
Old 06-17-2009, 12:30 AM   #9
akaUr
LQ Newbie
 
Registered: Jun 2009
Posts: 7

Original Poster
Rep: Reputation: 0
I've posted .config file Of cause, I've included SATA drivers, but there was no difference.
Now, I've soled this problem. But I don't know HOW =) First I used .config from host distribution and this helped. It had the same (!) SATA config. So, I recompiled with -oldconfig and changed .config file to enable them. And got kernel working!!! I don't understand this..)
This becomes more strange, because I removed some times kernel sources, and re-tared them.

p.s. sorry for my english, I know, hard to understand me =)
 
Old 06-17-2009, 07:28 AM   #10
sreeharsha.t
Member
 
Registered: Jan 2009
Location: Mumbai, India
Distribution: Fedora 9, 10,11, RHEL 5
Posts: 67

Rep: Reputation: 18
Smile

Quote:
Originally Posted by akaUr View Post
I've posted .config file Of cause, I've included SATA drivers, but there was no difference.
First I used .config from host distribution and this helped. It had the same (!) SATA config. So, I recompiled with -oldconfig and changed .config file to enable them. And got kernel working!!! I don't understand this..)
Many modules in the kernel are interdependent. If you include a module or driver which depends on another module/driver which is not included in the kernel then it simply won't work. I guess when you manually configured the .config file you would've missed out some of them. Using your distro's .config file will include all the modules your distro's kernel uses.. In most cases, if you distro's kernel works on your system, you new kernel too will work if you use the same .config file..
 
Old 06-18-2009, 06:59 AM   #11
akaUr
LQ Newbie
 
Registered: Jun 2009
Posts: 7

Original Poster
Rep: Reputation: 0
But they select dependent modules just after selection of them =) This is made automaticaly (perhaps, on the 2.6.27-2.6.30 kernels). So, problem is not here.
As I have said, kernel started working AFTER I mrproper-ed kernel sources, and reconfigured again. There was no host .config file after this!
 
  


Reply

Tags
entry, grub, host, kernel, lfs, linux, livecd, menu, menulst, mount, panic, root, sd, vfs


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
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0) matsvw Linux - Kernel 18 01-17-2012 06:43 AM
kernel panic - not syncing : VFS: unable to mount root FS on unknown-block Dankles Slackware 23 01-28-2011 03:01 AM
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,4) mr.gizm0 Linux - Newbie 5 09-01-2007 03:58 PM
Kernel panic - not syncing : VFS: Unable to mount root fs on unknown block(0,0) Merlinator Ubuntu 1 03-05-2007 04:18 AM
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(3,2) Volgin Linux - Software 1 12-11-2005 07:46 PM


All times are GMT -5. The time now is 06:52 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration