For the retrofit of some older embedded (Intel, x86) PCs I would like to install a customized Debian image with as little as possible user interaction.
Normally I would create a Debian installation, customize it (install packages, configuration files, etc) then remove all device-specific configuration (SSH Host keys etc) create an image file, and flash that image to the destination hard disk.
But for my new use case I want to automate the flashing process: Create a bootable USB thumb drive with a kind of live system. As soon as the USB boots it runs some checks and then uses dd
to transfer the image to the hard drive. The OS then waits for the USB drive to be removed and reboots the PC.
Is this a best practice for headless Linux installation? Are there better alternative approaches?
Signaling the user the installation progress (when to remove the USB drive etc.) can be done using fairly prominent status LEDs on the front of the device.