I'm trying to set up a bunch of Pis together on a subnet. Each Pi should have its own unique static IP address. This all well and good for 1 or 2 Pis, but I have a LOT of them.
Currently, I attach all the Micro SD cards for each Pi into many interconnected USB hubs, where I will simultaneously transfer over Raspbian to all the Pis at once.
The issue I'm running into is how do I set a different static IP on each of those Pis without having to boot each one up one by one and go and manually enter it.
One thought I had would be to use a Python script to edit the
/boot partition of the SD card for each Pi - and make each Pi auto-run a script to edit their static IPs on first boot (and make themself auto-reboot following that). However, I can't seem to find a way to auto-run a script from the
/boot partition. I'm also open to any other creative suggestions :).
EDIT: Ideally I want to be able to make changes to the SD card from my Mac, so it must be within the
/boot partition since Macs can't read/write to
ext4 file systems without paying for software to do