Udpcast Cloning: Imaging using Udpcast

From Debian Clusters
Jump to: navigation, search

This is the third page of a five part tutorial on cloning worker nodes with Udpcast. The full tutorial includes

kestrel:~# udp-sender -f /dev/sda
Udp-sender 2004-05-31
Using mcast address 232.168.1.201
UDP sender for /dev/sda at 192.168.1.201 on eth0 
Broadcasting control to 192.168.1.255
New connection from 192.168.1.202  (#0) 00000009
Ready. Press any key to start sending data.
New connection from 192.168.1.205  (#1) 00000009
Ready. Press any key to start sending data.
New connection from 192.168.1.203  (#2) 00000009
Ready. Press any key to start sending data.
New connection from 192.168.1.207  (#3) 00000009
Ready. Press any key to start sending data.

Setting the Nodes to PXE Boot

All of the nodes that will be receiving an image, plus the node that will be sending its image, need to be configured to PXE boot. This should be a setting in the BIOS. It might be listed under boot options, PCI options, advanced options, or something else. Generally you're looking for something along the lines of "Onboard NIC ROM", "PXE Boot", or "Network Boot", and you want that setting to be enabled.

Configuration for the Nodes Receiving an Image

The next time that node is restarted, it should first look to the network for a DHCP server with a PXE image to boot from before booting from its own hard drive. If you start up one of the nodes, the udpcast image will load and then you'll be prompted to answer a series of questions. Rather than having to answer these questions again for each node, the pxelinux.cfg/default can be edited to automatically supply them.

You can do this by writing down your answers for each of the questions or manually editing the file using the documentation on the Udpcast site (see "The configuration file" header). Then update the file /var/lib/tftpboot/pxelinux.cfg/default. This will be the file that all of the receivers use for configuration (we'll create the sender one in a moment).

Commands need to be added to the end of the line beginning with

append load_ramdisk=1 initrd=initrd root=01:00

Mine ended up being this:

default linux
label linux
  kernel linux
  append load_ramdisk=1 initrd=initrd root=01:00 auto=yes lang=US kbmap=US netmodule=AUTO netmodparm= dhcp=yes port=9000 enableDiskmodule=yes diskmodule=AUTO diskmodparm= disk=/dev/sda compr=none umode=rcv udpcparam=
  ipappend 1
  • auto=yes means that the user should not be prompted for any parameters already specified.
  • lang is the language
  • kbmp is the keyboard map
  • netmodule=AUTO means the network interface should automatically be detected
  • netmodparm are parameters for the network interface. Even though there aren't any, the parameter needs to be entered or the computer booting with this configuration will prompt the user for them.
  • dhcp=yes means that the nodes should use their information on IP, gateway, etcetera from the DHCP server (you can specify your own instead if you need to).
  • port=9000 specifies that the transfer will occur on port 9000 (the default, but again it needs to be entered so it doesn't prompt)
  • enableDiskModule needs to be yes, since it specifies if the drivers for the hard drive should be loaded
  • diskmodule is the specific driver for the disk. AUTO causes it to automatically detect them.
  • disk specifies what is to be imaged. In my case, the hard drive to be imaged is /dev/sda. (To determine yours, use fdisk -l.)
  • compr is the compression; it's fine not to use any.
  • umode can be snd (send) or rcv (receive). This is the file all the receivers will take, so use rcv.
  • udpcparam are any additional parameters. Again, there are none, but unless it is specified, the prompt will come up.

Configuration for the Sending Node

The sending node needs a different configuration file to tell it to send the image of its hard drive rather than receiving one. The default file is used by any PXE booting machines without their own individual configuration files. Rather than having the udp-sender use the default file, we'll specify its own for it. The first place a machine looks for a configuration file is a file that starts with 01- followed by its MAC address specified with dashes. For instance, a machine with a MAC address of 00:0e:0c:4d:a4:b2 looks for a file named 01-00-0e-0c-4d-a4-b2.

Create this file by copying the default one:

cp default 01-<your sender's MAC address>

Then we need to update the file with the correct parameters for the sender. Specifically, the umode parameter needs to be changed from rcv to snd. udpcparam= also needs to be changed to udpcparam=broadcast.

Links

Personal tools
Namespaces
Variants
Actions
About
services
node images
clustering
web monitoring
Toolbox