LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (http://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block (http://www.linuxquestions.org/questions/linux-kernel-70/kernel-panic-not-syncing-vfs-unable-to-mount-root-fs-on-unknown-block-731740/)

akaUr 06-09-2009 03:36 PM

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 =)

akaUr 06-09-2009 03:41 PM

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.

akaUr 06-09-2009 03:44 PM

1 Attachment(s)
/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

akaUr 06-09-2009 04:01 PM

I've saw an solution here. Just before my =) I havent seen it before, probably google havent cached it)
Trying now.

akaUr 06-09-2009 04:21 PM

:( nothing. Problem is still actual.

Unicks 06-10-2009 09:04 AM

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.

saivin 06-10-2009 10:06 AM

Quote:

Originally Posted by akaUr (Post 3568369)
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.

sreeharsha.t 06-16-2009 05:12 AM

Quote:

Originally Posted by akaUr (Post 3568376)
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?

akaUr 06-17-2009 12:30 AM

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 =)

sreeharsha.t 06-17-2009 07:28 AM

Quote:

Originally Posted by akaUr (Post 3576633)
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..

akaUr 06-18-2009 06:59 AM

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!


All times are GMT -5. The time now is 01:39 PM.