Skip to content

Instantly share code, notes, and snippets.

@jepebe
Last active November 1, 2022 20:05
Show Gist options
  • Select an option

  • Save jepebe/ff885d024c4f1331a0f9fa95dd5c991d to your computer and use it in GitHub Desktop.

Select an option

Save jepebe/ff885d024c4f1331a0f9fa95dd5c991d to your computer and use it in GitHub Desktop.

Writing an image file to SD card on MacOS

Information from here

sudo dd if=path_of_your_image.img of=/dev/rdiskn bs=1m

rdiskn means raw disk device and is supposed to be faster to write to link

Setup SSH

Add an empty file called ssh into the new drive named boot like so touch ssh.

Add a file called userconf.txt (touch userconf.txt) with the following content:

username:password

Where password is the encrypted password generated by running openssl passwd -6

Updating Raspberry PI

sudo apt update
sudo apt full-upgrade

Fix perl: warning: Setting locale failed.

Change /etc/default/locale to this

#  File generated by update-locale
LANG=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
LC_MESSAGES=en_US.UTF-8
LC_ALL=en_US.UTF-8

For example like this: sudo nano /etc/default/locale

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