当前位置: 技术问答>linux和unix
nfs挂载文件系统出错,请高手指教
来源: 互联网 发布时间:2017-02-18
本文导语: 从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 opti...
从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:
[] (dump_backtrace+0x0/0x114) from [] (dump_stack+0x18/0x1c)
r6:c04f5edc r5:c0021850 r4:c3823f48
[] (dump_stack+0x0/0x1c) from [] (panic+0x4c/0x13c)
[] (panic+0x0/0x13c) from [] (mount_block_root+0x104/0x234)
r3:c3823eb4 r2:20000013 r1:c3823f48 r0:c0445400
[] (mount_block_root+0x0/0x234) from [] (mount_root+0xcc/0xf
4)
[] (mount_root+0x0/0xf4) from [] (prepare_namespace+0x48/0x1
9c)
r7:00000000 r6:c002180c r5:c0021808 r4:c04f5878
[] (prepare_namespace+0x0/0x19c) from [] (kernel_init+0xec/0
x120)
r6:c002095c r5:c0020e54 r4:c04f5658
[] (kernel_init+0x0/0x120) from [] (do_exit+0x0/0x634)
r6:00000000 r5:00000000 r4:00000000
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:
[] (dump_backtrace+0x0/0x114) from [] (dump_stack+0x18/0x1c)
r6:c04f5edc r5:c0021850 r4:c3823f48
[] (dump_stack+0x0/0x1c) from [] (panic+0x4c/0x13c)
[] (panic+0x0/0x13c) from [] (mount_block_root+0x104/0x234)
r3:c3823eb4 r2:20000013 r1:c3823f48 r0:c0445400
[] (mount_block_root+0x0/0x234) from [] (mount_root+0xcc/0xf
4)
[] (mount_root+0x0/0xf4) from [] (prepare_namespace+0x48/0x1
9c)
r7:00000000 r6:c002180c r5:c0021808 r4:c04f5878
[] (prepare_namespace+0x0/0x19c) from [] (kernel_init+0xec/0
x120)
r6:c002095c r5:c0020e54 r4:c04f5658
[] (kernel_init+0x0/0x120) from [] (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、如果还不成功,沾完整打印输出再看
这里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、如果还不成功,沾完整打印输出再看