Sophie

Sophie

distrib > Mandriva > 2009.0 > i586 > by-pkgid > 336fde03ebd82afa309b51dbda1609de > files > 5

nettee-0.1.8-2mdv2008.1.i586.rpm

Instructions for using nettee with SystemImager - method 1

nettee may be used to distribute disk images with SystemImager, instead
of rdist.  To do so make the following changes:

1.  modify /etc/dhcpd.conf so that  it looks like this:
option option-200 code 200 = text; #near the "server-name" line

and for each client

host node01.cluster { 
  hardware ethernet 00:12:23:45:67:89;
  fixed-address node01.cluster;
  filename "";
  option option-200 "node02.cluster"; }

etc., except for the last node in the chain which should use:

  option option-200 "_EOC_"
  
2. restart the dhcpd server
3. Make a new boel_binaries.tar.gz that includes
   nettee and extract.  WHEREVER on my system is
   /usr/share/systemimager/boot/i386/standard
   but it may be different on yours:
   
   mkdir /tmp/boel
   cd /tmp/boel
   gunzip -c $WHEREVER/boel_binaries.tar.gz | tar -xf -
   cp `which extract` usr/bin
   cp `which nettee`  usr/bin
   tar cf ../boel_binaries.tar .
   cd ..
   gzip boel_binaries.tar
   mv $WHEREVER/boel_binaries.tar.gz  $WHEREVER/boel_binaries.tar.gz.dist
   mv -f boel_binaries.tar.gz $WHEREVER
   
4. Make a new tftboot/boel_initrd.img that can extract the nextnode
   information from the DHCP server.  This must be done in stages.
   First unpack the initrd.img and copy it so that you can modify
   the files it contains:
   
   cd /tmp
   mkdir mntinitrd
   mv /tftpboot/boel_initrd.img   /tftpboot/boel_initrd.img.dist
   gunzip -c /tftpboot/boel_initrd.img > mountable_initrd.img
   mount -o loop mountable_initrd.img mntinitrd
   mkdir newbeolcram
   cd newbeolcram
   (cd ../mntinitrd ; tar cf - . ) | tar xf -
   umount /tmp/mntinitrd
   cd etc

5. Modify /tmp/newbeolcram/etc/dhclient.conf so that it looks like:
      #   option-144  ->  TMPFS_STAGING
      #   option-200  ->  NEXTNODE for nettee, Mathog, 26-APR-2005
      #   option-208  ->  SSH_DOWNLOAD_URL (depricated)
      
   and
        option-144,
        option-200,
        option-208,

6.  Modify /tmp/newbeolcram/etc/ so that it looks like:

#   option-144  ->  TMPFS_STAGING
#   option-200  ->  NEXTNODE, MATHOG, 26-APR-2005
#   option-208  ->  SSH_DOWNLOAD_URL (depricated)
   
   
and also insert this

#MATHOG, get the nextnode value from the DHCP server.  If
#it doesn't exist set it to  _EOC_ (end of chain).
#
#
if [ ! -z $new_option_200 ]; then
echo "NEXTNODE=$new_option_200"                         >> $FILE
else
echo "NEXTNODE=_EOC_"                                   >> $FILE
fi

just before the existing line:
### END SystemImager stuff part 0 ###

7.  Finally, rebuild a boel_initrd.img file and put it back
    in tftpboot.  The original working one was already saved in
    (4.) above:
     
   cd /tmp
   mkcramfs --verbose newbeolcram boel_initrd.cramfs
   gzip boel_initrd.cramfs
   mv -f boel_initrd.cramfs.gz /tftpboot/boel_initrd.img
   
8. Put the nettee install script in /var/lib/systemimager/scripts
in the appropriate place so that nodes which reboot will pick it up.
An example script "beowulf.master" has been provided.

9. Verify once more that the /etc/dhcpd.conf file has pxelinux.0 and
nextnode specified correctly for the nodes which will be booted.  For
instance, to do just node01 use:

host node01.cluster { 
  hardware ethernet 00:12:23:45:67:89;
  fixed-address node01.cluster;
  filename "pxelinux.0";
  option option-200 "_EOC_"; }

10. Reboot the nodes you wish to load.
11. Issue the command:

  cd /var/lib/systemimager/images/imagetoload
  tar cf - . | nettee -in -  -next $FIRSTNODE -v 31 -w

12.  When the nodes are all beeping (indicating done) 
    A.  set /etc/dhcpd.conf back to >filename "";<
    B.  restart the dhcpd server
    C.  reset (reboot) the loads which were just loaded