Gentoo Wiki


This article is part of the Imaging series.
G4U G4L yagi UDPcast LiveCD



I have some Dell GX280s at work which have no PS/2 mice or keyboards. Not even Norton Ghost supports them, but thanks to my local LUG, VAGUE I heard about udpcast and it works great. This will tell how to use pxegrub and udpcast to do unattended installs of cloned images.

This document instructs you in how to:

However, for most people, the documentation found on is sufficient.


For an attended cloning with udpcast before you jump into the unattented guide, here's a very quick example of what one might do.

Instead of manually running the commands you could go to and create a boot disk that will work with both your client and server systems.


Once you prepare a machine for imaging - and don't forget to defrag using Perfect Disk and run `nullfile.exe` or `dd if=/dev/zero of=/${YOUR_FILESYSTEM} bs=16M `(/ or /mnt/win9x for example) you can boot with a Linux disk which has updcast and run:

emerge udpcast
udp-sender --full-duplex --pipe "gzip -c" --file /dev/hda

This will take full advantage of the network, use gzip compression, and read from the entire primary master PATA hard drive.


You'll probably want one machine to keep an image stored on it, on that machine run:

emerge udpcast
udp-receiver --pipe "gzip -dc" --file /var/udpcast/gx280.hda.gz

but on other machines that are to receive the image now, run:

udp-receiver --pipe "gzip -dc" --file /dev/hda


Unattended Cloning Guide



There is a quick and painless utility called AngryIP (available for Windows and may run under wine provided that you are root and have comctl32.dll) with which you can export a csv file to feed into a web-based database application (which I am working on, but does not yet exist) that would create all of the appropriate symbolic links and such that you will need for the rest of this.

Acquiring Inventory with AngryIP:

  1. Reset to defaults Utils --> Install / Uninstall --> Remove settings from registry
  2. Close and reopen angryip.exe
  3. Under Options --> Select Columns choose:
    • MAC Address
    • hostname
    • Comp Name
    • Group Name
  4. In the first IP Range box put and click class C
  5. Click the red button that says "Start" only after reading the following warning

LEGAL NOTICE: Be VERY careful what you do with ipscan.exe. Assuming that you scan only your own network with the default set of options for MAC, IP, and HOSTNAME it should be safe to use. However, if you turn on any of the additional portscanning features or scan networks of which you are not the administrator, you could find yourself in BIG trouble. Port scanning without consent is a FEDERAL offense in the United States of America.

Exporting Inventory list:

  1. Sort list as appropriate
  2. File --> Export Selection
  3. Change the save type from text to csv
  4. Save your file as ${HOME}/ipscan.csv
  5. Open the file in your favorite spreadsheet application rearrange the columns in this order:
    • MAC
    • IP
      • (or COMP NAME, whichever is filled - varies on Windows / Linux)
      • (windows only)
  6. Delete all of the columns except for those which represent MAC, IP, and HOSTNAME.
  7. Save the file
    • If your favorite spreadsheet is OpenOffice Calc, you'll need to select "Save As...", check "Edit filter settings", click save, and delete " from the text delimeter field.


Follow the LTSP Server : DHCP guide for information on how to set up dhcp. The purpose of using DHCP is the same for both LTSP and imaging with UDPCast - boot a filesystem from the network. We'll only be changing a few parameters.

Convert Inventory to Static DHCP

If you don't have a good reason not to, now would be a great time to convert your network to static dhcp. Here are a few scripts to help with that. Considering that the first 3 sets of characters AB:01:CD:23:EF:45 in a MAC address are more or less unique for a particular model of machine, the list will be quasi sorted for you, but you'll need to actually group them on your own. Formats your current inventory information:

sort ~/ipscan.csv | while read NODE; do
   MAC_I=`echo $NODE | cut -d',' -f1`;
   IP_I=`echo $NODE | cut -d',' -f2`;
   HOSTNAME_I=`echo $NODE | cut -d',' -f3`;
   echo "host ${HOSTNAME_I} {
   hardware ethernet `echo ${MAC_I} | sed s/-/:/g`;
   fixed-address ${IP_I};

Ignore current IP and hostname information, autoincrement starting at

