Raspberry Pi 3 keyboardless configuration

Nice! You just bought yourself a little present, the new Raspberry Pi 3!
Now what?

Well, you can build your own domotica solution with domoticz.
Or run a minecraft server, or a TOR router

As the examples show, most of my Raspberry Pi’s are running headless (no mouse / keyboard or monitor present).
So I was looking for an easy way to do all the configuration wireless from my laptop.
And with all, I mean literally ALL. So no initial device configuration with keyboard / monitor.
After some searching I found it is actually really easy to do so (granted you are using Linux as your desktop OS).

Step 1, ¨Burn¨ raspbian lite into your SD card.
Step 2, Edit the wireless configuration file.
Step 3, stick the SD card into the Pi’s buthole and fire it up.
Step 4, scan your network for the new Pi’s IP Adress and connect to it.

Step 1, ¨Burn¨ raspbian lite into your SD card.

Put your SD card in the reader and find the mountpoint.

df -h

Most of the times it will be something like /dev/mmcblk0 (with some partition stuff like p1 and or p2 next to it.

Now lets dismount it.

umount /dev/mmcblk0p1
umount /dev/mmcblk0p2

Now let put the raspbian image onto it

sudo dd bs=4M if=/home/wouter/Downloads/2016-03-18-raspbian-jessie-lite.img of=/dev/mmcblk0

Wait for it…. wait for it…


Now we can remount the disk, I just eject and put the card in again.

sudo nano /media/wouter/eda95d8a-9cdd-4224-96d0-890b4791600c2/etc/wpa_supplicant/wpa_supplicant.conf

Be aware, you probably have to change eda95d8a-9cdd-4224-96d0-890b4791600c2 into your own partition ID.

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev

Save it.

Now let enable SSH

touch /media/wouter/boot/ssh

Let sync…


Now put the SD card in your Pi.
Start it, wait a minute…
In the meanwhile…
If you dont have nmap installed, do it now by running the command

sudo apt-get install nmap

Now we are ready to actually scan for the device

sudo nmap -sP

It should now find your device, look for ‘Raspberry Pi Foundation’
Next line will show the assigned IP adress, in my case

Now we can connect to it

ssh -l pi

Voilá, we are in!

Now lets do some updating.

sudo raspi-config

Choose “1 Expand Filesystem”
Reboot when asked.

We are almost there…

sudo apt-get update
sudo apt-get upgrade

Followup posts:
Install TOR on Raspberry Pi

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s