LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 02-12-2014, 06:47 AM   #1
embLinux
Member
 
Registered: Dec 2013
Distribution: Mint
Posts: 54

Rep: Reputation: Disabled
Unhappy A question about "VFS: Cannot open root device"


Hi everyone,


I'm using an embedded board ARM9 SAM9G25 which I want to boot from SD Card. When I build a linux kernel with a built-in rootfs (initramfs) then it's working as it should. Now I want to separate kernel from rootfs and I generated an rootfs.squashfs.

The kernel command line is now
console=ttyAT0,115200 root=/dev/mmcblk0 ro rootfstype=squashfs

When I then boot my system the following kernel panic occurs:

VFS: Cannot open root device "mmcblk0" or unknown-block(0,0)
Please append a correct "root=" boot option; here are the available partitions:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)


I believe that partitioning doesn't lead to the solution, since booting with the same settings but with an initramfs is possible.

I found out that when booting with the initramfs image, when I do an ls /dev no mmcblk or sdb is listed.

After hitting dmesg following interesting lines appear:

mmc0: clock 0Hz busmode 1 powermode 0 cs 0 Vdd 0 width 0 timing 0
atmel_mci atmel_mci.0: Atmel MCI controller at 0xf0008000 irq 12, 1 slots
mmc_host mmc0: card is not present
mmc1: clock 0Hz busmode 1 powermode 0 cs 0 Vdd 0 width 0 timing 0
atmel_mci atmel_mci.1: Atmel MCI controller at 0xf000c000 irq 26, 1 slots
mmc_host mmc1: card is not present


(Yes the card is in the slot

So what I think happens now is, that U-Boot can read the SD device but the kernel doesn't ( since an initramfs is bootable, a single kernel can be loaded too but the rootfs, opened from kernel, cannot be found). In make linux menuconfig I already enabled

Device Drivers
<*> MMC/SD/SDIO card support
+ + <*> MMC block device driver
+ + <*> MMC host test driver
+ + <*> Atmel SD/MMC Driver (Atmel Multimedia Card Interface support)
+ + [ * ] Atmel MCI DMA support (Exp.)
+ + <M> Secure Digital Host Controller Interface support


but still with this setting it seems that he's not able to use the SD device. I'm a bit clueless at this point, can someone give me a hint?

Kind regards

Frank
 
Old 02-13-2014, 05:17 AM   #2
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 6,317

Rep: Reputation: Disabled
Quote:
Unable to mount root fs on unknown-block(0,0)
You get this error when kernel is unable to access the block device, like when kernel has no support for HDD controller chipset. Also make sure your kernel has support for partition table used (if any).
 
1 members found this post helpful.
Old 02-13-2014, 05:25 AM   #3
embLinux
Member
 
Registered: Dec 2013
Distribution: Mint
Posts: 54

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Emerson View Post
You get this error when kernel is unable to access the block device, like when kernel has no support for HDD controller chipset. Also make sure your kernel has support for partition table used (if any).
I already read somewhere if unknown-block(x,y) appears and x = 0 then the whole device couldn't be accessed and y = 0 when just the partition couldn't be found. That confirms my assumption that the kernel isn't even able to find the device. But I've enabled the SD/MMC support as you can see in the post before.
 
Old 02-13-2014, 05:30 AM   #4
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 6,317

Rep: Reputation: Disabled
Alright, what kind of hardware is this SD connected to? USB? Whatever it is it has to be compiled into kernel and not as module. BTW, you can get unknown-block(x,y) error where x and y both are not zero, this means the filesystem used is not compiled into kernel.
 
Old 02-13-2014, 05:46 AM   #5
embLinux
Member
 
Registered: Dec 2013
Distribution: Mint
Posts: 54

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Emerson View Post
Whatever it is it has to be compiled into kernel and not as module.
I'm not quiet sure what you mean by that, the options I mentioned in the top post are made in linux menuconfig, and as far as I know they should not be a module. BTW if i do "lsmod" with the running image (that's the same configuration but with a initramfs), an empty list is printed out.

The SD is internal so it's mmcblk, if it was usb then it should be sdb i know, but any of them work.
 
Old 02-13-2014, 06:11 AM   #6
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 6,317

Rep: Reputation: Disabled
It may be internal, but it is still connected to something, USB is most common.
 
Old 02-13-2014, 06:47 AM   #7
embLinux
Member
 
Registered: Dec 2013
Distribution: Mint
Posts: 54

Original Poster
Rep: Reputation: Disabled
Possible, but I still can't see a solution since neither mmcblk nor sdb devices are listed when i do ls /dev/
 
Old 02-13-2014, 06:51 AM   #8
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 6,317

Rep: Reputation: Disabled
Look at mount output.
 
  


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
VFS: cannot open root device "sda3" or unknown-block (0,0) snakeo2 Linux - Newbie 10 07-05-2012 09:23 PM
VFS: Cannot open root device "(null)" or unknow-block(8,1) persson121 Linux - General 2 04-17-2011 06:33 AM
Boot On Lan - Cannot VFS: Cannot open root device "<NULL>" neilneil2000 Linux - Server 6 06-30-2008 02:56 PM
Kernel Panic:VFS: Cannot open root device "hda3" or 00:10 shivendnrab Linux - General 1 07-01-2004 04:08 AM
VFS: Cannot open root device "1601" or unknown-block(22,1) takehora Slackware 3 06-11-2004 09:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 12:14 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
Open Source Consulting | Domain Registration