Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 09-14-2010, 12:50 PM   #1
LQ Newbie
Registered: Sep 2010
Posts: 3

Rep: Reputation: 0
nable to mount root fs on unknown-block (2.0)??

Hi, I'm currently trying to compile kernel 2.6.26 (vanilla) by changing some minor options (for experiment). I'm using VirtualBox 3.2.8 r64453.

I've used default configs (make defconfig) as the base, and set CONFIG_SOUND=n, and CONFIG_LOCALVERSION="practice' and LOCALVERSION_AUTO=n. I don't think those settings are critical for the issue, though.

The problem is, when I finished compiling my kernel and try to boot with it, I see the messages like below, and booting procedure stops there.

Starting up...

Decompressing Linux... Parsing ELF... done
Booting the kernel.
ide_generic: I/O resource 0x1F0-0x1F7 not free.
ide_generic: I/O resource 0x170-0x177 not free.
Root-NFS: No NFS server available, giving up.
VFS: Unable to mount root fs via NFS, trying floppy.
^[Kernel panic - not syncing: VFS: Unable to mount root fs on unkown-block(2.0)]


I figured out my issue is similar with this thread

but regretfully I can't understand what it says . I'm alien with Linux.

I suppose the problem arises from misconfigured .config file, but I'm not sure about it.

Please help me... I'm nearly giving up.

p.s. Does .config only matters before compiling? Or is it effective even after the kernel image has been loaded? I'd like to know whether I could make my kernel work only by modifying existing .config file, without recompiling.
Old 09-15-2010, 11:48 AM   #2
LQ Newbie
Registered: Jan 2010
Posts: 9

Rep: Reputation: 2
You need to configure drivers for the hard-drive your '/' dir (root) is contained within. For instance, do make menuconfig, then select the SATA controller drivers you need. You may also not have created a correct initrd image. In that case you'll have to google for mkinitrd help and run that command. If you don't create a correct initrd image, the kernel won't be able to load necessary modules (e.g., to utilize your hard-drive) at boot time (e.g., when the kernel needs to mount '/').

Sorry, my original reply was more detailed and elaborate, but this website had some session error and trashed it, too bad.
Old 09-15-2010, 12:26 PM   #3
Registered: Dec 2008
Distribution: LFS
Posts: 95

Rep: Reputation: 21
You encountered chicken and egg problem of modular kernel structure. I will explain.

Kernel needs to know, how to work with hardware. But the kernel developer does not know which hardware will the end user have. To make kernel as small as possible, the modular structure is used. "Driver" for each hardware piece (and many other thing) are provided in the form of separate code which can be added to kernel when needed. Thus you can have very small basic kernel and load only modules you really need.

The problem is with hard drives. For example "driver" for ext3 filesystem is usually in form of module. But at the boot time this module is stored on disk which uses ext3 filesystem. So kernel can not load the ext3 module because he does not know how o read ext3 filesystem. Chicken and egg problem.

This situation is solved by using INIT Ram Disk (initrd). The bootloader loads part of the disk into RAM before starting the kernel itself. this part contains usually basic disk modules etc so kernel can load them from RAM (which it always can).

The second option is when using custom kernel, you can hard-code the modules directly to kernel instead of having modular structure. this way you can omit initrd.

So check if your original kernel use initrd. if yes, your build process should also create one and you need to include it into your boot loader configuration file.
Old 09-16-2010, 05:09 AM   #4
LQ Newbie
Registered: Sep 2010
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks guys!!! I figured out that the problem had something to do with device driver of hard disk (as you guys told me).

I found out how to include the driver in the kernel, and also using initrd for modular approach. Now my kernel works great.

Thanks for kind advice!


kernel, nfs, panic

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
Unable to mount root fs on unknown-block (9,1) prajeeit Red Hat 1 06-23-2010 10:55 AM
unable to mount root fs on unknown block barragaa Fedora 1 03-15-2006 03:48 PM
Unable to mount root fs on unknown-block (8,1) nenyo Linux - Software 2 01-27-2006 10:07 AM
Unable to mount root fs on unknown-block pumaapple Linux - Newbie 1 09-18-2005 12:11 AM
unable to mount root fs on unknown-block(0,0) rickenbacherus Debian 1 02-26-2004 06:12 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:38 PM.

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