
                            ޴ŵ Linux Mini Howto
                                       
: Robert Nemkin buci@math.klte.hu
: л HSIEH Kun-Chung, ̨ л Taiwan, Republic of China (NOT
People's Republic of China) ( [1]linuxer.bbs@cis.nctu.edu.tw )

   v0.0.3, 1996 912
     _________________________________________________________________
   
   ļһ޴ŵ Linux ȨΪ Robert Nemkin 
   Ȩ GPLҪлл Bela Kis <bkis@cartan.math.klte.hu> 
   ļΪӢġ
     _________________________________________________________________
   
1. ޸

2. һ޴ŵ Linux 

3. 

4. Ӳ

5. 

     * 5.1 趨˵
     * 5.2 ŷ趨 bootpd
     * 5.3 ŷϽ bootpd
     * 5.4 ˽ tftp
     * 5.5 Զŷ趨һС͵ Linux  
     * 5.6  tftp ŷ
     * 5.7 Ṥ
       
6. ԼŵռҪ; ٶ

7. ܵĴ

8. ļеĴԼϸĽ˵
     _________________________________________________________________
   
1. ޸

     * v0.0.3 1996912: һСݵ޸
       
2. һ޴ŵ Linux 

   ļһ޴ŵ Linux ʱǿҪһ
   Ӳ ĸ˵ִ Linux и·  Unix ϵͳ
    bootp, tftp, NFS ŷһ eprom ¼а
   ڽһκδŵ Linuxϵͳˡ
   
3. 

     * NFS-root Mini Howto
     * Linux NET-2/3-HOWTO  Terry Dawson д,
       94004531@postoffice.csu.edu.au
     * /usr/src/linux/README 춽Լº
       
4. Ӳ

   ڱᵽĶĽ
     * Sun-OS 4.1.3 Ϊŷ
     * Slackware 2.3 + Linux 1.2.8 + wd 8013 ·
     * ʹе̫·
       
5. 

   £˵Իᾭ bootp Эŷȡ IP λַ
     0.0.0.0 Ϊʼ IP λַĺĳʽᾭ tftp Э
   
     ε (·router) Ǹ⣬ԣǽŷ
     Լ޴ŵĻͬһ· Σֻнһ UDP λ
     ַ router ŷλַϡϸο router ֲᡣ
     
   ǵĲ
   
5.1 趨˵

   ȡ nfsboot ׼ (ɴϲ linux mirror վ
   /pub/Linux/system/Linux-boot Ŀ¼ȡ)һ wd8013ֱ
   ¼õ booteprom ӳ񵵡
   
   ׼˵Բ:
     * ĻûдŵģʹСС DOS ʽ
     * ͬ׼Ķλӳ񵵡
       
   ѡǵڶߣʹ dd ӳдһƬ
   
   
   ӳ񵵰 bootp Լ tftp ͻ˳ʽ ҲҪ׼һ linux 
   ĳʽ룬 nfs-root ѡ
     * ʹµȶĳʽ linux-1.2.13Ҫʹð
       nfsbootk׼ڵġpatch ޲ĳʽ
       
     ο patch(1)
     * ҪµģȴǺȵ linux-1.3.x ϵкģ
       Ҫ nfs-root ѡ
       
   ҪҪ豸 (Ӳ) ֧Ԯ뽨 tcp/ip
   ֧Ԯ wd ̫·֧Ԯ nfs ϵͳ֧ԮȻ±ĳʽ
   
5.2 ŷ趨 bootpd

    bootpd-2.4.tar.gz׼ҵ (ɴϲ linux mirror 
   վ /pub/Linux/system/Network/boot.net Ŀ¼)ȡ׼ 벢
   װ Unix Ҳ Slackware Linux ģ׼ĹӦ
   汾  bootpd ˣⲿݡ daemon ֱӷִ
   
       ______________________________________________________________
     
        bootpd -s
       ______________________________________________________________
     
   ʹ inetd޸ģ
     * /etc/inetd.conf ЩƳ # 
       ______________________________________________________________
     
# tftp   dgram   udp     wait    root    /usr/sbin/in.tftpd     tftpd /export
# bootps dgram   udp     wait    root    /usr/sbin/in.bootpd    bootpd
       ______________________________________________________________
     
     *  /etc/services вƳעţ
       ______________________________________________________________
     
bootps          67/tcp          # BOOTP server
tftp            69/udp          # TFTP server
       ______________________________________________________________
     
     *  inetd ʹ
       ______________________________________________________________
     
        kill -HUP <process id of inetd>.
       ______________________________________________________________
     
5.3 ŷϽ bootpd

   ȣ bootpd и bootptab Ľͨ /etc ڡ
    ޴ŵբ IP λַ dns ŷԼ̫·λ
   ַ(es)  /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.1
40:
machine2:hd=/export/root/machine2:tc=global.prof:ha=0800110244e1:ip=192.168.1.1
41:
machine3:hd=/export/root/machine3:tc=global.prof:ha=0800110244de:ip=192.168.1.1
42:
       ______________________________________________________________
     
   global.prof  host Ŀһ
     * sm ·
     * ds ŷλַ
     * gw ڶբλַ gateway
     * ht ·ýӲ
     * bf 
       
   ֮ᣬÿһ̨Ӧ
     * 
     * hd Ŀ¼
     * ȫӦñ tc 
     * ha ̫·Ӳλַ
     * ip ĵ IP λַ
       
5.4 ˽ tftp

   TFTP (Trivial File Transfer Protocol) һЭ ftp һ
    ȱȽϼ򻯣˿׵ EPROM 롣 TFTP ʹ÷
   ֣
     * 򵥵 tftp: ʾͻ˿ԴȡϵͳȻϼ򵥵ȴ
       һȫ (κ˶Ծ tftp õ)
     * ȫ tftp: tftp ŷʹchroot.2 ϵͳıԼĸĿ¼
       κĿ¼ ¼ȫ޷ȡΪ chroot Ŀ¼µĸ
       Ŀ¼ Ӳ bootptab ʱ뷴Ӧ µĴ磺ʹ
       òȫ tftp ʱ hd Ŀ¼· 
       /export/root/machine1 ʹðȫ tftp ʱ /export ɸĿ¼
        /export  /  hd ͱ /root/machine1ˡ
       
   ÿһ Unix ʵ tfpt ŷҲ㲢ҪԼװһ
   
5.5 Զŷ趨һС͵ Linux 

    SlackwareӦڵ a, ap, n,  x ݡҪװ׼Ҳ
    ׼㹻һ޴ŵ X ն˻ˡҪһ
   ת Linux ϵͳԶ˻һŵռ䲢 export Ϊɶд
    Linux ĵϵͳϵĳһ ( /mnt)ʼ Linux 趨
   root ѡ / Ϊ /mntȻ˵׼ֻҪִһ
   ޴ŵ Linux  ͲҪı䡣һ棬ƻʹó
   һϵ޴ŵ 趨ҪЩ޸ģΪЩԼ
   Ŀ¼ֻлʹá ǿƿ /usr Ŀ¼(˽˵
   )ķʽ⣬ ȻὨһֿĿ¼ÿһ޴ŵ
   磬 /export/linux/machine1  /mnt ϣڳʼ趨Ŀ¼
   
       ______________________________________________________________
     
/export/linux/machine1/bin
/export/linux/machine1/sbin
/export/linux/machine1/lib
/export/linux/machine1/etc
/export/linux/machine1/var
/export/linux/machine1/usr
       ______________________________________________________________
     
   ı
       ______________________________________________________________
     
/export/linux/machine1/bin
/export/linux/machine1/sbin
/export/linux/machine1/lib
/export/linux/machine1/etc
/export/linux/machine1/var
/export/linux/usr
       ______________________________________________________________
     
   ΪĻĿ¼ڿʼǼ޴ŵֱ
   machine1machine2 machine3ȵȣ ʹµ bash ָ
   Ŀ¼
       ______________________________________________________________
     

        cd /export/linux
        for x in machine2 machine3 ; do
                mkdir $x; cd $x
                (cd ../machine1; tar cf - *) | tar xvf -
        done
       ______________________________________________________________
     
   Ȼе export:
     * /export/linux/usr Ψÿʹߣ
     * /export/liunx/machine1 ֻж machine1  rw,root Ȩ
     * /export/liunx/machine2 ֻж machine2  rw,root Ȩ
     * /export/liunx/machine3 ֻж machine3  rw,root Ȩ
       
   
   
      SunOs 4.1.3  exports ﷨
     
   :
       ______________________________________________________________
     

# 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
       ______________________________________________________________
     
   벻Ҫִ exportfs -a
   
5.6  tftp ŷ

   ڸǽ tftp ŷʱˡ㲻Ҫһȫ tftp Ǻܼ
    ΪĿͻѾԴ /export Ŀ¼
   
   һȫ tftp ã /tftpboot Ŀ¼
   /export/linux Ŀ¼ṹ (һʵĳʽķ
   )  /export Ŀ¼Ϊȫ tftpd ĸĿ¼һ
    tftpboot Ŀ¼ᣬͬأֻҪԭĿ¼ṹȻһʵ
   ĳʽ )  ִ趨
       ______________________________________________________________
     
      mkdir -p /tftpboot/export/linux/machine1
      cd /tftpboot/export/linux/machine1
      cp /export/linux/machine1/<name of the kernel> .
       ______________________________________________________________
     
   Ȼִ棺
       ______________________________________________________________
     
      mkdir -p /tftpboot/export/linux/machine2
      cd ../machine2
      ln -s ../machine2/<name of the kernel>
       ______________________________________________________________
     
