How To: Boot Multiple Operating Systems on the Raspberry Pi with BerryBoot

Boot Multiple Operating Systems on the Raspberry Pi with BerryBoot

The Raspberry Pi loads an operating system from whatever SD card you insert, allowing you to keep different operating systems on separate SD cards depending on which OS you wish to run. A tool called BerryBoot cuts down on the number of SD cards needed by providing the ability to boot multiple operating systems from a single SD card, similar to Boot Camp for Mac computers.

With BerryBoot, a single 32 GB SD card can hold multiple penetration testing tools and distros. Even handier, BerryBoot can configure the Pi to use an external hard drive or USB thumb drive as the source to boot from, meaning any hacker can burn a custom bootable USB stick with multiple operating systems ready to boot.

Loading Raspbian, Parrot OS, or Kali is as simple as selecting which to boot each time you start your Pi. Being able to switch from Kali Linux to Parrot OS with a simple reboot is awesome, and today we'll go over how to use and install BerryBoot.

Why Use Different Operating Systems

There are many reasons why a hacker may want to pick from a variety of operating systems when planning an action. Different operating systems come with different community support and tools, and traditionally, a virtual machine is used to test or use different operating systems.

The Raspberry Pi can support a broad number of operating systems besides Raspbian, including Kali Linux, BlackArch Linux, Parrot OS, and other pen-testing distros.

All these cards can be condensed to one large storage drive. Image by SADMIN/Null Byte

Boot from a USB Flash Drive Instead of the SD Card

Thanks to an open-source project to develop BerryBoot images, there is now a growing collection of security auditing images for the Pi that can be added to a USB stick. Today, we will go over how to set up BerryBoot on an SD card, but I'll provide a follow-up tutorial on how to do so with a USB stick preloaded with a custom Null Byte image of offensive security distros and deliberately vulnerable test images.

Many different operating systems all on a single USB flash drive. Image by SADMIN/Null Byte

What You'll Need

If you like hacking kits that make life easier, you can also purchase most of these things together from CanaKit.

Step 1: Download BerryBoot & Prepare SD Card

Thanks to BerryTerminal, you can download the following BerryBoot files at the links below.

Download the ZIP file, and insert the SD card you intend to use into your computer using an SD card adapter. You'll need to format it to FAT32. You can do this with Disk Utility on a Mac. Select the inserted SD card, hit "Erase," and for the file format, select "MS-DOS FAT," and click "Erase" again.

On Windows, you can format an external hard drive to FAT 32 by using DOS. Press Win+R, type cmd in the search box. It will display you the command prompt. Input the syntax format /FS:FAT32 F: at the prompt if F is the drive letter of your external hard drive. Hit enter and the task will run.

Once the process is complete, unzip the BerryBoot ZIP you downloaded and move the contents of the folder you extracted to the newly erased SD card. Eject the SD card and put it into your Pi.

These initial files will boot the Pi for the first time and set configuration settings on the first run. Once the first run is complete, you will have the option of downloading different OS images from a wired or wireless internet connection.

Step 2: BerryBoot First Run

On your first run, you will see a rainbow for a few seconds. Don't panic! After hanging for a moment, BerryBoot will start up and ask some basic configuration questions about your system. Once these variables are set, BerryBoot will start.

After the configuration has been set, you'll be able to select which drive you'd like to install the operating system to. For now, select the SD card, as whatever device you choose to boot from will need to be plugged in each time you boot the Pi for it to work. Once you select the SD card, leave the default setting of ext4 and click "Format."

Step 3: Booting Your Installed Operating System

Now you're ready to select the operating systems you want to load. For now, select "Kali Lite" and make sure you're connected to the internet. The "connection" bar at the bottom will show you what network you're connected to. Click "OK" to begin downloading the selected OS.

The download can take a long time on a slow connection. Once it's finished, you should see Kali Lite in your list of installed operating systems. Exit to close the configuration window and use the OS you just downloaded.

Step 4: Boot Your Installed OS

After initially booting to BerryBoot, Kali Linux will be auto-selected as the OS to boot. Once a quick timeout completes, you'll boot into Kali Linux on your Pi! The default credentials for logging in are root and toor, as always.

You can now download other operating systems onto your BerryBoot SD card to easily swap between systems when needed. Stay tuned for custom BerryBoot images and a tutorial on installing to a USB thumb drive. You can ask me questions here or @sadmin2001 on Twitter or Instagram.

Just updated your iPhone to iOS 18? You'll find a ton of hot new features for some of your most-used Apple apps. Dive in and see for yourself:

Cover photo and screenshots by SADMIN/Null Byte

5 Comments

How long is exactly the rainbow? 1 minute, or more?

About 15 seconds the most...

I would like to put an OS on berry boot, however it is over 4Gb. I can't put it on my FAT32 USB drive because the size is too big, but berry boot won't recognize any NTFS drives. How should I get the OS on Berry Boot?

who wants to update should reach source.list
also to install it wants update

1.open the terminal

  1. edit /etc/apt/source.list
  1. $ nano /etc/apt/source.list
  1. delete the content of source.list and add deb http.kali.org/kali good-rolling main non-free contrib
  1. $ apt-key adv --keyserver hkp://keys.gnupg.net --recv-keys 7D8D0BF6

IF YOU HAVE ANOTHER PROBLEM
you may need to do this several times

$ dpkg --configure -a

$ apt install -f

good luck.

i want kali official not lite;is there any option?for raspberry pi 4

Share Your Thoughts

  • Hot
  • Latest