sort ~/ipscan.csv | cut -d',' -f1 | while read MAC; do
   let COUNT=${COUNT}+1; 
   if [ -e "$COUNT_IP" ]; 
      then COUNT_IP=100; 
   let COUNT_IP=${COUNT_IP}+1;
   echo "host ws${COUNT} {
   hardware ethernet `echo $MAC | sed s/-/:/g`;
   fixed-address 192.168.1.${COUNT_IP};

Grouping Machines

You may not really NEED to group your machines, but it helps for the sake of logic

group {
   # Library PCs
   # range;
   filename /tftpboot/pxe/pxelinux.0;
   host ws101 {
      hardware ethernet AB:01:CD:23:EF:45;

the filename is something we'll discuss in a minute


Follow the LTSP Server : tftpboot guide for information on how to set up dhcp. The purpose of using DHCP is the same for both LTSP and imaging with UDPCast - boot a filesystem from the network. We'll only be changing a few parameters.

I don't have this script right now... I'll finish creating it later, just consider a format like this:

export PXECFG_PATH="/tftpboot/pxe/pxelinux.cfg/"
sort ~/ipscan.csv | while read NODE;
   do MAC_I=`echo $NODE | cut -d',' -f1`;
   rm ${PXECFG_PATH}/`echo 01-${MAC_I} | tr '[A-Z]' '[a-z]'`
   ln -s ${PXECFG_PATH}/default ${PXECFG_PATH}/`echo 01-${MAC_I} | tr '[A-Z]' '[a-z]'`;
# Note that the additional 01- needs to be there
ln -s /tftpboot/pxe/pxelinux.cfg/default /tftpboot/pxe/pxelinux.cfg/`echo ${GROUP_I} | tr '[A-Z]' '[a-z]'`
rm /tftpboot/pxe/pxelinux.cfg/`echo ${MAC_I} | tr '[A-Z]' '[a-z]'`
ln -s /tftpboot/pxe/pxelinux.cfg/${GROUP_I} /tftpboot/pxe/pxelinux.cfg/`echo 01-${MAC_I} | tr '[A-Z]' '[a-z]'`


For machines that support PXE. You may need to configure this in your BIOS. As a default we want machines to boot to their regular operating system, but have imaging as an option. We can easily change the imaging option to be the default option and then set a windows (or linux) net rpc script to force a shutdown on friday evening and then reset it monday morning.

timeout 50
default local
display default.msg
prompt 1
F1 default.msg
F2 kernels.msg
F3 help.msg

label local
  # Boot local system default
  localboot 0
  # localboot 0x80 # hard drive
  # localboot 0x00 # floppy

label udpcast-receiver
  kernel linux-udpcast
  append load_ramdisk=1 initrd=initrd-udpcast.sata.gz.receiver root=/dev/ram0
  ipappend 1

label udpcast-sender
  kernel linux-udpcast
  append load_ramdisk=1 initrd=initrd-udpcast.sata.gz.receiver root=/dev/ram0
  ipappend 1

label ltsp
  kernel bzImage-2.6.9-ltsp-3
  append init=/linuxrc rw root=/dev/ram0 initrd=initrd-2.6.9-ltsp-3.gz NIC=tg3
Booting [local] operating system in 5 seconds.

Press: F2 for more options. F3 for help.
local : boot local devices
udpcast-receiver : recieve a new image
(for malfunctioning PCs. Before using this option dial ext 123 for an IT assist)
udpcast-receiver : send this image
(for healthy PCs. Before using this option dial ext 123 for an IT assist)
ltsp : boot thin-client linux


For machines that don't support PXE


You can emerge udpcast to get the command-line tools udp-receiver and udp-sender. These are usefull when you want to permanently store an image on a server. In my case, I had some trouble getting the process to run fully automatically without keyboard input so i restorted to making it a two-step process (usb keyboards = can't "Press any key to begin"). But you may be able to use the --nokbd directive to get into keyboardless mode.

For example, say that you have already booted up a machine with udp-${DIRECTION} using gzip and /dev/sda:

Creating the image

Visit and start by

You can find out, of course, by lspci and performing a short google. emerge pciutils if you don't have lspci.




Wireless: (quite a bit trickier to figure out) atmel oronico prism54

SATA: sata_piix sata_nv sata_sil sata_promise

boot up all of the receivers first and then the sender. It seems to work better that way.

Retrieved from ""

Last modified: Sun, 18 Mar 2007 12:18:00 +0000 Hits: 10,561