16 July 2020

3 Ways to Boot Multiple OSes on a Raspberry Pi


sd-card-os-raspberry

The Raspberry Pi is usually set up with a single operating system that boots from the SD card. However, this can prove restrictive to some users. For example, you might want to install multiple versions of the Raspberry Pi OS for different projects. Or you might want to multiboot your Raspberry Pi 4 with Kodi, RetroPie, and Ubuntu MATE.

Different options are available for multibooting a Raspberry Pi, depending on your model and preferred storage media. Here’s how to install multiple Raspberry Pi OSs for dual boot and multiboot use.

Why You Need Multiple OSs on the Raspberry Pi

The Raspberry Pi has so many strengths. It’s flexible, as suitable as a desktop computer as a development environment for kids. Its versatility and portability surpass the competition thanks to an imaginative community and support from the Raspberry Pi Foundation.

But the Raspberry Pi does have one key shortcoming. Booting the operating system from the SD card means that the Pi is locked to a certain configuration. This can prove problematic if you’re working on, say, a camera project and want to switch to a Bluetooth speaker.

Usually, you have two options here:

  1. Back up the OS, reformat the SD card, and write a fresh new version,
  2. Buy a new SD card and keep a record of what is on which SD card

However, a third option, usually overlooked, is available: installing multiple operating systems on your Pi. Let’s look at how that works.

SD Card, USB Storage, or Network Multiboot?

In the early days of the Raspberry Pi, there was only one choice for operating system boot media: SD card.

As the platform has progressed, however, so more options have been added. Since the release of the Raspberry Pi 3, it has been possible to program the board to boot from USB.

This has resulted in USB flash drives, USB hard disk drives (HDDs), and USB solid-state drives (SSDs) replacing SD cards. In the case of USB flash drives, these are low power devices suited to the Raspberry Pi. Most USB HDDs and SSDs, however, require independent power supplies, albeit with some exceptions.

For example, Western Digital’s Labs team (WD Labs) released a (now discontinued) range of “PiDrive” HDDs that shared the Raspberry Pi’s power connection.

The Raspberry Pi 3 also introduced network booting to the platform. Using PXE (Pre eXecution Environment), the Pi 3 and later models can be booted from server-hosted images.

1. Multiple Pi Operating Systems With NOOBS

Raspberry Pi NOOBS software

NOOBS can be used to simply install multiple OSs on your Raspberry Pi SD card.

You have a choice of two NOOBS versions. One is an online installer that downloads the operating systems you choose. The other is an offline installer with all the operating systems pre-loaded for you to select from. Use the version that suits your internet connection.

To install a Raspberry Pi operating system with NOOBS:

  1. Download the installer
  2. Unzip the contents
  3. Copy them to your formatted SD card
  4. Insert the card in your Raspberry Pi
  5. Boot the Pi
  6. Navigate the NOOBS menu

In the menu, select one or more operating systems to be installed. Several operating systems are available, from the Raspberry Pi OS to media center options like OpenElec.

When you’re done, each time you boot the Pi you can choose which OS you want to run.

NOOBS can be used with any model of Raspberry Pi.

2. Multiboot Your Raspberry Pi With BerryBoot

Use BerryBoot to run multiple Raspberry Pi operating systems

Before NOOBS there was BerryBoot. It’s a bootloader, rather than an installer. This slight difference means that it is optimized to run multiple operating systems.

Like NOOBS, BerryBoot requires you to download a file, unzip, and copy the contents to a formatted SD card. Unlike NOOBS, however, BerryBoot has no offline installer. You’ll need to ensure your Raspberry Pi is online to download your chosen operating systems.

BerryBoot supports installation to SD card, USB devices, and even network drives. To install multiple Raspberry Pi operating systems with BerryBoot:

  1. Download BerryBoot
  2. Extract ZIP file to a formatted SD card
  3. Insert the card in your Raspberry Pi
  4. Power up the Raspberry Pi
  5. Select and install one or more operating systems
  6. Choose which OS you wish to use each time you boot your Raspberry Pi

Our full guide to multibooting a Raspberry Pi with BerryBoot outlines these steps in greater detail.

Like NOOBS, BerryBoot will run on any version of the Raspberry Pi board.

3. Network Boot Multiple Raspberry Pi Operating Systems With PiServer

Finally, there is the network booting option. This comes built into the Raspberry Pi OS desktop but requires that all devices connect over Ethernet. Wi-Fi is not supported.

However, it is ideal if regular replacement of your Pi’s SD card has become an issue. With network booting, the SD card isn’t required—the Pi boots from a disk image stored on a network drive. The Raspberry Pi website provides a detailed explanation on how to set up PXE booting with PiServer.

Using this method, you could maintain multiple Raspberry Pi OS environments, one for development, another for desktop productivity. Simply reboot the Raspberry Pi to select a different OS. The server will back up the operating system, too, meaning you won’t be prone to corrupt SD cards.

This option is most suitable for Raspberry Pi 3 and later.

Multiboot: The Future of Raspberry Pi Computing!

The days of having to repeatedly reformat your Raspberry Pi’s SD card to start a new project are now over. All you need is a multiple boot tool! Once you’re done, you’ll have every Raspberry Pi OS you need, restricted only by the size of your storage device.

While NOOBS and BerryBoot make good use of your physical storage, the PiServer option is potentially the biggest game changer. Having said that, NOOBS is certainly the simplest Raspberry Pi multiboot installer.

Now you just need to choose which Raspberry Pi operating systems to install.

Read the full article: 3 Ways to Boot Multiple OSes on a Raspberry Pi


No comments:

Post a Comment