linux内核挂载nfs文件系统

linux内核挂载nfs文件系统

1、配置网络部分,主要是使能CONFIG_IP_PNP以在2中能够看到Root file system on NFS选项
Networking support 
Networking options 
TCP/IP networking
IP: kernel level autoconfiguration
[*] IP: DHCP support
[*] IP: BOOTP support

2、配置开启nfs服务
File systems --->
Network File Systems --->
<*> NFS client support 
[*] NFS client support for NFS version 3 

[*] NFS client support for the NFSv3 ACL protocol extension 
[*] NFS client support for NFS version 4 (EXPERIMENTAL) 
[*] NFS client support for NFSv4.1 (DEVELOPER ONLY) 
[*] Root file system on NFS 

3.make uImage

4、在uboot中设置如下启动参数(IP根据实际使用更改)
setenv bootargs init=/linuxrc console=ttySAC0 bootdelay=10 root=/dev/nfs rw nfsroot=192.168.1.100:/opt/EmbedSky/nfs_root,v3,tcp ip=192.168.1.103:192.168.1.100:192.168.1.1:255.255.255.0::eth0:off

5内核打印命令行检查参数设置是否正确

Kernel command line: console=ttySAC0,115200 init=/init video=mxcfb0:dev=lcd,CLAA-WVGA,if=RGB24,bpp=32 video=mxcfb1:off video=mxcfb2:off fbmem=48M vmalloc=400M androidboot.console=ttySAC0 androidboot.hardware=freescale root=/dev/nfs ip=192.168.1.103 fec_mac=12:32:43:34:21:43 nfsroot=192.168.1.100:/opt/EmbedSky/nfs_root,v3,tcp

6检查/opt/EmbedSky/nfs_root/etc/init.d/rcS,去掉网卡操作相关的指令rcS 

#ifconfig lo 127.0.0.1
#net_set &

7.挂载成功



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值