LinuxQuestions.org
Visit Jeremy's Blog.
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 08-01-2014, 04:16 PM   #1
mcha
LQ Newbie
 
Registered: Feb 2010
Posts: 10

Rep: Reputation: 0
Cannot open root device “nfs” or unknown-block(2,0): error -6


i am not able to mount root fs via NFS. keep getting error -6. i am not sure what this error code means.

here's a complete dump:

IP-Config: Complete: device=eth4, hwaddr=00:22:bd:fe:71:b0, ipaddr=192.168.0.20, mask=255.255.255.0, gw=192.168.0.2 host=eth4, domain=, nis-domain=(none) bootserver=192.168.0.2, rootserver=192.168.0.2, rootpath=

VFS: Unable to mount root fs via NFS, trying floppy.

VFS: Cannot open root device "nfs" or unknown-block(2,0): error -6

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(2,0)

Pid: 1, comm: swapper/0 Not tainted 3.8.3+ #56

if i build the kernel with built-in rootfs, i am able to mount to the nfs server..

SELinux is disabled on the client.

in the config file of the client kernel, i also enabled :network support->network options->ip : kernel level autoconfiguration-> turnon everything under this option Then file system->network file system->root file system on NFS. i also turned off CONFIG_BLK_DEV_INITRD (tried it on as well but did not make any difference.)

tcpdump on the server side shows NFS requests but i don't how to interpret these packets.

11:17:25.626806 IP router09.me.com.1011 normz.me.com.mountd: UDP, length 40
11:17:25.626875 IP normz.me.com.mountd router09.me.com.1011: UDP, length 24
11:17:25.627057 IP router09.me.com.1011 normz.me.com.mountd: UDP, length 88
11:17:25.627596 IP normz.me.com.mountd router09.me.com.1011: UDP, length 60
11:17:25.628054 IP router09.me.com.59949 normz.me.com.sunrpc: UDP, length 80
11:17:25.628946 IP normz.me.com.sunrpc router09.me.com.59949: UDP, length 28
11:17:25.629304 IP router09.me.com.298303220 normz.com.nfs: 40 null
11:17:25.629346 IP normz.me.com.nfs router09.298303220: reply ok 32 n
*/ thank you in advance.
 
Old 08-03-2014, 01:36 AM   #2
xode
Member
 
Registered: Aug 2003
Distribution: Mandrake 9.0; FC4; FC8; SUSE 10.3; SUSE 12.1; SUSE 13.2
Posts: 598
Blog Entries: 1

Rep: Reputation: 45
Could you please give details on what and how many computers you have, what OS they are running and if they individually boot up or not.
 
Old 08-04-2014, 01:38 AM   #3
mcha
LQ Newbie
 
Registered: Feb 2010
Posts: 10

Original Poster
Rep: Reputation: 0
Cannot open root device “nfs” or unknown-block(2,0): error -6" update

hi , i am running linux on intel cpu for both client and server. the client can boot up if rootfs is built into the kernel. thank you.
 
Old 08-04-2014, 03:11 AM   #4
xode
Member
 
Registered: Aug 2003
Distribution: Mandrake 9.0; FC4; FC8; SUSE 10.3; SUSE 12.1; SUSE 13.2
Posts: 598
Blog Entries: 1

Rep: Reputation: 45
Quote:
Originally Posted by mcha View Post
hi , i am running linux on intel cpu for both client and server. the client can boot up if rootfs is built into the kernel. thank you.
Which linux distribution and version specifically for client and server. The server does not boot up at all: is that correct?
 
Old 08-04-2014, 05:05 AM   #5
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 5,387

Rep: Reputation: 397Reputation: 397Reputation: 397Reputation: 397
You can add "nfsrootdebug" at the kernel boot parameter in nfs client, maybe this will display usefull infos..
 
Old 08-05-2014, 02:04 PM   #6
mcha
LQ Newbie
 
Registered: Feb 2010
Posts: 10

Original Poster
Rep: Reputation: 0
hi keefaz, i also tried adding nfsrootdebug. but no new debug messages appear.
here's my config command line argument in the .config
CONFIG_CMDLINE_BOO
CONFIG_CMDLINE="root=/dev/nfs rw nfsrootdebug nfsroot=192.168.0.2:/home/rootfs rdinit=/sbin/init console=ttyS0,9600n8 ip=192.168.0.20:192.168.0.2:192.168.0.2:255.255.255.0:eth4:eth4ff raid=noautodetect"
CONFIG_CMDLINE_OVERRIDE=y

hi xode, the client is running vanilla kernel download from kernel.org (version 3.8.3 ). the server is running fedora (build 3.11.10-301.fc20.x86_64).
the server does boot up and is running fine. it's the client side that can not root mount to the directory on the server side.

i wish i knew what error -6 means...
 
Old 08-05-2014, 02:55 PM   #7
xode
Member
 
Registered: Aug 2003
Distribution: Mandrake 9.0; FC4; FC8; SUSE 10.3; SUSE 12.1; SUSE 13.2
Posts: 598
Blog Entries: 1

Rep: Reputation: 45
Quote:
Originally Posted by mcha View Post
...

hi xode, the client is running vanilla kernel download from kernel.org (version 3.8.3 ). the server is running fedora (build 3.11.10-301.fc20.x86_64).
the server does boot up and is running fine. it's the client side that can not root mount to the directory on the server side.

i wish i knew what error -6 means...
It's a possibility that the server may not allow nfs mounts to the server root directory for security reasons. If that is the case and it were my server, I would not try to override that and instead find another setup that would work in its place.

Could you please post the contents of your server's /etc/exports file (it shows what nfs shares are currently being exported by the server)?
 
Old 08-06-2014, 12:10 PM   #8
mcha
LQ Newbie
 
Registered: Feb 2010
Posts: 10

Original Poster
Rep: Reputation: 0
hi thank you everyone. i got it working.
i enabled
CONFIG_IP_PNP_DHCP=y
CONFIG_IP_PNP_BOOTP=y
CONFIG_IP_PNP_RARP=y
in the kernel config.
i also removed rdinit=/sbin/init from the kernel command line.
one of these 2 actions probably fixed the problem.
thank you
 
  


Reply

Tags
initramfs, initrd, mount, nfs, rootfs


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
2.6.19: VFS: Cannot Open root device "sda1" or unknown-block(0,0) havok1977 Linux - Kernel 18 05-03-2007 05:25 PM
VFS: Cannot open root device "805" or unknown-block(8,5) chameleonic Linux - Newbie 0 09-24-2006 04:34 PM
VFS: Cannot open root device "nfs" or unknown-block(0,255) ezgator Fedora 0 05-14-2006 02:59 AM
VFS: Cannot open root device "1601" or unknown-block(22,1) takehora Slackware 3 06-11-2004 09:34 PM


All times are GMT -5. The time now is 10:18 AM.

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