Skip to content
/ rpi-setup Public

Short script to set up a raspberry pi to be bootable

License

Notifications You must be signed in to change notification settings

za3k/rpi-setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Usage: pi-setup HOSTNAME

This is a script which

1. Downloads the latest raspberry pi image
2. Configures it to turn on SSH and wifi, and sets a random password on the 'pi' user
3. Writes that image to the (currently inserted) microsd card

There are various configuration options which can be used to apply additional setup--run './pi-setup' with no options to view them all.
  - (broken) `PACKAGES` - packages to install on the image
  - (working) `SSH_KEY` - location of your ssh private key for login
  - (broken) `STATIC_IP` - assign a static IP
  - (untested) `SETUP` - script to run once, after setup (default: 'apt update && apt -y upgrade')

This is a fairly unsafe script (copies your wifi settings, automatically overwrites the currently inserted microsd) so use at your own risk.

Examples:
    # Minimal setup
    WPA_SSID=Outpost WPA_PASSWORD=fakepassword ./pi-setup printserver
    # Install packages, set up a static ip so we can ssh to it headless easier, and set up ssh keys.
    PACKAGES="vim tmux" STATIC_IP=192.168.1.52 SSH_KEY=$HOME/.ssh/tarragon2017 WPA_SSID=Outpost WPA_PASSWORD=fakepassword ./pi-setup printserver

About

Short script to set up a raspberry pi to be bootable

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages