Headless Raspberry Pi 3 Install for Non-noobs
When you don't need a full-blown graphical interface and all you want is a powerful micro controller, then going headless is the right thing to do. And it need not be scary (no matter what Ichabod Crane says).
Join the DZone community and get the full member experience.Join For Free
Having purchased a Raspberry Pi 3 a few weeks ago, I was quite confused by almost every reference for installation mentioning "plug in HDMI monitor and USB keyboard" as a step. While I've found references on how to do a headless install, it seems that many of the instructions come from a background of "you've already installed and run the graphical installer". As a person coming from an Arduino/Linux server background, I really don't need X11 for my use case and just want a powerful micro controller that I can setup via ssh (well, USB would be better, I still don't understand why you can't do this using the USB connection as a tty...but that's a different discussion). What follows are the steps I used.
NOTE: If you use the wrong disk number you will destroy potentially important information on your machine, use at your own risk and only do this if you understand what this means. Otherwise, you will likely have an unusable machine or at a minimum lose information.
First, download the raspbian lite image.
Next, plug your sd card into your mac. Run
df and you should see an entry that corresponds to your SD card. My output had an entry similar to this (other output omitted)
/dev/disk2s1 129022 55730 73292 44% 0 0 100% /Volumes/mysdcard
Unmount the sd card:
sudo diskutil unmount /dev/disk2s1.
Copy the image to the RAW device (this means /dev/rdisk2 instead of /dev/disk2s1...the disk number will quite likely be different on your machine)...
sudo dd if=2016-03-18-raspbian-jessie-lite.img of=/dev/rdisk2 bs=1m.
Note: I'm not sure about the whole "block size" thing, but this is what I used.
This will run for a few minutes with no feedback, you can hit ctrl-T in your terminal to get a status output. Once this command has completed, you can eject the disk.
sudo diskutil eject /dev/rdisk2
Now plug the sd card into your pi, power it up (via usb), and look for the device (plugged into ethernet) on your network. Assuming you've found the device's IP address (mine was at 192.168.1.105) you can then ssh into the machine with:
ssh email@example.com, using 'raspberry' as the password.
At this point you should have a functional pi image and can continue with your configuration. My first set was to resize the root partition using raspi-config (as I have a 32gb card).
Hopefully these instructions will help "slightly more advanced" users wade through the "Noob" clutter available on the internet.
Published at DZone with permission of Michael Mainguy, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.