Headless Raspbian Installation

Here are the steps I took to get Raspbian working on my Raspberry Pi in a headless fashion. The Rasbian SD card image has just been released and can be downloaded here.

Following the instructions here:

$ unzip 2012-07-15-wheezy-raspbian.zip
Archive:  2012-07-15-wheezy-raspbian.zip
  inflating: 2012-07-15-wheezy-raspbian.img  
$ df -h
$ diskutil unmount /dev/disk2s1
Volume RASPI on disk2s1 unmounted
$ sudo dd bs=1m if=2012-07-15-wheezy-raspbian.img of=/dev/rdisk2
1850+0 records in
1850+0 records out
1939865600 bytes transferred in 198.319278 secs (9781528 bytes/sec)
$ diskutil eject /dev/rdisk2
Disk /dev/rdisk2 ejected

I had to make one change to the instructions as there was an error: replacing “bs=1M” with “bs=1m” due to using a differing version of dd.

Plug that memory card into the raspi and wait a minute, then find the IP (I did this via my router, but could potentially use ping and see if it responds, or sudo nmap -sP which is a better solution).

And we have a result!

$ ssh pi@
pi@'s password:
Linux raspberrypi 3.1.9+ #168 PREEMPT Sat Jul 14 18:56:31 BST 2012 armv6l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.

Type 'startx' to launch a graphical session

NOTICE: the software on this Raspberry Pi has not been fully configured. Please run 'sudo raspi-config'

pi@raspberrypi ~ $

Run raspi-config to change/update the timezone and memory split (less needed for the GUI if running headless), and to also update any packages. Then reboot to get those changes to take effect:

sudo reboot

The next thing is to change to the Raspi to a static IP so you can find it any time it restarts or your network connection is dropped. Follow the instructions here. I only altered the interfaces file to

#iface eth0 inet dhcp

Another reboot to make sure that change takes effect (you could just restart the networking but that failed for me last time meaning I had to plug it in to a monitor to work out what had gone wrong…):

sudo reboot

Next, copy over your public key and, as this is fresh install, make .ssh and authorized_keys.

pi@raspberrypi ~ $ mkdir .ssh
pi@raspberrypi ~ $ mv id_rsa.pub .ssh/authorized_keys

Finally, start adding in some packages that make life easier using sudo apt-get: screen, emacs, gfortran etc.

2 replies
  1. Ken Browne
    Ken Browne says:

    Took me two tries but I got raspbian installed headlessly and can login and look around. I may not need to setup the static address you describe, but probably will do so, but first I need to know if I need to add any software in order to plug a 1TB drive to be used for backup into a USB port.

  2. Tristan
    Tristan says:

    Good point on the static address – I don’t use static currently as I install avahi to make the pi reachable on a .local address using the hostname.

    You shouldn’t need to add any software when connecting a drive, as long as it is appropriately formatted…

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published.