I’m creating Debian-based VMs with everything else as the default apart from selecting “Add Script” as the Firstboot script option, then pasting in some shell code.
I started out with something that starts:
#!/bin/bash # Paste me as the ByteMark first run script # Install Salt /bin/echo 'deb http://debian.saltstack.com/debian stretch-saltstack main' >> /etc/apt/sources.list /usr/bin/wget -O - http://debian.saltstack.com/debian-salt-team-joehealy.gpg.key | apt-key add - /usr/bin/apt update /usr/bin/apt install -y salt-minion
But that didn’t work. I simplified the code, tried sh rather than bash, got down to the minimal test case of:
and that doesn’t work either.
Does anyone have an example of a first boot script that works, or a suggestion for what I might be doing wrong?