raspberry-ready v1.0.8
raspberry ready
The script I use when my raspberry pi turns on.
Setup (headless)
Install Raspberry Pi Imager from here and flash the latest lite version onto an sdcard or ssd
Create an empty SSH file in the boot partition
Create a file called
wpa_supplicant.confin the boot partition with the contents
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=RO
network={
ssid="Unimatrix"
psk="<SECRET_PASS_HERE>"
}SSH into your device (default password is
raspberry)ssh pi@raspberrypiUpdate software / firmware
sudo apt update && \
sudo apt full-upgrade -y && \
sudo apt autoremove && \
sudo apt cleanChange default password and timezone
sudo raspi-configReboot
sudo reboot
Overclock
Open the config file
sudo nano /boot/config.txtUncomment and add the following lines
over_voltage=6
arm_freq=2000Instalation
Install docker
curl -sSL https://get.docker.com | shAdd permission to pi user to run docker commands
sudo usermod -aG docker piReboot
sudo rebootTest docker installation
docker run hello-worldInstall dependencies for docker-compose
sudo apt install -y libffi-dev libssl-dev && \
sudo apt install -y python3 python3-pip- Install docker-compose
sudo pip3 install docker-compose
Run on startup
Symlink /etc/rc.local to ~
ln -s /etc/rc.local startupOpen startup
sudo nano startupBefore exit add scripts (important: the
--privilegedflag is needed in order to access the GPIO from the container)
# Run ready scripts
sudo /home/pi/./shutdown-script.sh &
docker run --privileged --rm --name ready -d -v /var/run/shutdown_signal:/shutdown_signal highstrike/raspberry-ready:v1.0.8- Add script to ~
touch shutdown-script.sh && \
chmod +x shutdown-script.sh && \
nano shutdown-script.shCopy paste the script it from here
Reboot
sudo reboot
Other
check frequency
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freqcheck temperature
/opt/vc/bin/vcgencmd measure_tempcheck fan-speed
docker logs ready -finstall git
sudo apt install -y gitset git global identity
git config --global user.email "flavius@unimatrix.ro"git config --global user.name "highstrike"github ssh key
ssh-keygen -t rsa -b 4096 -C "highstrike@gmail.com"cat ~/.ssh/id_rsa.puband add it to github / settings / ssh / new ssh keyssh -T git@github.comto test connectionbenchmarking
sudo apt install -y sysbenchsysbench --test=cpu --cpu-max-prime=50000 --num-threads=4 run(cpu speed)sudo curl https://raw.githubusercontent.com/TheRemote/PiBenchmarks/master/Storage.sh | sudo bash(storage speed)block wifi & bluetooth
rfkill block wifirfkill block bluetoothneofetch
sudo wget -O /usr/local/bin/neofetch https://raw.githubusercontent.com/dylanaraps/neofetch/master/neofetchsudo chmod a+x /usr/local/bin/neofetch