Cloned bootable usb-key for different nodes in a cluster?

Hi,

I’m trying to use nixos for a set of computing nodes of a HPC cluster.

I’m going to use usb-keys to boot the nodes. On each node, a bootable usb-key is plugged.

Among all the nodes, most of the configurations are same, but with some minor differences, for example host names, ip addresses.

It is annoying to prepare the usb-keys one by one. I plan to make one usb-key and use dd to duplicate the others.

However for the minor differences in configs, I still need to adjust them. This is still annoying.

Is there a way that I can make the system to choose corresponding configure according to some hardware features of each node say mac address?

The use case is that

  1. I prepare one mother usb-key
  2. I use dd to duplicate it
  3. The cloned usb-keys are plugged onto each single node.
  4. When the system is booting, it will detect the hardware features (e.g., mac address) and choose the correct config file.

In principle some kind of booting script can be used.

My question is that has nixos such kind of facility to do this?

Thanks.

1 Like

For me, a cluster is Proxmox.



Head back to the first node where you created the cluster and you should now see two nodes that have joined the cluster.
The USB key is Yubikey.