I understand that the init process is the first to run and all processes get launched from it, but is it possible to launch any programs before init? (Possibly writing a kernel driver that gets executed early on in the boot sequence?)
This program would be testing various parts of its own hardware and writing a text file to the root file system relaying its status. If launching a program during the boot sequence is possible, what is the best way to go about doing this given that the program I'm executing must happen after the hardware its checking has already been initialized earlier in the boot?
I am looking to launch this program after a couple seconds of the computer turning on while the entire system takes about 13 seconds to fully boot. This is necessary as the application is catered towards radiation testing. During radiation testing, there are pulses from the beam showering the computer in heavy ions, protons, neutrons, etc. and those pulses are a couple seconds apart. I need to launch a program before the beam comes back on and potentially crashes the computer causing another reboot.