  NFS-Root Mini-Howto
  Andreas Kostyrka, andreas@ag.or.at
  V8, 8  1997

    mini-HOWTO        Linux
  workstation (ws)  - (diskless),   mount 
  root filesystems    NFS.      
  mini-Howto     ftp://sun-
  site.unc.edu/pub/Linux/docs/HOWTO/mini/NFS-Root ,   
    mirror  SunSite.
  ______________________________________________________________________

  Table of Contents


  1. Copyright

     1.1  

  2.  

  3.   server

     3.1  compile  
     3.2   root filesystem
        3.2.1   filesystem
        3.2.2   root filesystem
        3.2.3  export  filesystem
        3.2.4   RARP
        3.2.5   BOOTP
        3.2.6   hardware   

  4. Boot  workstation

     4.1   boot eprom
     4.2     
     4.3   bootloader & 
     4.4   bootloader  

  5.  

     5.1  /sbin/init  .
     5.2    /dev .

  6.  



  ______________________________________________________________________

  [1m1.  Copyright[0m

  (c) 1996 Andreas Kostyrka (e9207884@student.tuwien.ac.at , 
  andreas@ag.or.at)

      ,   Linux HOWTO 
       .   
   '        ,
       ,     
    copyright     .  
     . ,    
      .    ,
   ,     
    Linux HOWTO,      
     copyright. ,     
    '  HOWTO,    
     .     
      .    '
       Linux HOWTO,    
  .    :      
     ,      .
  ,      copyright  
  HOWTO,         
   HOWTOs.

    ,    '    Andreas
  Kostyrka <mailto:andreas@ag.or.at>,      mini-
  HOWTO,   Tim Bynum,    Linux HOWTO's, 
   <mailto:linux-howto@sunsite.unc.edu>  email.


  [1m1.1.   [0m


    Avery Pennarun <apenwarr@foxnet.net> (  boot  [1mLILO[22m)

     Ofer Maor <ofer@hadar.co.il> (   mini howto 
         diskless workstations.)

    Christian Leutloff <leutloff@sundancer.tng.oche.de> (
         netboot.)


  [1m2.   [0m

  ,       ws :

           IP,  -   - 
        Ethernet.

        [4mNFS[24m-server   mount path   root
     filesystem .

      [4mNFSROOT[24m    Linux ( 1.3.7x)
      :

      IP      [4mRARP[24m,     
     Ethernet        (
     ),   [1mLILO [22m,   [1mLOADLIN[22m.

     mounting path  [4mNFS[24m       
       ,      [4mRARP[24m-server  
     [4mNFS[24m-server,    default compiled   path.  (
      default      : /tftpboot/<[4mIP-[0m
     [4m[24m [4m[24m>.)

       client    [4mBOOTP[24m.

       diskless ,  '
     boot   [1mLILO [22m,   [1mLOADLIN[22m.  
    ,     .   
  boot    Linux   [1mLILO [22m,    
   ,   .


  [1m3.    server[0m

  [1m3.1.   compile  [0m

      [4mRARP[24m     server  
    .    ,    boot
    .    ,    
  ,   client      (subnet)  
  server.

      ws     
   compiled   :

     [4mNFS[24m-filesystem . (    compiled   
       [4mext2[24m ,  module  .)

     "Root on NFS"    .

     Ethernet driver     ws.

        ,     
       [4mRARP[24m ,  [4mBOOTBP[24m   NFS-Root. ('   
             NFS  make config.)

    ws  boot    ,   
    root device  0:255.     
   (dummy)  device,  : mknod /dev/nfsroot b 0 255.
      ,     root device 
  image  ,  : rdev <[4mkernel-image[24m> /dev/nfsroot.

  [1m3.2.    root filesystem[0m

  [1m3.2.1.    filesystem[0m

   [4m[24m [4m:[24m [4m[24m [4m[24m [4m[24m [4m[24m [4m[24m [4m[24m [4m[24m [4m[24m [4m[0m
  [4m[24m [4m[24m [4m[24m [4m,[24m [4m[24m [4m[24m [4m[24m [4m[24m [4m[24m [4m[0m
  [4m.[24m [4m[24m [4m[24m [4m[24m [4m[24m [4m[24m [4m[24m [4mroot[24m [4mfilesystem[24m [4m[0m
  [4m[24m [4mclients,[24m [4m[24m [4m[24m [4mNFS-Root-Client[24m [4mmini[24m [4mhowto[24m [4m[24m [4mOfer[24m [4mMaor[0m
  <ofer@hadar.co.il>.

        root tree,    () :
  mkdir -p <[4mdirectory[24m>  : tar cClf / - | tar xpCf <[4mdirectory[24m> -.

   boot     LILO,   rootdir  
   : /tftpboot/<[4mIP-address[24m>.    ,   
       - Makefile  sources  .
        : NFS_ROOT =
  -DNFS_ROOT="\"/tftpboot/%s\""     ,  
   compile  .


  [1m3.2.2.    root filesystem[0m

      ,    scripts  /etc/rc.d
  .     :

    ,    eth0.  ws    
     ( ) eth0.      IP  ws
        IP  server,    . (
              
      .)

       ,   /etc/fstab  ws.  
       nfs filesystems.

    [1m [22m:    root filesystems  server  
     ws. (    rc.inet1   server,  
       server  .)





  [1m3.2.3.   export  filesystem[0m

   export  root dir   ws.    :
  exports(5).        nfsd/mountd
   '   .   RedHat   ,  :
  /etc/rc.d/init.d/nfs stop ; /etc/rc.d/init.d/nfs start .


  [1m3.2.4.    RARP[0m

    [4mRARP[24m    .  boot  
  nfsroot,  server  [4mRARP[24m      server  [4mNFS[24m .
  ( .)     ,    
     [4mRARP[24m .

     ,  (      /etc/rc.d
   server!) :

  /sbin/rarp -s <[4mip-addr[24m> <[4mhardware-addr[24m>

   :

     [1mip-addr[0m
           IP  ws, 

     [1mhardware-addr[0m
           Ethernet     ws.

   : /sbin/rarp -s 131.131.90.200 00:00:c0:47:10:12

          
   IP,   server       .
  (   /etc/hosts ,   [4mDNS[24m .)


  [1m3.2.5.    BOOTP[0m

      [4mBOOTP[24m     /etc/bootptab.
  ,   man  [4mbootpd(8)[24m  [4mbootptab(5)[24m .


  [1m3.2.6.    hardware   [0m

       hardware !   ;

    Boot    ,    
     ,     .  
     6  bytes,   ( )   hardware
       .

    Boot  ws    ,  
      TCP/IP .   ping  ws   server. 
      cache  ARP,  : /sbin/arp -a


  [1m4.  Boot  workstation[0m


  [1m4.1.    boot eprom[0m

           , 
         (  Christian
  Leutloff <leutloff@sundancer.tng.oche.de>) :

        "" bootroms.

       netboot ,   Gero Kuhlmann,  
     bootroms  Linux,    .  netboot
          mirror  Linux,  
        distribution  Debian (netboot-0.4).

         boot eprom .

         tftpd  server,  
        ,     boot eprom   
     .

    [4m[24m [4m[24m [4m[24m [4m[24m [4mboot[24m [4meproms[24m [4m[24m [4m[24m [4mLinux,[24m [4m[24m [4m[0m
     [4m[24m [4m,[24m [4m[24m [4m[24m [4m-[24m [4m[24m [4m[24m [4m[24m [4m[24m [4m[0m
     [4m[24m [4m[24m [4meprom[24m [4mprogrammer[24m [4m:([24m [4m([24m [4m[24m [4m,[24m [4m[24m [4m).[24m [4m[0m
     [4m[24m [4m[24m [4m[24m [4m[24m [4m[24m [4m.[0m

  [1m4.2.      [0m

     export  root filesystem      
  default ,   [4mNFS[24m server     [4mRARP[0m
  server (        ), 
     boot    cating   .
  (    root device    0:255.) 
     root directory  server  /tftpboot/[4mIP-[0m
  [4mAddress[24m (    ' ,   compile 
  ).

  [1m4.3.    bootloader &  RARP[0m

           ,
    : nfsroot=<[4mserver-ip-addr[24m>:<[4m/path/to/mount[24m> ,  :
  [4mserver-ip-addr[24m    IP  NFS-server , 
  [4m/path/to/mount[24m   path   root directory.

   :

       [1mLILO [22m,    
      "lock" :       
     ,   "lock" .     
     boot,   LILO    timeout.

           ws, 
          append=  lilo.conf .

  [1m4.4.    bootloader   RARP[0m

     nfsroot ,        :
  nfsaddrs=<[4mwst-IP[24m>:<[4msrv-IP[24m>:<[4mgw-IP[24m>:<[4mnetm-IP[24m>:<[4mhostname[24m> .   
     eth0     :

     [1mwst-IP[0m
         IP  

     [1msrv-IP[0m
         IP  NFS-server

     [1mgw-IP[0m
        gateway

     [1mnetm-IP[0m
        netmask

     [1mhostname[0m
         


  [1m5.   [0m


  [1m5.1.   /sbin/init  .[0m

        /sbin/init   ()
      distributions   /sbin/init linked
  . ,      /lib   client.
       ,  '  
  /sbin/init ( client)    linked  "Hello World".
  '            
        linking.

  [1m5.2.     /dev .[0m

            ttys,
        MAKEDEV   client  /dev
  directory.           
   64-bit  dev.     , 
    e-mail    .     
         /dev ramdisc,  
    device nodes  .


  [1m6.   [0m


      BOOTP  :
     ftp://sunsite.unc.edu/system/Network/admin/bootpc.v045.tgz

       initrd (   Linux 2.0),    
         .  ,  initrd
             .


         bootpd,   
     ,    Linux 2.0     
        BOOTP   RARP. (,  
      compile     ,   
      .)

     directory    source  kernel,  
           NFS-Root.

       patch  ,     
     swapping   NFS.    (   
     ,    ),      e-
     mail. :(

          http://www.linuxhq.com/ ,   
      "" patches.


     public PGP        finger 
      andreas@ag.or.at .    : F1 F7 43 D5 07 C4
     6C 87  BF 6B 33 A2 2C EE 5A F9.










