wiki:Software/eAM/ePXE

Version 7 (modified by mcgrof, 16 years ago) ( diff )

Update to reflect trunk

Go back —> Documentation —> Orbit-PXE

Loading Orbit-PXE

Whether you are imaging a node, saving a node image or doing inventory control Orbit nodes get orbit-pxe image loaded first into RAM. The way this is accomplished is by having the PXE server make a symbolic link of the node's IP address in hex to the orbit-pxe configuration file on the TFTP server. By default PXE configuration is to have the node boot off its local hard disk.

/tftpboot/pxelinux.cfg/default

default harddisk

label harddisk
  localboot 0

When orbit-pxe is to be loaded the nodehandler first tells the PXE server to set the symbolic link up to the orbit-pxe configuration. It does this by issuing an http GET request to the the following URL:

http://pxe:5012/pxe/setBootImage?img=<image name>&node=<node ID>&ip=<ip address of node>

The PXE server in turn creates a symbolic link for the respective IP address in hex. For example, if the node has an IP address of 10.18.1.2 (the case of sandbox8, node1-2) the respective IP address in hex is 0x0A.12.01.12 and as such its symbolic links' filename will be 0A120112.

/tftpboot/pxelinux.cfg/0A120112 —> orbit-2.0.0

DEFAULT boel

LABEL boel
KERNEL linux-orbit-pxe-2.6.20.4
APPEND rw init=/sbin/init initrd=initramfs-orbit-pxe-2.0.0.gz console=tty0 console=ttyS0,9600
DISPLAY message.txt
PROMPT 1
TIMEOUT 1

The specific version of orbit-pxe that is to be symlinked to is controlled by the nodehandler. After the symbolic link request the nodehandler will the reboot the node and based on this example the node will then load linux-orbit-pxe-2.6.20.4 with initramfs-orbit-pxe-2.0.0.gz as its initramfs cpio archive. The kernel then boots and finally calls /etc/init.d/rcS:

#!/bin/sh
NETDEV_0="eth0"
NETDEV_DHCP="eth1"
UDHCPC_SCRIPT="/etc/udhcp.script"
UDHCPC="/sbin/udhcpc"
IP_CONFIG="/bin/ip"

mount -t proc proc /proc
# pts requires a directory for multiple pts's:
mkdir /dev/pts
mount -t devpts devpts /dev/pts

ifconfig lo 127.0.0.1

# Get network up
$IP_CONFIG link set $NETDEV_0 up
$IP_CONFIG link set $NETDEV_DHCP up
$UDHCPC -i $NETDEV_DHCP -s $UDHCPC_SCRIPT
# No need to request an IP via DHCP on NETDEV_0
# If you do add it make sure you'll get an answer or
# be sure to background the job
# $UDHCPC -i $NETDEV_0 -s $UDHCPC_SCRIPT &

# enable logging (if the feature is built into busybox):
# Note that nodeagent4 doesn't use syslog anyway so you don't
# really need it unless you want to monitor some other daemons
if [ -f /sbin/syslogd ]; then
        /sbin/syslogd
else
        echo "Syslog daemon not found"
fi

# You don't need this if you have serial access ;)
if [ -f /usr/sbin/telnetd ]; then
        /usr/sbin/telnetd
else
        echo "telnet daemon not found"
fi
cat /.orbit_image
# Start nodeagent
nodeagent4&

After this nodeagent will just wait until nodehandler issues it further commands.

Note: See TracWiki for help on using the wiki.