Skip to content

Instantly share code, notes, and snippets.

@dmmeteo
Last active September 30, 2020 22:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmmeteo/ac60daf8c3cfb52e162a5d465791ed98 to your computer and use it in GitHub Desktop.
Save dmmeteo/ac60daf8c3cfb52e162a5d465791ed98 to your computer and use it in GitHub Desktop.
Raspberry pi image boot setup

Raspberry PI setup image for remote access

Install image on SD

  • Go to downloads and select image
  • Use sudo lsblk -p to list all mounted devices, and select your SD
  • Use sudo umount /dev/your-SD-device
  • Use sudo dd if=image.img of=/dev/your-SD-device status=progress to install image on SD

More details you can find in documentation.

Setup WIFI connection on boot

To setup WIFI on before fierst boot you should create config file with name wpa_supplicant.conf in boot volume or /etc/wpa_supplicant/ dir on rootfs volume. exampel of config:

country=US # Your 2-digit country code
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
network={
    ssid="YOUR_NETWORK_NAME"
    psk="YOUR_PASSWORD"
    key_mgmt=WPA-PSK
}
  • Use sudo wpa_passphrase "ssid" "password" to generate key_mgmt hash for WIFI connection

More details by link and link

Setup SSH boot

To setup ssh on your raspberry pi before firest boot, you should create empty file with name ssh in boot volume on your SD crad:

  • Use touch /media/your-user/boot/ssh to create empty ssh file on your SD card boot volume
  • Put SD in your raspberry pi and boot it
  • Use sudo nmap -sn 192.168.1.0/24 to find your device ip
  • Use ssh -Y pi@192.168.1.xxx to connect to your raspberry pi

By default login: pi, password: raspberry. More details by link

Static IP for WIFI

For a static IP address on an wireless connection:

  • Use sudo vi /etc/dhcpcd.conf to edit dhcp config file
  • Type in the following lines on the top of the file:
interface wlan0  # should be eth0 for ethernet connection
static ip_address=192.168.1.XX/24  ## replace XX for ip which you need
static routers=192.168.1.1
static domain_name_servers=192.168.1.1

More details by link

@dmmeteo
Copy link
Author

dmmeteo commented Sep 17, 2020

TODO:

  • Add script to get GPU and CPU temperature measurements link
  • Add info about stress util link
  • Add info how to install docker link
  • Add info about setup wifi on ubuntu-server 20.04 link and setup ssh link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment