| | 1 | |
| | 2 | Go back --> [wiki:Documentation] --> [wiki:Documentation/orbit-pxe] |
| | 3 | |
| | 4 | == Loading Orbit-PXE == |
| | 5 | |
| | 6 | 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. |
| | 7 | |
| | 8 | /tftpboot/pxelinux.cfg/default |
| | 9 | |
| | 10 | {{{ |
| | 11 | default harddisk |
| | 12 | |
| | 13 | label harddisk |
| | 14 | localboot 0 |
| | 15 | }}} |
| | 16 | |
| | 17 | 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 a GET request to the the following URL to the PXE server: |
| | 18 | |
| | 19 | {{{ |
| | 20 | http://pxe:5012/pxe/setBootImage?img=<image name>&node=<node ID>&ip=<ip address of node> |
| | 21 | }}} |
| | 22 | |
| | 23 | The PXE server in turn then 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. |
| | 24 | |
| | 25 | /tftpboot/pxelinux.cfg/0A120112 --> orbit-2.0.0 |
| | 26 | |
| | 27 | {{{ |
| | 28 | DEFAULT boel |
| | 29 | |
| | 30 | LABEL boel |
| | 31 | KERNEL linux-orbit-pxe-2.6.20.4 |
| | 32 | APPEND rw init=/sbin/init initrd=initramfs-orbit-pxe-2.0.0.gz console=tty0 console=ttyS0,9600 |
| | 33 | DISPLAY message.txt |
| | 34 | PROMPT 1 |
| | 35 | TIMEOUT 1 |
| | 36 | }}} |
| | 37 | |
| | 38 | 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: |
| | 39 | |
| | 40 | {{{ |
| | 41 | #!/bin/sh |
| | 42 | NETDEV_0="eth0" |
| | 43 | NETDEV_DHCP="eth1" |
| | 44 | UDHCPC_SCRIPT="/etc/udhcp.script" |
| | 45 | UDHCPC="/sbin/udhcpc" |
| | 46 | IP_CONFIG="/bin/ip" |
| | 47 | |
| | 48 | mount -t proc proc /proc |
| | 49 | |
| | 50 | # Get network up |
| | 51 | $IP_CONFIG link set $NETDEV_0 up |
| | 52 | $IP_CONFIG link set $NETDEV_DHCP up |
| | 53 | $UDHCPC -i $NETDEV_DHCP -s $UDHCPC_SCRIPT |
| | 54 | |
| | 55 | cat /.orbit_image |
| | 56 | # Start nodeagent |
| | 57 | nodeagent& |
| | 58 | }}} |
| | 59 | |
| | 60 | After this nodeagent will just wait until nodehandler issues it further commands. |