[Beowulf] How to do a single network install

Matt Lawrence matt at technoronin.com
Fri Jun 20 11:32:28 EDT 2008

I needed a quick way to signal back to the kickstart server that my 
install was done and to boot from the hard drive next time.  Or, PXEboot 
and then fall through to booting off the hard drive.  So, I wrote a quick 
and simple script.  In the %post clause, I have:

echo "done" | telnet 46758

Here's the script:


require 'socket'

server = TCPserver.new('', 46758)
while (session = server.accept)
   text = session.gets
   puts text
   # p session.peeraddr
   addr = ""
   session.peeraddr[3].split('.').each { |n| addr += sprintf("%02.2X", 
n.to_i) }
   p addr
     base = "/tftpboot/pxelinux.cfg/#{addr}"
     File.rename(base, base + ".done")
   rescue SystemCallError
     puts "Error occurred renaming #{base}"

Yeah, lots of stuff hardcoded.  Enjoy.

-- Matt
It's not what I know that counts.
It's what I can remember in time to use.
Beowulf mailing list, Beowulf at beowulf.org
To change your subscription (digest mode or unsubscribe) visit http://www.beowulf.org/mailman/listinfo/beowulf

This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

More information about the Beowulf mailing list