5.7 Ṥ

   ᣬ
       ______________________________________________________________
     
   /sbin/mount nfs_server:/export/linux/usr /usr
       ______________________________________________________________
     
   
       ______________________________________________________________
     
   /export/linux/<machinex>/etc/rc.d/rc.S
       ______________________________________________________________
     
   ĵһС <machinex> ָ machine1, machine2ȵȡ
   
6. ԼŵռҪ; ٶ

   ֻ Slackware 2.3ϲԹ;ĹӦ(Linux)׼汾
   ֿܻ᲻ͬ
     * ŵռ: 28MB + 6.5MB/ÿ̨
     * RAM:  8MB  X ֻҪ 4MB swap Ҳ룬ԱΪ
       ÿһֱ  /tmp棬벻Ҫִ mkswap
     * ٶ: һ̨ 8 Megs  486 DX2/66 ܲ⡣
       
7. ܵĴ

     * ҷһֵĴ /dev Ŀ¼ SunOS 豸ƣ
       ұ Ŀ¼һдŵ Linux ִ MAKEDEV
        (ԭΪ linux nfs  SunOs nfsǲͬģ ߶ʹ32 λԪ
       ҪҪ豸ƣ linux ʹ 16 λԪϣ SunOs
       ʹ 14 λԪҪ豸 18 λԪҪ豸롣)
     * ޴ŵ linux ʱֻһо route ᱻ tftp ŷ
       о , Ҫ趨ȷоѡ
          + ֶÿһ̨ÿһ rc.S 
          + ʹbootp ͻ׼дһͨõ趨ָ
       
8. ļеĴԼϸĽ˵

     * ȷصļ
     * SunOs  BSD ΪҪ SVR4 ( Solaris) Ϊŷ
       
     * Ȼ Linux  SunOs Ϊ bootp/tftp ŷ Linux Ƚ
       Щ
     * ļµ etherboot ׼
     * ָĳʽ汾1.2.13 nfs root ޲µ 1.3.x (˰Ѱ
        nfs-root ޲)Ĳͬ
     * Ҫ wd8013 ̫·
     *  bootpcĽѶһbootp ͻ趨ȷ rooting 
     * ϻĴ鷳һлл buci@math.klte.hu
       
   ߰: ֱļз벻˳ĵطŸң
   лл [2]linuxer.bbs@cis.nctu.edu.tw

References

   1. file://localhost/tmp/zh-sgmltools.1650/linuxer.bbs@cis.nctu.edu.tw
   2. mailto:linuxer.bbs@cis.nctu.edu.tw
