Injecting a file into an rasberry pi boot image

I have a script I run on a fresh raspberry pi install, I scp it in and run it immediately after the initial install boot. It's easy and not time consuming.

This is a "want to do it for the sake of it" exercise but I haven't done this before and am not entirely sure what to google for the right guide.

I want to inject that file into the boot image so it is available in /root/hello.world after the initial install is done.

Any help would be appreciated.
 
Just mount the image with mdconfig(8), add the file, then write that image to an SD card. The images for the Pi are ready to run, you don't need to "install" them.
 
Back
Top