wiki:PxeUsage

Version 30 (modified by anonymous, 16 years ago) (diff)

--

Usage

If the pxeconfigd works and you want to install, memtest, etc.. a node, a link must be placed in the /tftpboot/pxelinux.cfg directory. This can be done with the 'pxeconfig' utility. This utility will ask some questions and will make the links for you. The utility requires the following setup:

  • All the pxe configuration files must start with the keyword default. N.B.: yes, the dot after 'default' is part and parcel of the keyword! In this distribution two examples are included. Pxeconfig lets the user decide which default. config file to use.
  • If default is a symbolic link to for example default.menu, then default.menu is not included in the list where the user can choose from.
  • The default directory where the pxe config files reside is: /tftpboot/pxelinux.cfg. You can override it in configuration file pxeconfig.conf

Systemimager activation

To activate this on a client depends on your version of systemimager and your preferred method

Telnet method

To activate this on a client you must add the following line to the systemimager master script of the node. It will remove the pxe config file for the node from the pxe bootserver. I personally place the line just before the umount commands. See below which command to use for which systemimager version.

Telnet is not included in the 3.X versions:

   # Remove the <hex_ipaddr> file from the pxelinux.cfg directory.
   # So the client will boot from disk
   #
   3.X)  chroot /a telnet $IMAGESERVER 6611
   2.X)  telnet $IMAGESERVER 6611

Post install script method

With systemimager version 3.7 and higher it easier to setup. In the systemimager server examples directory there is an pxeconfig post installation script (Author: Ole Holm Nielsen), eg:

 cp /usr/share/doc/systemimager-server/examples/post-install/30all.pxeconfig \\
    <AUTOINSTALL_SCRIPT_DIR>/scripts/post-install

Example how to use pxeconfig utility

The pxeconfig command creates soft-links in the /tftpboot/pxelinux.cfg directory named as the hexadecimally encoded IP-address of the clients, and these links will point to one of the files default.*. As designed, the PXE network booting process will download the file given by the hexadecimal IP-address, and hence network installation of the node will take place. With pxeconfig you can easily create those links for the host(s)

There are serveral ways to run pxeconfig:

  • interactively, network range
  • hostname(s)
  • host range
  • rack(x) and node(y) specification

We will discuss the long options for pxeconfig for the short options:

pxeconfig -h

if -f,--filename is not specified the program will display a menu where the user can choose from.

hostname(s)

the following command will make links to the default.node_install file for hosts gb-r1n1 and gb-r1n2:

pxeconfig gb-r1n1 gb-r2n1 --filename default.node_install

host range

We want to make links for a range of hosts, eg node1 till node100, This can be acomplished with these commands:

  • pxeconfig --basename node --host-range 1-100 --filename default.node_install
  • pxeconfig --basename node --start 1 --end 100

Some sites have name their hosts, eg: node001 till node099. This can also be acomplished in several ways:

  • pxeconfig --basename node --equal-width --host-range 1-099
  • pxeconfig --basename node --host-range 001-099
  • pxeconfig --basename node --start 001 --end 099

rack(x) and node(y) specification

We want make links for hosts with a naming schema(s) like this:

 gb-r<number>n<number> 
 node-(number)-(number)

These examples will create links for node1, node2 and node3 in rack1, rack2 and rack3:

  • pxeconfig --basename gb- -rack r1-r3 --node n1-n3 --filename default.memtest
  • pxeconfig --basename node --rack 1-3 --node 1-3 --filename default.memtest

When leading zeros are used, then rack and/or node names will be padded with zeros, eg:

  • pxeconfig --basename gb- -rack r01-r02 --node n01-n02 --filename default.memtest
    will create links for hosts:
      * gb-r01n01
      * gb-r01n02
      * gb-r02n01
      * gb-r02n02