Basic setup of Raspberry Pi image

Starting the Peggy project requires the use of Linux on a Raspberry Pi. The Raspberry Pi i runs a modified version of Debian Linux called Raspbian. This allows us to run all Debian functionality as normal. Assuming you already have an Raspberry pi image of Raspbian installed (if you don’t please click here)

Setting up the drive

First, the image that was provided needs to be resized to allow for code and packages to be downloaded. This can be done with the following commands:

Non-raspbian distro

sudo fdisk /dev/mmcblk0

Delete the second partition (d, 2), then re-create it using the defaults (n, p, 2, enter, enter), then write and exit (w). Reboot the system, then:

sudo resize2fs /dev/mmcblk0p2

Using Raspbian

To do the same thing in Raspbian perform the following


Select expand file system. While you’re this menu you should also enable ssh.
IMPORTANT: when enabling ssh you need to change the root password. After this perform a reboot.

Setting up wifi

If the distro provided has no ability to connect to a WPA2 wireless network you need to setup WPA supplicant package. This package provides the wpa_supplicant command. To install it, if necessary, run

sudo apt-get install WPA supplicant

You put your SSID and password into:

nano /etc/wpa_supplicant.conf



Assuming your interface is wlan0 you can connect with:

sudo wpa_supplicant -B -iwlan0 -c/etc/wpa_supplicant.conf -Dwext
sudo dhclient wlan0

The system should then be rebooted and WPA connection will be established.


Leave a Reply

Your email address will not be published. Required fields are marked *