nfs挂载文件系统出错,请高手指教
从nfs挂载文件系统时出现的错误,Root-NFS: Server returned error -13 while mounting nfs/rootfs
VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Cannot open root device "nfs" or unknown-block(2,0)
Please append a correct "root=" boot option; here are the available partitions:
1f00 384 mtdblock0 (driver?)
1f01 5120 mtdblock1 (driver?)
1f02 125440 mtdblock2 (driver?)
1f03 131072 mtdblock3 (driver?)
1f04 131072 mtdblock4 (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
Backtrace:
[<c003123c>] (dump_backtrace+0x0/0x114) from [<c00316c8>] (dump_stack+0x18/0x1c)
r6:c04f5edc r5:c0021850 r4:c3823f48
[<c00316b0>] (dump_stack+0x0/0x1c) from [<c0045dfc>] (panic+0x4c/0x13c)
[<c0045db0>] (panic+0x0/0x13c) from [<c0008e00>] (mount_block_root+0x104/0x234)
r3:c3823eb4 r2:20000013 r1:c3823f48 r0:c0445400
[<c0008cfc>] (mount_block_root+0x0/0x234) from [<c0008ffc>] (mount_root+0xcc/0xf
4)
[<c0008f30>] (mount_root+0x0/0xf4) from [<c000906c>] (prepare_namespace+0x48/0x1
9c)
r7:00000000 r6:c002180c r5:c0021808 r4:c04f5878
[<c0009024>] (prepare_namespace+0x0/0x19c) from [<c0008810>] (kernel_init+0xec/0
x120)
r6:c002095c r5:c0020e54 r4:c04f5658
[<c0008724>] (kernel_init+0x0/0x120) from [<c0048de4>] (do_exit+0x0/0x634)
r6:00000000 r5:00000000 r4:00000000
------解决方案--------------------
1、首先保证你自己在pc上挂192.168.1.103:/nfs/rootfs 成功
这里expors需要写成
/nfs/rootfs *(rw,sync,no_root_squash)
2、确保你的linux内核已经配置Root file system on NFS 这一项,也就是CONFIG_ROOT_NFS,它依赖于IP_PNP
3、以上2条满足后,你可以试试
setenv boottargs "root=/dev/nfs nfsroot=192.168.1.103:/nfs/rootfs ip=192.168.1.230 rw console=ttySAC0 mem=64M rootdelay=10"
4、如果不成功,你需要修改boottargs中的ip参数,参见http://hi.baidu.com/deep_pro/blog/item/dde127f2de6e0b1eb17ec554.html
5、如果还不成功,沾完整打印输出再看