How to set up your Raspberry Pi in Linux

Unlike with both Windows and OS X, Linux is the only operating system that can read both of the partitions created by the write process.

The first is formatted with a Windows FAT filesystem and is almost 60MB in size. This is how the USB stick boots the Raspberry Pi, as this partition is read first before passing control on to the second partition. The second takes up the best part of 2GB and contains the root Linux filesystem.

As both of these partitions will be mounted when you next insert the SD card into Ubuntu, you'll be able to take a closer look at the files both partitions contain. The Linux one will be very similar to the desktop version of Ubuntu you might be running, and this is because they're both derived from the same 'parent' distribution, called Debian.

Raspberry Pi Linux

Linux can read Windows, Linux and OS X filesystems without needing to install any further files.

The home folder, for example, contains a user's own folder, where they can store their files and settings. Raspbian is pre-configured with only a single user, called 'pi', although this can be easily changed when you've got the distribution running, and you can see this folder and the files it contains when you click on 'Home'.

When you've finished, unmount the device from the file manager and insert the card into your Raspberry Pi.

Failsafe Install

There's one other method for installing Raspbian on the SD card, and we want to cover it because it's useful as a fallback. But this method does make it easy to accidentally overwrite your data, so we'd only recommend it if nothing else works.

This method involves the command line and the dd command. This takes a raw input and copies it – byte for byte – to another device. Get the destination device wrong, and you'll be overwriting a hard drive with your precious photos on it.

Raspberry Pi Linux

You can cancel the dd command mid-way through by pressing [Ctrl] and [C] together.

To get the device correct, first disconnect your SD card and look for and launch Terminal from Ubuntu. This will open the interface to the famous Linux command line, but it's really not all that difficult.

Now type tail -f /var/log/syslog and insert your SD card. What you're doing is displaying the output logs of the system, and you need to look for a line that looks like sdb: sdb1.

This means the system has detected a new device and given it a node on your file system of sdb (sdb1 is the first partition on sdb). There should be lots of other output as your Linux box attempts to read the filesystem and mount it.

If it is mounted, unmount it from the GUI and then type sudo dd bs=1M if=raspbian.img of=/dev/sdX, replacing both the IMG filename and the /dev/sdX node with those of your specific configuration. The image will now be written to the SD card with not a GUI in sight.