Multiple operating systems on a single memory card

Versatility

© Lead Image © lightwise, 123RF.com

© Lead Image © lightwise, 123RF.com

Article from Issue 229/2019
Author(s):

BerryBoot turns your Raspberry Pi into a multiboot system, with several operating systems on a single card.

The Raspberry Pi is suitable for a wide variety of application scenarios; accordingly, a wide variety of operating systems are available for installation. Whether you want to use the small computer as a media center, a gaming console, or a solid all-rounder, you will find the right system for every application.

However, the most common operating systems are each installed on their own SD memory card; if you want to boot another system, you have to change the card. You can use your Rasp Pi in a far more elegant way with the BerryBoot [1] boot manager. BerryBoot allows the installation of multiple operating systems on a single SD memory card and supports a convenient selection dialog from a beautifully designed bootloader.

In the Cards

In contrast to conventional images with one operating system that is then copied to a memory card, you can download a BerryBoot ZIP archive with a minimal system from the project's website. Two different archives are available for download: The larger archive (~60MB) is suitable for all Rasp Pi models; the smaller archive (~40MB) is intended exclusively for models from the Rasp Pi 2 (RPi2) upward [2]. After downloading, unpack the archive directly on a memory card that has been formatted with the VFAT filesystem. Next, insert the memory card into your Rasp Pi and power it up. BerryBoot will now take you to a graphical configuration dialog.

The first window (Figure 1) prompts for the video settings, network connection, and system locale. The RPi2 provides immediate wired access to the Internet; the RPi3 requires you to press a radio button to the left of the matching option if you want to connect over WiFi. The locale is then largely adapted automatically. You might need to change your keyboard layout from a drop-down list.

Figure 1: The installation dialog prompts for a few options.

In the second dialog, you need to provide authentication data if you want to access the Internet over WiFi. The third dialog is about preparing the storage medium. Here, you can select whether the Rasp Pi's internal microSD memory card or a connected external storage medium, such as a network-attached storage (NAS) system or a USB memory stick, will be used as the target medium for the operating systems. The default setting is the internal memory card, because an external drive is not always connected to a Rasp Pi system. In this dialog, you also choose the filesystem for the target medium, and you can also enable encryption by checking a box. The target medium is then formatted.

In the fourth and last dialog, select the desired operating system from among the selection lists presented as horizontal tabs at the top of the window (Figure 2). The default list includes Raspbian, the OpenELEC media center, Ubuntu desktop with the MATE desktop environment, Ubuntu server, and the BBMC media center by BerryBoot. A thin client is available from BerryBoot, as well, that is intended for connecting to an Ubuntu server. This thin client, known as BerryTerminal, is explicitly intended for use in learning environments in schools.

Figure 2: Operating systems that can be installed are presented in tabs.

Selecting the operating system causes it to be downloaded from the web and installed on the target medium. The system then prompts you to reboot.

First Start

After a reboot, the BerryBoot boot manager appears in an attractively designed GUI. The installed operating system is then activated with a preset wait time of 10 seconds. Because only one operating system can be selected during installation, you now have the option of adding more systems to your drive. To do this, press the Edit menu button in the selection window and then click Add OS in the upper left corner of the horizontal buttonbar in the now open BerryBoot menu window. The routine establishes access to the Internet and opens the selection window for the operating systems chosen for installation.

If you set up your Rasp Pi to access the Internet over WiFi during the initial installation on the SD card, you might need to re-establish the connection in some cases after extending the boot menu. After a reboot, BerryBoot only wants to use wired Internet access – if this is not available, it displays a small dialog in the middle of the start window, telling you that you do not have an Internet connection. After clicking in this window and selecting the desired WiFi connection, you enable wireless access.

As soon as you see the selection window for the other operating systems, you can select another Linux derivative for installation. After pressing the OK button at the bottom, your chosen system is installed on the SD card. Bottom left in the settings window, the routine also shows how much free storage space is left on the memory card. While downloading the new system, a progress bar is displayed in a separate pop-up window. After completing the installation, the new operating system appears in the menu editor (Figure 3).

Figure 3: The menu editor lets you configure the system with a few mouse clicks.

Restart the system by clicking the Exit icon in the buttonbar. In the boot menu that appears, the newly installed operating system is listed, and you can call it in the usual way in GRUB. In the case of the Ubuntu desktop system, the basic installation is then performed by setting the locale and creating a user account. In our lab, we discovered that the RPi3's WiFi hardware is not supported, so you should configure wired Internet access for the system on Ubuntu 16.04 LTS. Another drawback was the alpha version of Puppy Linux, for which the X server failed to launch, and the screen remained black.

Once you have installed several operating systems on the memory card, you can also select the one to be booted by default each time the Rasp Pi is powered on. Simply click on the desired system in the configuration window and then press the Set default button. An asterisk is now displayed to the left of this operating system, which is automatically booted after 10 seconds the next time you power on the computer.

Backup

You can save the BerryBoot configuration and the contents of the SD memory card in various ways in the configuration window. Pressing the Backup icon opens a window with extensive backup and restore options. To back up content, you can use the radio button to specify whether you want to duplicate the memory card or back up individual images; you can save only an original image downloaded off the web, or configured images and their associated data. You can save this content on a USB memory stick.

The dialog also lets you exclude individual files from the backup and compress the data. You can specify the files to be excluded individually in an input area. In the same window, you can also completely duplicate (clone) the memory card, but in this case, an external SD memory card reader equipped with a similar SD card must be connected to the Rasp Pi. The window also allows you to reconstruct an image from an external USB memory stick, whether it is an original image off the web or one you have already configured. Additionally, you can use the More options | Clone dialog to create an identical full backup of your BerryBoot memory card; the routine also supports cloning from the original image or an individually configured image.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • BerryLan

    BerryLan installs a system on a Raspberry Pi that can be integrated into the wireless network with a smartphone app over Bluetooth.

  • DIY Boombox

    A HiFiBerry HAT, the matching system, and a Raspberry Pi combine with two old speakers to create a contemporary boombox.

  • Rasp Pi Symfonisk

    Build open software, open hardware smart WiFi speakers for the home with the Sonos and Ikea Symfonisk.

  • Raspberry Pi Model B+

    The brand new Raspberry Pi Model  B+ is solid and tidy, with many clever improvements in detail that make this the best version so far. The desired improvement in performance will have to wait for now.

  • Raspberry Pi

    The sudden popularity of miniboard systems like Raspberry Pi have brought back the pioneering spirit of Linux’s early days. Suddenly, “do it yourself” in the open source community is back.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News