Setting up the pi - lukemerrick/smart-thermostat GitHub Wiki
It takes some configuration to get the Pi ready to roll as a thermostat. Pretty much all commands require sudo privileges.
Loading the OS onto the pi
- Write the image to the ssd.
dd if=/path/to/raspberrypi.img of=/dev/mmcblk0 status=progress bs=4096
- Configure emulated ethernet and ssh
mkdir /mnt/piboot
mount /dev/mmcblk0p1 /mnt/piboot
touch /mnt/piboot/ssh
echo "dtoverlay=dwc2" >> /mnt/piboot/config.txt
echo "dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext 4 elevator=deadline fsck.repair=yes rootwait modules-load=dwc2,g_ether quiet init=/usr/lib/raspi- config/init_resize.sh" > /mnt/piboot/cmdline.txt
- Clean up
umount /mnt/piboot
rmdir /mnt/piboot