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.掛載成功
NFS檔案掛載許可權
控制全站寫入許可權 防止任意執行漏洞造成較大影響 假如 nfs伺服器的位址是 127.0.0.1 nfs的目錄是 home web we7 nginx的root目錄為 www we7 掛載某個目錄,並只允許某個目錄可寫,就可以這麼設定 mount t nfs4 o ro 127.0.0.1 home...
linux遠端掛載 NFS
rw 可讀寫的許可權 ro 唯讀的許可權 no root squash 登入nfs主機,使用該共享目錄時相當於該目錄的擁有者,如果是root的話,那麼對於這個共享的目錄來說,他就具有root的權 限,這個引數 極不安全 不建議使用 root squash 登入nfs主機,使用該共享目錄時相當於該目錄...
nfs掛載(window掛載linux的)
liunx上 確保yum好使 安裝環境包 nfs utils rpcbind yum y install nfs utils rpcbind 建立檔案 mkdir root share chmod 777 root share 選擇你需要掛載的檔案系統 vi etc exports root sha...