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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

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

14,700 次查看
wangvictor
Contributor III

Hi community,

I am working on i.MX6DL sabreSD board.Trying to mount the rootfs via NFS.

When starting kernel and trying to mount rootfs from server I get this error.

VFS: Cannot open root device "nfs" or unknown-block(2,0): error -6
[ 463.891422] Please append a correct "root=" boot option; here are the available partitions:
[ 463.899879] 0100 65536 ram0 (driver?)
[ 463.904617] 0101 65536 ram1 (driver?)
[ 463.909279] 0102 65536 ram2 (driver?)
[ 463.913976] 0103 65536 ram3 (driver?)
[ 463.918633] 0104 65536 ram4 (driver?)
[ 463.923288] 0105 65536 ram5 (driver?)
[ 463.928207] 0106 65536 ram6 (driver?)
[ 463.933121] 0107 65536 ram7 (driver?)
[ 463.937780] 0108 65536 ram8 (driver?)
[ 463.942414] 0109 65536 ram9 (driver?)
[ 463.947094] 010a 65536 ram10 (driver?)
[ 463.951816] 010b 65536 ram11 (driver?)
[ 463.956554] 010c 65536 ram12 (driver?)
[ 463.961275] 010d 65536 ram13 (driver?)
[ 463.966011] 010e 65536 ram14 (driver?)
[ 463.970733] 010f 65536 ram15 (driver?)
[ 463.975476] 0800 8192 sda driver: sd
[ 463.980112] b300 7761920 mmcblk2 driver: mmcblk
[ 463.985455] b308 15288320 mmcblk3 driver: mmcblk
[ 463.990784] b309 12288 mmcblk3p1 f737a026-01
[ 463.996126] b30a 15271936 mmcblk3p2 f737a026-02
[ 464.001457] b320 128 mmcblk3rpmb (driver?)
[ 464.006773] b318 4096 mmcblk3boot1 (driver?)
[ 464.012103] b310 4096 mmcblk3boot0 (driver?)
[ 464.017449] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
[ 464.025723] CPU1: stopping
[ 464.028441] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.1.15-1.2.0+gbecce8c #107
[ 464.035837] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
[ 464.042395] [<800168c4>] (unwind_backtrace) from [<80012728>] (show_stack+0x10/0x14)
[ 464.050150] [<80012728>] (show_stack) from [<8089c32c>] (dump_stack+0x84/0xc4)
[ 464.057381] [<8089c32c>] (dump_stack) from [<800157cc>] (handle_IPI+0x178/0x18c)
[ 464.064784] [<800157cc>] (handle_IPI) from [<80009480>] (gic_handle_irq+0x58/0x5c)
[ 464.072361] [<80009480>] (gic_handle_irq) from [<80013200>] (__irq_svc+0x40/0x74)
[ 464.079845] Exception stack(0xa8093f50 to 0xa8093f98)
[ 464.084902] 3f40: a8093f98 fffffff7 09dbca2e 0000006c
[ 464.093083] 3f60: ab72de90 00000000 08aaa263 0000006c 09dbca2e 0000006c 00000001 00000000
[ 464.101264] 3f80: 00000017 a8093f98 a6aaaaab 8061044c 20000113 ffffffff
[ 464.107893] [<80013200>] (__irq_svc) from [<8061044c>] (cpuidle_enter_state+0xd8/0x20c)
[ 464.115911] [<8061044c>] (cpuidle_enter_state) from [<80065104>] (cpu_startup_entry+0x1fc/0x320)
[ 464.124703] [<80065104>] (cpu_startup_entry) from [<1000952c>] (0x1000952c)
[ 464.131672] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)

 I was followed by this website.

Boot I.MX6q SABRE over the Network using TFTP and NFS  

I tried both ubuntu rootfs and QT rootfs and get all the same result.

Below is what I add into /etc/exports which in server side.

/mnt/raid115/victor/imx-boot/imx6q-sabre/nfs 192.168.120.29(rw,sync,no_root_squash,no_subtree_check)

How to fix this error?

Thanks in Advanced!

0 项奖励
回复
3 回复数

12,734 次查看
ankitr_patel
Senior Contributor II

Hi Victor Wang,

Change your Board IP address in the /etc/exports in the server side.

e.g. : /mnt/raid115/victor/imx-boot/imx6q-sabre/nfs 192.168.*(rw,sync,no_root_squash,no_subtree_check)

Do it at your end and let us know if you found any difficulties.

Best regards,
Ankit
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

12,734 次查看
wangvictor
Contributor III

Thanks for the reply. now it works perfectly.

0 项奖励
回复

12,734 次查看
igorpadykov
NXP Employee
NXP Employee

Hi victor

nfs setup guidelines can be found on many resorces, in particular

one can check sect.4.7 "Running Linux OS on the target",
"Specifying the location of the root file system" attached Linux Guide

found on nxp linux documentation on link

i.MX Software|NXP 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------