2

everytime I setup a new sd card for a pi, I first have to ssh to the running pi and then start to install some software via shell commands.

Isn't there a way to drop a shell setup file to the fat32 partition of a fresh sd card which then gets executed on the first run?

rdmueller
  • 287
  • 4
  • 16

1 Answers1

3

This is a problem that was discussed in the past and has some suggestions to run a script only on the first boot up from the fat32 boot partition. On a virgin Raspbian image you will find a script call to init_resize.sh for first boot up in /boot/cmdline.txt. You may modify it with some knowledge of scripting but there is a script to execute on first boot. You can find it also on github at pi-boot-script.

Ingo
  • 42,961
  • 20
  • 87
  • 207