Nfarrow wrote: ↑
Sun Jan 21, 2018 3:07 am
Hello fellow Pi people . One quick question. If I have a freshly made image of Raspbian on an SD card. I mount it in windows I see view able files and folders. Would there be a file that I can setup my shell commands to configure the pi after it boots up. if I place the shell code in it?
The short answer is: Not yet.
The longer answer is that this functionality has been requested many times and will, I'm assuming, get implemented at some point. Currently, the "Pi Baker" system (which runs, I believe, only on Macs) does something like this. As I understand it, Pi Baker involves modifying the image so that a script on the FAT partition (the only one normally accessible by Mac or Windows) will be run on first boot of the Pi. I've never used PB, but my guess is that it (the custom script produced by the PB system) runs out of rc.local (on the Pi). All of this implies that for each new release of Raspbian this special modification must be done by the PB maintainer(s), in order to keep up. Obviously, it'd be better all around if this functionality were in the core OS release, so that no after-market modification was necessary.
Incidentally, if you were doing this on a large enough scale, it might be worth it to you to develop a process similar to this - where you use a Linux system to modify the image file to run your script from rc.local. Then you'd have the functionality that you need.