é¦å
æ们è¦æç¡®æ们ææçç¨åºï¼æ¯æ¾å¨æç®å½çº§ç»æçæ件系ç»éï¼ä¸ºäºå¯»æ¾å°æéè¦æä½ç³»ç»æ¥è¿è¡çç¨åºï¼æ们å¿
é¡»åè¯å®ï¼æ件å¨åªä¸ªæ件系ç»ãä¸ è¬æ¥è¯´ï¼PCæºçæ件就åå¨å¨ç¡¬çä¸ï¼å¯¹äºLive CDèè¨ï¼æ件系ç»å°±èå¨å
çä¸é¢ãä¹å°±æ¯è¯´ï¼åªè¦æä½ç³»ç»è½æ¾å°å¹¶æ£ç¡®å°è®¤è¯äºæ件系ç»ï¼å°±å¯ä»¥æ§è¡éé¢çç¨åºäºï¼
设置ç®æ æºå¨ä¸çNFSå¯å¨
çå®äºç¬¬ä¸èï¼æç½å¯å¨çè¿ç¨äºåï¼ ç®åå°è¯´ï¼å°±æ¯å
æ ¸å è½½ ï¼å
æ ¸æ¾å°ä¸ä¸ªæä»¶ç³»ç» ï¼å
æ ¸æ§è¡æ件系ç»éçä¸ä¸ªç¨åº ãæ 论æ¯ä»NFSå¯å¨ï¼è¿æ¯ä»ç¡¬çå¯å¨ï¼é½æ¯ä¸è¿°è¿ç¨ãåªæ¯NFSå¯å¨ï¼å
¶æ件系ç»æ¯æ¾å¨ç½ç»ä¸çãåªè¦æ 们åè¯å
æ ¸ï¼å
·ä½æ¾å¨ä»ä¹å°æ¹ï¼å¨ç½ç»çå¦ä¸ç«¯æ们设置好å
±äº«ï¼èªç¶å¯ä»¥ä»NFSå¯å¨ã
让å
æ ¸è¯å«NFS并å¯ä»NFSå¯å¨
ç¼è¯å
æ ¸
å¨å
æ ¸æºä»£ç ç®å½æ ä¸ï¼é
ç½®å
æ ¸ï¼
$make menuconfig
ä¾æ¬¡è¿å
¥ File Systems -> Network File Systemä¸éæ© NFS client support 以å Root file system on NFSãå¦ææ¾ä¸å°Root file system on NFS é项ï¼è¦æå¼ç¬¬ä¸çº§èåä¸çNetworking support -> Networking options -> TCP/IP networking -> IP: kernel level autoconfigurationãå¦æNFSè¦ä½¿ç¨DHCPï¼è¿å¾éä¸ IP: DHCP supportã
ä¿åé
置并éæ°ç¼è¯å³å¯ã
é
ç½®å
æ ¸åæ°
è¿å
¥ARMå¼åæ¿ç设置 linux_cmd_lineçå°æ¹ï¼mini2440å为å¼æºæ sï¼è¾å
¥linux_cmd_lineï¼å¹¶å¸¦çå¼å·è¾å
¥åæ°ï¼ï¼æè
è¿å
¥PCçGRUBï¼è®¾ç½®ç±»ä¼¼åæ°
root=/dev/nfs rw nfsroot=192.168.1.1:/linux ip=192.168.1.5:::255.255.255.0:linux::off
该é
置为éæIP设置ãååæ°æä¹å¦ä¸ï¼
root=/dev/nfs ï¼æå®æ ¹æ件系ç»ä¸º /dev/nfsï¼å³NFS ãè¿ä¸/devè¿ä¸ªç®å½å¹¶æ²¡æä»ä¹å
³ç³»ï¼å¨æ¤ä»
为ä¸ä¸ªååã
rw ï¼æ ¹æ件系ç»æ载为å¯è¯»åãè¿å¯ä»¥æ ro å³åªè¯»çé项ã
nfsroot=192.168.1.1:/linux ï¼æææè½½åªä¸ä¸ªNFSä¸çåªä¸ä¸ªç®å½ãè¿éæçæ¯æè½½IP 为192.168.1.1ççµèä¸å¯¼åºç/linuxç®å½ã
ip=192.168.1.5:::255.255.255.0:linux::off ï¼è®¾ç½®æ¬æºçIPãæ¤ä¸¾æ¯ä¸ºäº è¿æ¥åæ设置çIPãè¿éæ¯ä¸ä¸ªéæçé
ç½®ï¼é
ç½®çæ ¼å¼ä¸º ip=æ¬æºçIPå°å::ç½å
³å°å:ç½ç»æ©ç :æ¬æºç主æºå:ç½ç»æ¥å£å:off ãä¸è¬æ
åµä¸ç½å
³ãç½ç»æ¥å£åé½ä¸éè¦è®¾ç½®ãå¦ææ¯DHCPè·åIPï¼é£å¾ç®åï¼ç´æ¥ ip=dhcp å³å¯ã
设置NFSæå¡å¨
Ubuntuä¸çé¾æ¥ï¼
http://blog.mcuol.com/User/xiaoxiaopig/article/37324_1.htmNFSæå¡å¨å¯ä»¥æ¯ä»»ææä½ç³»ç»ï¼åªè¦è½æä¾NFSæå¡å³å¯ï¼WINDOWSå¯ä»¥ä½¿ç¨ WSU ââ Windows Services for Unixæ¥å®ç°ï¼å
·ä½è¯·åèæ¥ä¸æ¥æ¬ç«è¦å表çæç« ï¼ãå¨è¿é以Fedora为ä¾ï¼å¸æå«çåè¡ççç¨æ·è§¦ç±»æéã
对äºFedoraæ¥è¯´ï¼æå¾å½¢çé¢çå·¥å
·è¿è¡è®¾ç½®ï¼å¨ç®¡çï¼ãæå¡å¨è®¾ç½®ï¼ãNFSä¸æ·»å ä¸ä¸ªå
±äº«å³å¯ã
æ´éç¨çä½æ³ï¼å°±æ¯ä¿®æ¹ /etc/exportsæ件ï¼ä¹ååå¯å¨NFSæå¡å¨ã
/etc/exportsæä»¶æ ¼å¼å¦ä¸
导åºçæ件夹 导åºçç½æ®µ(对该导åºçç½æ®µçé项)
æè°å¯¼åºçç½æ®µå°±æ¯åªååªä¸ªç½æ®µå¯¼åºï¼ä¿è¯å®å
¨æ§ãä¸ä¸ªä¾å为ï¼
/linux 192.168.1.0/24(rw,sync,no_root_squash)
å°±æ¯å° /linux 导åºå°ç½æ®µä¸º192.168.1.0ï¼åç½æ©ç 为255.255.255.0 (å³24)çç½ç»ãå
¶ä¸å¯ç¨çé项为ï¼ç¿»è¯èªmanææ¡£ï¼ï¼
secureåinsecure : secureé项ä¸ï¼ææè¿æ¥ç端å£åå°äº1024ãé»è®¤æå¼ã
rwåro : Read/WriteåRead Only
asyncåsync asyncå°ä½¿ç¨å¼æ¥æ°æ®ååï¼æ°æ®å¹¶é马ä¸åå
¥æå¡å¨çãsyncåç¸åã使ç¨asyncéè¦æ³¨ææå¡å¨ä¸è½éæä¸æ£å¸¸å°å
³éï¼å¦åå¯è½å¯¼è´æ°æ®ä¸¢å¤±ã
no_wdelay ï¼ä¸ä½¿ç¨å»¶è¿åå
¥ãNFSæå¡å¨ä¼å°åå
¥åå
¥è¯·æ±ç¼å²èµ·æ¥ï¼å¯ä»¥æé«æ§è½ãå¦æasyncå·²ç»æå¼é£ä¹è¯¥é项æ æã
no_subtree_check ï¼ä¸è¿è¡åæ æ£æ¥ï¼ä½¿ç¨è¯¥é项æå¼èµ·å®å
¨é®é¢ï¼
root_squashåno_root_squashãall_squash ï¼root_squashé项使å¾å®¢æ·ç«¯ä»¥rootæéè®¿é® æ件系ç»æ¶ï¼è½¬æ¢ä¸ºæå¡å¨ç«¯çå¿åç¨æ·ãè¿é项æå¼ä¸å®è¦è®¾ç½®å¥½æå¡å¨çæéã
ä¹ååéæ°å¯å¨NFSæå¡ãFedoraä¸ä½¿ç¨ /etc/init.d/nfs restart
ä½¿ç¨ exportsæ¥ç导åºçæ件ã