PXE Thinstation Boot Dependent on Thin Client Iron

    In the process of work, you have to systematically replenish the fleet of thin clients, and each time clients can differ in configuration from previous ones and from one manufacturer. Well, if the differences are small and the client works on the previous Thinstation assembly, in practice it turns out that the working assembly is not compatible with new computers.

    The first thought is to build a universal boot image, but this does not always work out - either the image is very large, or the modules or packages are incompatible. The way out is to collect several images and give them to the right clients at boot time. There are several ways , here I will describe my favorite.

    For example, I have two different types of thin clients: the long-standing batch of HP Compaq t5135 and the newer batch of USN BQ 656, the hardware is different, I had to make two boot images - TS-2.2.2i and TS-5.3. I will not write about how and on what to configure PXE loading , but I will write how to give the necessary images using DHCP.

    We create two folders on the TFTP server for the images sent via PXE, respectively hp and usn, and put our bootloaders into them. Distribution will be carried out by MAC addresses, or rather, by their first half, because each vendor has its own identifier and in one batch the first half of the MAC usually coincides.
    As expected for all of my clients, HP MACs start at 00: 1E: 0B and are reserved for the Hewlett-Packard Company, and for USN at 38:60:77and are reserved by PEGATRON CORPORATION.

    Appends conditions in the server's configuration file dhcpd.conf in the description of the subnet statement :

    if (binary-to-ascii (16,8,":",substring(hardware, 0, 4)) = "1:0:1E:B") {
    filename "/hp/pxelinux.0";
    }
    elsif (binary-to-ascii (16,8,":",substring(hardware, 0, 4)) = "1:38:60:77") {
    filename "/usn/pxelinux.0";
    }
    else {
    filename "pxelinux.0";
    }

    Here, the initial MAC address values ​​that are the same for a specific manufacturer are registered and if the condition matches the start of the client’s poppy, then the bootstrap file specified in the condition is assigned to it from the corresponding folder of the TFTP server.

    It is important to note that in the “variable” hardware for network cards there is a leading block: “01:”, so you have to consider it. It is also important that if part of the MAC address starts from zero, then it is discarded during translation. Thus, the MAC address with the beginning of “00: 1E: 0B” is converted to “1: 0: 1E: B”.

    With dnsmasq, as always, it's even easier:

    dhcp-mac=hp,00:1E:0B:*:*:*
    dhcp-boot=net:hp,hp/pxelinux.0,boothost,192.168.111.254
    dhcp-mac=usn,38:60:77:*:*:*
    dhcp-boot=net:usn,usn/pxelinux.0,boothost,192.168.111.254
    dhcp-boot=pxelinux.0,boothost,192.168.111.254

    There is nothing special to explain, we assign the identifier by mass and give the bootloader by identifier, if nothing matches, we give the "default" image, I have it in the build version with the --allmodules option to get client parameters.

    Also popular now: