Getting started with Raspberry Pi (#RasPi): Take 2

Raspberry Pi is a trademark of the Raspberry Pi FoundationA couple of months ago, I wrote about getting started with Raspberry Pi but I have to admit it wasn’t exactly successful. In true open source style the Raspberry Pi FAQ (since updated) contradicted the downloads page/quickstart guide and an official blog post suggested that Fedora was the recommended distro.  I had some issues with Fedora, not least that a graphical login seemed to fail (there’s a forum post that suggests why that might be a problem) but also with getting hold of Scratch (which is something I want to use the Pi for, with my sons).

Last night I tried again, reflashing my Pi’s SD card using the Debian 6 “Squeeze” distro from the Raspberry Pi downloads page. There are various tools to do this (I used Win32DiskImager, also recommended on the downloads page, although the Softpedia download site is UX disaster, but Linux and Mac users already have dd and there is a Windows port of dd that Element 14 are distributing).

With the SD card flashed, I booted the system, logged in (username pi, password raspberry) and set about resizing the 2GB image to fill my 8GB SD card.  There’s good advice for resizing flash partitions on the Embedded Linux Wiki and the steps I took were:

  1. Edit the partition table:
    sudo fdisk -cu /dev/mmcblk0
    p (to view the partition table)
    d (to delete a partition)
    3 (to select partition 3)
    d (to delete a partition)
    3 (to select partition 2)
    n (to create a new partition)
    p (to make it a primary partition)
    2 (to create partition 2)
    157696 (to set the starting position to match the old partition table – see the output from the p command earlier)
    Press the Enter key (to set the maximum available partition size)
    w (to write the partition table)
  2. Then, reboot:
    sudo shutdown -r now
  3. After logging in again, resize the partition:
    sudo resize2fs /dev/mmcblk0p2
  4. Finally, check the new size:
    df -h

With a working system, I launched the LXDE graphical user interface with startx. and found that there is a decent amount of software (including Scratch, Python, etc.) already installed. It’s also possible to access the Raspberry Pi remotely and run the GUI on another system with X Windows/SSH.

Back in the command line, I wanted to install a twitter client (so that my Pi can tweet status updates) and Twidge is my favourite (CLI-based) client on a Linux system.  Romilly Cocking has written about installing Twidge on the Pi (Tweety Pi!) but I found I needed to run sudo apt-get update before I could successfully complete the sudo apt-get twidge command (without the update, there were lots of 404 errors for missing dependencies). As I was running Terminal inside the LXDE environment, I could use Midori to authorise Twidge via the Twitter API, completing the twidge setup process, before sending a couple of tweets.  If you don’t like Midori, I couldn’t find a suitable version of Firefox but I understand Google Chromium can be installed on the RasPi using the sudo apt-get install chromium-browser command).

I’m much happier with the Pi now it’s running Debian – and tonight’s activity involves creating a case for it out of an old business card box (an Altoids tin won’t fit!) – watch this space for more details!

3 thoughts on “Getting started with Raspberry Pi (#RasPi): Take 2

Leave a Reply