Headless Raspberry Pi

tech

I recently had to install pidora on my Raspberry Pi in headless mode over ssh, I couldn’t find it documented anywhere so here is what I had to do. These instructions were carried out on a Fedora 18 laptop on the same local network as the Pi.

The main problem with running in headless mode is that you can’t navigate through the firstboot application, and can’t resize the file system. If running with a keyboard and monitor attached you wouldn’t need to follow the process below.

1. Download the image from http://pidora.ca/
2. insert your sd card and find its device name, I usually do this by tailing /var/log/messages when I insert the card
3. after checking for family photos on the card, unzip and write the image to the sdcard, Note: the device name of your sd card may differ from mine

$ unzip pidora-18-r1c.zip
Archive: pidora-18-r1c.zip
inflating: pidora-18-r1c.img
extracting: pidora-18-r1c.img.md5sum
$ sudo dd if=pidora-18-r1c.img of=/dev/mmcblk0
3494306+0 records in
3494306+0 records out
1789084672 bytes (1.8 GB) copied, 1025.63 s, 1.7 MB/s

4. put the sd card into the Pi, connect it to the network and power it up.

5. Find the ipaddress of the Pi, there are a number of ways todo this, I just checked the dhcp leases on my local dhcp server

6. After waiting a minute or 2 ssh to the Pi with the username “root” and password “raspberrypi”, (the -X is important, we’ll need it in a minute)

$ ssh root@192.168.1.112 -X

7. You should see that firstboot has started, run ps to find its PID’s and kill it, we’ll need to run it again in the next step…

[root@raspi ~]# ps -ef | grep -i firstboot
root 134 1 10 14:47 ? 00:00:12 python /usr/sbin/firstboot
root 233 134 1 14:47 ? 00:00:01 python /usr/sbin/firstboot
root 667 645 0 14:49 pts/0 00:00:00 grep –color=auto -i firstboot
[root@raspi ~]# kill 134 233

8. Now we can start it again, because we passed in -X to our ssh client, firstboot should be tunnelled over ssh to the local X server, if you don’t have a local X server running your going to have to start one (e.g. on windows maybe cygwin does this ?)

[root@raspi ~]# firstboot

run through the dialogue, after a reboot your done, You now have Fedora 18 running on your Raspberry Pi.

EDIT : I just stumbled across alternate instructions

Please follow and like us: