LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Cannot open root device “nfs” or unknown-block(2,0): error -6 (https://www.linuxquestions.org/questions/linux-newbie-8/cannot-open-root-device-%93nfs%94-or-unknown-block-2-0-error-6-a-4175513013/)

mcha 08-01-2014 03:16 PM

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.

xode 08-03-2014 12:36 AM

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.

mcha 08-04-2014 12:38 AM

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.

xode 08-04-2014 02:11 AM

Quote:

Originally Posted by mcha (Post 5214467)
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?

keefaz 08-04-2014 04:05 AM

You can add "nfsrootdebug" at the kernel boot parameter in nfs client, maybe this will display usefull infos..

mcha 08-05-2014 01:04 PM

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:eth4:off 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...

xode 08-05-2014 01:55 PM

Quote:

Originally Posted by mcha (Post 5215644)
...

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

mcha 08-06-2014 11:10 AM

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


All times are GMT -5. The time now is 05:33 PM.