2

Knowing that ssh can be enabled with the initial flashing of an SD card (with raspbian) (via touch /boot/ssh) and wireless can be configured (via wpa_supplicant.conf) prior to first boot, is there also a way pre-load code (a gitlab repo) on to the pi, and/or run an initial setup script that will install an application (again, specifically asking about a gitlab repo) and configure it to run without any user input.

I know this is possible with provisioning software on Windows/Linux (via unattend.xml, pxe/salt/foreman, etc.) ... surely there must be a way to also do this on a pi (raspbian)?

The goal is to load an application (possibly from a gitlab repo) onto the pi prior to or during first boot such that the pi can just be plugged in for first boot and it will automatically install and run the application for a truly headless setup.

user3.1415927
  • 303
  • 1
  • 2
  • 14

2 Answers2

2

A Raspberry Pi is a small device, made as embedded device. It is not intended to have an installer program available like big distributions have. Embedded devices are usually programmed by flashing an image to them.

The RaspiOS has a bash boot-script available that do essential things like enable the ssh service and move wpa_supplicant.conf to its place but I don't believe that it can do more than that, in particular installing programs from a repository with user interaction. For that you have to program an installer that I haven't seen so far for a Raspberry Pi.

I suggest to use the normal way for embedded devices: create your own master image with your program pre-installed and distribute that image.

Ingo
  • 42,107
  • 20
  • 85
  • 197
0

Check out the answers to this question. I'm looking for the same kind of thing, and the highest rated answers look very good to me [1], [2].

mattexx
  • 174
  • 6