Skip to content

Instantly share code, notes, and snippets.

@robinmonjo
Last active December 7, 2017 02:24
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save robinmonjo/9196835 to your computer and use it in GitHub Desktop.
Save robinmonjo/9196835 to your computer and use it in GitHub Desktop.
Install + configure minibian from Mac

Prepare SD card

  • Download MiniBian
  • extract MiniBian .img
  • insert SD Card
  • use disk utility to format the card with fat32
  • check from terminal (OSX) which disk the SD Card is using diskutil list
  • unount SD Card: diskutil unmountDisk /dev/diskX where X is what you found out last step
  • copy image to SD Card: sudo dd bs=1m if=<path to the .img file> of=/dev/rdiskX
  • wait until dd is finished
  • diskutil diskutil unmountDisk /dev/diskX

Connect to the Pi

  • Disconnect Power from RPi
  • insert SD into your RPi
  • Connect Power
  • Check your Router which IP the RPi got (for example: 192.168.1.10)
  • login with SSH ssh root@192.168.1.10 (default password: raspberry)

Configure

  • update apt sources: apt-get update
  • install raspbian config tool: apt-get install raspi-config
  • raspi-config (configure everything, expand file system etc ...)

Create a user

  • install sudo: apt-get install sudo
  • create a user: adduser <username> and set a password
  • edit sudoer file: nano /etc/sudoer and add this line: " ALL=(ALL) ALL" under the line "root ALL=(ALL) ALL"
  • logout from ssh exit and then login again using <username>@192.168.1.10

Configure Go

  • install golang: sudo apt-get install golang
  • add export GOARM=5 to .bashrc or .zshrc and source it (to make go build use ARMv5)

Direct ethernet connect with internet

  • System preferences > sharing, set it on with, "Share your connection from Wifi" > "To computers using ethernet"
  • Connect the Pi and the mac using their ethernet ports and then turn on the Pi
  • In System preferences > network, the ethernet connection should be green with some random address assigned. Wait a few seconds until the Pi finished its boot process
  • Use arp -a to check arp table entries and get the Pi IP. You should see something similar to :
~  arp -a
? (192.168.2.1) at XX:XX:XX:XX:62:a5 on en1 ifscope [ethernet]         #ether interface
? (192.168.2.255) at ff:ff:ff:ff:ff:ff on en1 ifscope [ethernet]       #ether interface broadcast
? (192.168.3.2) at XX:XX:XX:XX:7b:63 on bridge100 ifscope [bridge]     #bridge (internet sharing) with Pi assigned IP addr
? (192.168.3.255) at ff:ff:ff:ff:ff:ff on bridge100 ifscope [bridge]   #bridge broadcast
  • Go ahead and ssh to 192.168.3.2 which is the IP that get assigned to the raspberry pi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment