0

I have a lab of servers that need to be rebuilt frequently. I currently have a PXE server on a special vlan that can automatically install a single OS without human interaction.

How would I expand this to allow specific servers to get a specific OS installed automatically. Ie server A, B, C would get CentOS 7, server D, E gets RHEL 8, and server F gets CentOS Stream.

I can add OS versions to a boot menu in TFTP but then a human has to select the OS version. I tried to use expect to make the selection over serial, but it was cumbersome and prone to failure.

Is there someway to whitelist OS version to MAC address using PXE or another technology that can achieve the same goal?

6
  • Maybe by defining hardware of each to identify them from serial number or something to link it to an OS list you have to manage. If servers have hardware remote management tools then look at that, many of them can be scripted from remote to trigger installations of OS's. DELL, HP, IBM do that (with theirs own tools each)
    – francois P
    Nov 18, 2021 at 9:17
  • Please add example of your exact hardwares & needs to your question & what are the automation management tools you're using (puppet/ansible/bash scripts & so on...) so we can help you better
    – francois P
    Nov 18, 2021 at 9:46
  • 1
    If you use Clobber, you can create a hardware profile that contains a MAC address. this hardware profile can be mapped to a specific distro, and once it is booted using PXE, Cobbler will provide it with the correct image to boot and start the installation. See: cobbler.readthedocs.io/en/latest/cobbler.html . The Foreman project also use Cobbler as back end. Might be easier to use. theforeman.org Nov 18, 2021 at 9:54
  • @francois_P I’m using HP servers with ILO but we aren’t willing to pay for the premium license for the number of servers we have. The need is to whitelist os version by MAC address so that when a server is switched to the PXE vlan, it will automatically install the correct OS. We are using ansible to do the ILO control of the server and switch management, but we can use any software or process needed.
    – dranobob
    Nov 18, 2021 at 15:13
  • @sharuzzaman I’ll give it look. Thanks.
    – dranobob
    Nov 18, 2021 at 15:13

1 Answer 1

0

A technique that can be used is to customize the bootloader configuration based on the booting system's MAC address. The bootloader configuration can provide different default options to allow different behavior without any interaction.

Three common PXE bootloaders, PXELinux, Grub, and iPXE can all provide configuration based on MAC address. They each have different capabilities.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .