mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2025-02-26 15:42:28 +01:00
This will allow building a raspiblitz base image with packer and spin up a development environment in a VM.
30 lines
998 B
Bash
30 lines
998 B
Bash
#!/bin/bash -eux
|
|
|
|
# Add vagrant user to sudoers.
|
|
echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
|
|
sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers
|
|
|
|
# Disable daily apt unattended updates.
|
|
echo 'APT::Periodic::Enable "0";' >> /etc/apt/apt.conf.d/10periodic
|
|
|
|
apt update
|
|
apt upgrade -y
|
|
|
|
apt install -y dkms make linux-headers-amd64 parted
|
|
mkdir -p /mnt/vbox/
|
|
mount /home/vagrant/VBoxGuestAdditions.iso /mnt/vbox
|
|
/mnt/vbox/VBoxLinuxAdditions.run --nox11
|
|
|
|
mkdir -p /home/vagrant/.ssh
|
|
chmod 0700 /home/vagrant/.ssh
|
|
wget --no-check-certificate \
|
|
https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub \
|
|
-O /home/vagrant/.ssh/authorized_keys
|
|
chmod 0600 /home/vagrant/.ssh/authorized_keys
|
|
chown -R vagrant /home/vagrant/.ssh
|
|
|
|
# disable apparmor - tor will not work with raspiblitz customization
|
|
mkdir -p /etc/default/grub.d
|
|
echo 'GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT apparmor=0"' \
|
|
| tee /etc/default/grub.d/apparmor.cfg
|
|
update-grub
|