How to Setup Multiple Linux Distros on Raspberry Pi

One of the attractive things about the Raspberry Pi (besides its price and capabilities) is that it can run several different flavors of Linux and even other non-Linux based operating systems like RISC OS. Each of these operating systems has their own SD card image file available. To experiment with the different OSes, this means you either need to have lots of SD cards or you need to overwrite your current SD card every time you want to learn more about a different distribution. Although possible, that isn’t much fun! Thankfully the NOOBS (New Out Of Box Software) project allows users to install multiple Linux distros on Raspberry Pi (in a single SD card) and at boot time select which OS to use.

Using NOOBS is quite straight forward. In essence, you need to copy all the files from within the NOOBS compressed archive file onto a SD card that has been formatted as FAT32. Then insert the SD card into your Pi and boot. You can find a full step by step guide with screenshots in our Beginner’s Guide.

Once your Pi is booted into NOOBS, you can select which OS you would like to install. The recommended OS is Raspbian, a Pi optimized version of Debian, however there are several other interesting choices:

  • ArchLinux – a lightweight and flexible Linux distribution that boots to the command line.
  • Pidora – Fedora optimized for Pi.
  • OpenELEC – the Open Embedded Linux Entertainment Center turns your Pi into an XBMC media center.
  • RaspBMC – another minimal Linux distribution that brings XBMC to your Raspberry Pi.
  • RiscOS – an OS developed in Cambridge, England by Acorn back in the late 80′s.

raspberry-pi-select-distro
You also have the option to add a data partition which can be used to store your data for access from all the different distros.

To install multiple distros, select each desired version using the checkboxes down the left hand side of the list. Keep an eye on the Disk space information at the bottom. With an 8GB card, you can likely install 3 distros along with a data partition. If you have a 16GB card, you can install all of them!

Click the Install icon once you have picked all the operating systems you want to install.┬áIt is important to know that the installation process will delete all the current data on the SD card including currently installed operating systems. Make sure you aren’t overwriting any important data.

Subsequent reboots will display a boot menu where you can select which OS you want to boot on your Pi. If you don’t select an OS, then the last booted OS will be used after a short delay.

raspberry-pi-noobs-boot-menu

The SD card has been divided up with each OS receiving a slice of the available space. The NOOBS recovery partition remains intact and you can boot into recovery mode at any time, by pressing “SHIFT” during boot, to reinstall your operating system mix. If you picked the Data Partition option, then there will also be a 512MB partition just for your data.

raspberry-pi-noobs-partitions

An easy way to mount the partition data on Raspbian is to create a local directory called mydata and then mount the data partition using:

sudo mount /dev/disk/by-label/data mydata

By using the label (i.e. data) to mount the partition, it doesn’t matter which partition number has been assigned by NOOBS for the data, it will be mounted because of the label assigned to it, which always stays the same.

With a big enough SD card, it is possible to install multiple operating systems on your Raspberry Pi and switch between them as you desire. If you finally settle on a preferred OS, you can reboot in recovery mode and install just that OS and so free up some disk space. However, note that this process will overwrite everything, including the data partition.

Now, which is your favorite distro for the Raspberry Pi?