°ò¥»·§©À¦p¤U¡GÓ¤H¹q¸£·|¸g¥Ñ bootp ¨ó©w±q±Ò°Ê¦øªA¾¹¤¤¨Ó¨ú±o¥¦ªº IP ¦ì§}¡C ¥Î 0.0.0.0 ¬°ªì©l IP ¦ì§}¡A¦Ó¥¦ªº®Ö¤ßµ{¦¡·|¸g¥Ñ tftp ¨ó©w¡C
¸õ¹L°Ï¬qªº±Ò°Ê (¸g¥Ñ¸ô¥Ñ¾¹router) ¨Ã¤£¬OÓ²³æ°ÝÃD¡A©Ò¥H¡A¤£¬O±N¦øªA¾¹¥H¤ÎµLºÏºÐ¾÷ªº¾÷¾¹©ñ¸m¦b¦P¤@Óºô¸ô °Ï¬q¡A´N¥u¦³«Øºc¤@Ó UDP »²§U¦ì§}¦b§Aªº router ¨ì¦øªA¾¹ªº¦ì§}¤W¡C²Ó¸`½Ð°Ñ¦Ò§Aªº router ²£¾¹¤â¥U¡C
¥H¤U¬O§Ú̪º¨BÆJ
¨ú±o nfsboot ®M¥ó (¥i±q§A¸û³ßÅwªº linux mirror Ãè®g¯¸ªº /pub/Linux/system/Linux-boot
¥Ø¿ý¨ú±o)¡C¥¦¥]§t¤F¤@Óµ¹ wd8013¥d¥iª½±µ¿N¿ý¥Îªº booteprom ¬M¹³ÀÉ¡C
ÁÙ¦³¨ä¥L¤èªk¥i¥H·Ç³ÆÓ¤H¹q¸£³¡¥÷:
³oÓ¬M¹³ÀÉ¥]§t¤F bootp ¥H¤Î tftp «È¤áºÝµ{¦¡¡C §A¤]»Ýn·Ç³Æ¤@Ó linux ®Ö¤ßµ{¦¡½X¡A¥¦§t¦³ nfs-root ¿ï¶µ¡C
°Ñ¦Ò patch(1)
¥¦¥i¥H¦b bootpd-2.4.tar.gz
®M¥ó¤¤§ä¨ì
(¥i±q§A¸û³ßÅwªº linux mirror Ãè®g¯¸ªº /pub/Linux/system/Network/boot.net
¥Ø¿ý¤º)¡C¨ú±o³oÓ®M¥ó¡A
½sĶ¨Ã¦w¸Ë¥¦¡C¦pªG§A¨ä¥Lªº Unix ¾÷¾¹¤]¬O¥Î Slackware Linux ªº¡A¨º»ò¼Ð·Çªº¨ÑÀ³ª©¥»´N
¦³ bootpd ¤F¡A©Ò¥H§A¥i¥H¸õ¹L³o³¡¥÷¡C daemon ¥i¥Hª½±µµo¥X©R¥O¨Ó°õ¦æ
bootpd -s
©Î¬O¨Ï¥Î inetd¡A¦ý§A»Ýקï¡G
# tftp dgram udp wait root /usr/sbin/in.tftpd tftpd /export
# bootps dgram udp wait root /usr/sbin/in.bootpd bootpd
bootps 67/tcp # BOOTP server
tftp 69/udp # TFTP server
kill -HUP <process id of inetd>.
¥Ñ¥ý¡A bootpd ¦³Ó¥s bootptab ªº«ØºcÀÉ¡A¥¦³q±`³Q©ñ¦b /etc ¤º¡C§A¥²¶·×§ï ¥¦¡A¥[¤W§AªºµLºÏºÐ¾÷¾¹ªº¹h¹D IP ¦ì§}¡B dns ¦øªA¾¹¡A¥H¤Î¤A¤Óºô¸ô¦ì§}(es)¡C ½d¨Ò¦p¤U /etc/bootptab:
global.prof:\
:sm=255.255.255.0:\
:ds=192.168.1.5:\
:gw=192.168.1.19:\
:ht=ethernet:\
:bf=linux:
machine1:hd=/export/root/machine1:tc=global.prof:ha=0000c0863d7a:ip=192.168.1.140:
machine2:hd=/export/root/machine2:tc=global.prof:ha=0800110244e1:ip=192.168.1.141:
machine3:hd=/export/root/machine3:tc=global.prof:ha=0800110244de:ip=192.168.1.142:
global.prof ¬O host ¶µ¥Øªº¤@¯ë¼Ë¥»¡A¨ä¤¤
¤§«á¡A¨C¤@¥x¾÷¾¹À³¸Ó¦³¤U±³o¦æ
TFTP (Trivial File Transfer Protocol
) ¬O¤@ÓÀɮ׶ǿé¨ó©w¡A´N¹³ ftp ¤@¼Ë¡A¦ý
¥¦¤ñ¤ñ¸û²¤Æ¡A¦]¦¹¥i¥H®e©ö¦a¦b EPROM ùبӽs½X¡C TFTP ªº¨Ï¥Î¤èªk¦³¤GºØ¡G
/export/root/machine1
¡C
·í¨Ï¥Î¦w¥þªº tftp ®É¡A /export ³Q·í¦¨®Ú¥Ø¿ý¡A¦Ó /export Åܦ¨ / ¡A¥B hd Äæ´NÅܦ¨ /root/machine1
¤F¡C
³o¥]§t Slackware¨ÑÀ³ª©¤ºªº a, ap, n, ¤Î x ³¡¥÷¡Cn¦w¸Ë§ó¦hªº®M¥ó¤]¥i¥H¡F¦ý ¬O¤W±ªº®M¥ó¤w¨¬°÷¤@ÓµLºÏºÐ X ²×ºÝ¾÷ªº»Ý¨D¤F¡Cº¥ý§A»Ýn¤@Ó¤w¦b¹BÂ઺ Linux ¨t²Î¡C¦b»·ºÝ¾÷¾¹ùاä¤@ӺϺЪŶ¡¨Ã export ¥¦¦¨¬°¥iŪ¼g¨Ã±¾¤W¥¦¨ì Linux ¾÷¾¹ªºÀɮרt²Î¤Wªº¬Y¤@³B (¨Ò¦p /mnt)¡C¶}©l Linux ³]©w¨Ã§ïÅÜroot ¿ï¶µ±q / Åܬ° /mnt¡CµM«á³]¥ß¦p¤W±©Ò»¡ªº®M¥ó¡A¦pªG§A¥u¬On°õ¦æ¤@ÓµLºÏºÐªº Linux ¨º »ò´N¤£»Ýn°µ¨ä¥L§ïÅÜ¡C¥t¤@¤è±¡A¦pªG§Apµe¨Ï¥Î¶W¹L¤@Ó¥H¤WªºµLºÏºÐ¾÷¾¹¡A ¨º»ò¤W±ªº³]©w´N»Ýn¨Ç³\ªº×§ï¡A¦]¬°¦³¨ÇÀÉ®×¥H¤Î¥Ø¿ý¥²¶·¥u¦³¾÷¾¹¥»¨¨Ï¥Î¡C §ÚÌ¥i¥H¥H²¾¶} /usr ¥Ø¿ý(¥¦¥]§t«D¨p¤Hªº¸ê®Æ)ªº¤è¦¡¸õ¹L³oÓ°ÝÃD¡A µM«á«Ø¥ß¤@Ó¤À¶}ªº¤l¥Ø¿ýµ¹¨C¤@ÓµLºÏºÐ¾÷¾¹¡C¨Ò¦p¡A¦pªG /export/linux/machine1 ³Q±¾¦b /mnt ¤W¡A¨º»ò¦bªì©l³]©w«á¥Ø¿ýµ²ºc·|¹³³o¼Ë
/export/linux/machine1/bin
/export/linux/machine1/sbin
/export/linux/machine1/lib
/export/linux/machine1/etc
/export/linux/machine1/var
/export/linux/machine1/usr
§ïÅÜ«á§A·|¦³
/export/linux/machine1/bin
/export/linux/machine1/sbin
/export/linux/machine1/lib
/export/linux/machine1/etc
/export/linux/machine1/var
/export/linux/usr
²{¦b¬°¨ä¥Lªº¾÷¾¹«Ø¥ß¥Ø¿ý¡C±q²{¦b¶}©l§ÚÌ°²³]§AªºµLºÏºÐ¾÷¾¹¤À§O¥s°µ machine1¡Bmachine2¡B machine3µ¥µ¥¡F ¨Ï¥Î¥H¤Uªº bash ©R¥O¤â½Z¨Ó³]¥ß¨ä¥Lªº¥Ø¿ý
cd /export/linux
for x in machine2 machine3 ; do
mkdir $x; cd $x
(cd ../machine1; tar cf - *) | tar xvf -
done
µM«á°µ¤U¦Cªº export:
¤U±½d¦C¬O¨Ì·Ó SunOs 4.1.3 ªº exports Àɮתº»yªk¨Ó°µ:
# This file is /etc/export
# for remote linux X terminals by Buci
# this line is only once
/export/root/usr -access=linuxnet
# these lines once for every host
/export/root/machine1 rw=machine1,root=machine1
/export/root/machine2 rw=machine2,root=machine2
/export/root/machine3 rw=machine3,root=machine3
½Ð¤£n§Ñ¤F°õ¦æ exportfs -a
²{¦b¸Ó¬O«Øºc tftp ¦øªA¾¹ªº®ÉÔ¤F¡C¦pªG§A¤£»Ýn¤@Ó¦w¥þªº tftp ¨º«Ü²³æ¡A ¦]¬°§Aªº«È¤áºÝ¤w¸g¥i¥H±q /export ¥Ø¿ý¨Ó±Ò°Ê¡C
¦pªG¤@Ó¦w¥þªº tftp ³Q±Ä¥Î¡A¨º»ò§A¥i¥H¦b /tftpboot ¥Ø¿ý¤U°µÓ§¹¾ãªº /export/linux ¥Ø¿ýµ²ºc¡C (¥Î¤@Ó¹êÅé®Ö¤ßµ{¦¡¤Î³sµ²µ¹¨ä¥L¾÷¾¹ªº²Å¸¹³sµ²)¡A ©Î¬OÅý /export ¥Ø¿ý¦¨¬°¦w¥þªº tftpd ªº®Ú¥Ø¿ý¡C©ÎªÌ¦pªG§A¦³¤@¥t¥~ªº tftpboot ¥Ø¿ý¡A¨º»ò¡A¦P¼Ë¦a¡A§A¥u»Ýnì¨Óªº¥Ø¿ýµ²ºc¡AµM«á¥Î¤@Ó¹êÅé®Ö¤ßµ{¦¡¨Ó ²Å¸¹³sµ²¨ä¥L¾÷¾¹) ¡C §A¥i¥H°õ¦æ¤U¦C©R¥O¨Ó§¹¦¨³oÓ³]©w¡G
mkdir -p /tftpboot/export/linux/machine1
cd /tftpboot/export/linux/machine1
cp /export/linux/machine1/<name of the kernel> .
µM«á°õ¦æ¤U±¡G
mkdir -p /tftpboot/export/linux/machine2
cd ../machine2
ln -s ../machine2/<name of the kernel>
³Ì«á¡A§A¥²¶·´¡¤J
/sbin/mount nfs_server:/export/linux/usr /usr
¨ì
/export/linux/<machinex>/etc/rc.d/rc.S
ªº²Ä¤@¦æ¡C¦b³oùØ <machinex> «üªº¬O machine1, machine2µ¥µ¥¡C