Next Previous Contents

5. °ò¥»·§©À

°ò¥»·§©À¦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

5.1 ³]©w­Ó¤H¹q¸£

¨ú±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¸£³¡¥÷:

¦pªG§A¿ï¾Üªº¬O²Ä¤GªÌ¡A§A¥²¶·¨Ï¥Î dd ©R¥O¨Ó±N³o­Ó¬M¹³Àɼg¤J¤@±i³nºÐ¤ùùØ¡C

³o­Ó¬M¹³ÀÉ¥]§t¤F bootp ¥H¤Î tftp «È¤áºÝµ{¦¡¡C §A¤]»Ý­n·Ç³Æ¤@­Ó linux ®Ö¤ßµ{¦¡½X¡A¥¦§t¦³ nfs-root ¿ï¶µ¡C

ÀH«K§A­n¤£­n«Øºc°Ï¶ô³]³Æ (³nºÐ¾÷©ÎµwºÐ¾÷) ªº¤ä´©¡A¦ý§A¥²¶·«Øºc tcp/ip ¤ä´©¡B wd ¤A¤Óºô¸ô¥d¤ä´©¡B nfs Àɮרt²Î¤ä´©¡CµM«á­«·s½sĶ®Ö¤ßµ{¦¡¡C

5.2 ¦b¦øªA¾¹¤W³]©w bootpd

¥¦¥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

5.3 ¦b¦øªA¾¹¤W«Øºc bootpd

¥Ñ¥ý¡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¦æ

5.4 ÁA¸Ñ tftp

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

´X¥G¨C¤@­Ó Unix ¹ê§@³£¥]§t tfpt ¦øªA¾¹¡A¤]³\§A¨Ã¤£»Ý­n¦Û¤v¦w¸Ë¤@­Ó¡C

5.5 ¦b»·ºÝ¦øªA¾¹¤W³]©w¤@­Ó¤p«¬ªº Linux «Øºc

³o¥]§t Slackware¨ÑÀ³ª©¤ºªº a, ap, n, ¤Î x ³¡¥÷¡C­n¦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¬O­n°õ¦æ¤@­ÓµLºÏºÐªº Linux ¨º »ò´N¤£»Ý­n°µ¨ä¥L§ïÅÜ¡C¥t¤@¤è­±¡A¦pªG§A­pµ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:

¦p¤U
¤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

5.6 «Øºc tftp ¦øª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> 

5.7 ³Ì«á¤u§@

³Ì«á¡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


Next Previous Contents