Details
I have a network of about 20 identical Dell PCs and 40 raspberry PI 3b+ units which were donated to a school where I'm currently doing some pro-bono work. The RPI units are for kids to browse a private intranet (learning utilities, educational games, etc.) and the PCs are for the older kids (different applications installed). All of these machines are connected to the network via ethernet, and are on the same subnet.
Since the school doesn't have much of a budget, and I can volunteer time (but I don't volunteer cash, as I'm not in a position to donate 20x new SSDs and 40x SD cards), I was planning to boot all these devices via PXE, since they don't actually require persistent storage.
Question(s)
- Is it possbile to, at boot time, run some sort of pre-execution environment (i.e. minimal Linux instance) that just queries the hardware to determine if it's a PC versus a Raspberry PI, and then boots/"chains" (i.e. like those old "Ultimate Boot CD" images did) another boot image (i.e. automatically detect hardware, and then proceed to boot a different OS image). This would let me just create a pair of PXE images for all 60x computers.
- Are there any guides/tutorials on customizing Ubuntu/Debian/Raspian PXE images? I need to:
- Add additional
apt-get
packages that are not included in the default Live USB/CD images. - Remove existing default
apt-get
packages that are not needed (to reduce the size of the OS, especially for the Raspberry PIs, which have very little RAM). - Deploy some custom static files (i.e. some config files and
udev
rules in/etc
, some additional certificates in/usr/local/share/ca-certificates
), and to run a one-time script when the system has finished booting (i.e.sudo update-ca-certficates
, set a custom wallpaper, launch a browser, and run a few other tools).
- Add additional
Work So Far
- I haven't found much information at all on automatically detecting hardware type and dynamically providing a specific PXE boot image to the client machines. Beyond some articles that just recommend "go with IPXE", I couldn't find much help. It looks like a powerful tool, but I can't determine from the documentation if it can launch one Linux instance, run a custom script to determine hardware type, and then load a separate boot image.
- Most of the article on StackOverflow (on this topic) are covering the topic of provisioning a PXE server and getting clients to connect to it. This I can do, but my primary goal is editing the boot image that gets deployed (i.e.
apt
packages present, adding/removing them as needed, adding extra static files in/etc
, and having a customized script run once the OS has been brought up). I found an impressive looking tool for this, but sadly, it looks like it's been discontinued since Ubuntu 9.x series..