homeassistant
- https://home-assistant-guide.com/2020/10/30/how-to-boot-home-assistant-on-a-raspberry-pi-4-of-an-ssd/
- https://community.home-assistant.io/t/installing-home-assistant-on-a-rpi-4b-with-ssd-boot/230948
- https://jamesachambers.com/new-raspberry-pi-4-bootloader-usb-network-boot-guide/
Powered USB Hub + External Hard Drive or SSD
https://www.addictedtotech.net/best-powered-usb-hub-for-raspberry-pi-4-in-2021/
USB 3.0 – Server Compatible – (Back power issue fixed confirmed). (Reboot cycles complete successfully).
THE USB HUB BACK POWER PROBLEM WITH 3.0 USB HUBS ON THE RASPBERRY PI 4:
There is an issue with many of the cheaper USB Hubs on the market where the USB Hub back powers the Raspberry Pi 4.
This causes the Raspberry Pi to get stuck on reboot. The only way to get it to successfully start up again is to manually remove the hub from the USB 3.0 port. Let it start to boot then quickly put the USB cable back in the same port. This will allow the Raspberry Pi 4 to successfully start the boot process.
This can be a major problem if you use your Raspberry Pi 4 as a server which requires automatic rebooting for docker containers and services.
Fortunately there is a solution and it all depends on the quality of the USB hub.
We have included a section above which lists USB Hubs that fix the back power problem and are compatible for server use.
You will need to purchase both the below items unless you already own a compatible 1000mA + Micro USB power supply.
- https://www.amazon.com/gp/product/B00LLUEJFU/ref=crt_ewc_title_dp_2?ie=UTF8&psc=1&smid=AKXVBT49GGF3B
- https://www.amazon.com/gp/product/B00OQ0CYFE/ref=crt_ewc_img_dp_3?ie=UTF8&psc=1&smid=AKXVBT49GGF3B
- – more power
Since Pi can’t benefit from USB 3.0, better off to use one of the Plugable USB 2.0 7 or 4 port hubs like USB2-HUB-AG7 to both power the Pi and attached USB devices.
First, decide what you’ll be using for external storage. I picked a 1 terabyte USB hard drive from Seagate, because I had it laying around as a spare backup drive. You can probably find the equivalent on Amazon for $60-70.
The Raspberry Pi doesn’t have enough power to run most external hard drives or SSDs, so unless you have a drive with its own power supply, you’ll probably need a powered USB hub.
I picked up a j5create JUH340 4-port hub a while ago at a nearby Best Buy for about $25, and so far haven’t had any problems with it. Adafruit offers a USB 2.0 powered hub which has been tested with the Pi and should work well. You’ll want to make sure you get something that supports USB 2.0.
USB Thumb Drive
It won’t offer all the benefits of a “real” drive, but if you’ve got a decent-sized USB thumb drive available, you can use it instead. This probably won’t require a powered hub.
An SD Card for the Boot Partition
Unfortunately, no matter what you do, the Pi has to boot off an SD (microSD, in the case of the B+/Pi 2) card. Assuming you already have a Pi up and running, your existing card should work just fine, but you might want to use a spare just in case.
The card should have a standard Raspbian install already present. I started with Adafruit’s 4GB SD card with a pre-installed Raspbian image, but you should be able to use just about any card with an existing install.
If needed, you can follow our guide on preparing an SD card for the Pi.
You can certainly set up the SD card and external drive from another machine, but we’ll do everything here from the command line on the Pi. You shouldn’t need another computer as long as your Pi already boots into
How To Partition And Format The Hard Drives On Raspberry Pi?
New Raspberry Pis are shipped with powerful computing and faster USB 3.0 ports. It is possible to connect the large size USB storage drives and share them over the network to create your own file server or NAS. Well, all these are good to know. As thriving technology over time, it gives plenty of storage drive options and several supported formats. In this article, we are going to cover how to partition and format the hard drive on raspberry pi.
Filesystem Types:
There are more than 100 types of file systems that have developed over the years. We have selected only two main types of file systems. NTFS and EXT4. It is much needed to know as these are very close to the universe.
- NTFS: This file system is developed by Microsoft in the early 90s. All new versions of Windows operating systems will support this file system. Theoretically, NTFS can support hard drives up to just under 16 EB. The individual file size is capped at just under 256 TB, at least in Windows 8 and Windows 10, as well as in some newer Windows Server versions. When it comes to supporting, this file system is universally supported. Although it’s developed by Microsoft, it is supported by most of the Linux distributions and Mac.
- EXT4: This file system is developed based on the older Minix filesystem, A file system being used by Linux systems for ages. The higher maximum volume size it supports is 1 EB. That’s again a mathematical number. I know, all these numbers don’t bother you as like many of us. after all, who is going to use such a gigantic drive at home with Raspberry Pi!
Which File System Is Better To Use?
Now you have got some idea on the most popular file systems. The real question is which formats is better for you? The verdict is quite straight here. If you want to connect the storage drive between your Pi and Windows system quite frequently, then you might consider NTFS as your first choice. Because it is supported by most of the windows and non-windows platforms. On the other hand, if you want to stick your drive only with Raspberry Pi, EXT4 would be a better option for you. As it goes well with the Linux system. After all, Raspberry Pi is a custom variant of Debian Linux. We hope, this feels you much better in selecting the file system for your file server. Gather up your drive and let’s get started.
Partitioning And Formatting The Hard Drive On Raspberry Pi:
When you connect a fresh drive that you picked up from the factory. Even though, it has nothing on it. It is going to be mounted under /media/pi by default. Again if we remount the drive it will be mounted again under the same path. This nature is just fine for removable drives. The convention is to mount the drive under /mnt. Let’s see how does this work. Note: This is just a demonstration, you may get different results when you try this on your PI and drives, it all depends on the version of hardware and software used.
Time needed: 20 minutes.
Partitioning and Formatting the Hard Drive on Raspberry Pi
- Unmount the drive:
Unmount the drive from it’s current location by hitting eject button.
- List out the connected drives:
Open the terminal and write ‘parted’ command to see what drives are connected and how they are partitioned.
$ sudo parted - Use ‘print all’ to read the drive information:
Type ‘print all’ to see all the drives and their partition Information. If you see the information inside the red box, there are two drives mounted. 120 GB Hard Drive is mounted under /dev/sda with NTFS file system with a single partition. And, you should see there is an SD card of size 8 GB mounted under /dev/mmcblk0 with two partitions. The first one is the 256 MB boot partition with the FAT32 file system and the second one is the root EXT4 partition.
(parted) print all
- Select the drive to partition:
Select the drive to format and to create new partitions. Type ‘select’ command with the drive path.
(parted) select /dev/sda
- Create a fresh GPT partition table:
Create a fresh GPT partition table by typing ‘mklabel gpt’ command. You will get a warning to wipe out all your drive. Type ‘yes’ to continue. Please bear in mind, it’s just a partition table, not the partitions.
(parted) mklabel gpt
- Type ‘print’ to make sure the new GPT partition is created.
- Create new partitions:
For demonstration purpose, we are going to create three partitions on this drive using ‘mkpart’ command: os, data-ntfs, and data-ext4. Later we will show you how to install the Raspberry Pi OS on the hard drive and boot from USB.
Type ‘mkpart’ command to create a new partition. It asks four simple questions to create a partition. Your partition will be created upon supplying the answers. Just pay attention to the commands we used to create three partitions. You can create partitions in a single line command as well as we show in the below screenshot.
(parted) mkpart data-ntfs ntfs 8gb 50%
- Exit from parted:
All right, everything looks fine. Type ‘q’ to exit from the parted. You can ignore the fstab at this point in time. We will look at this in later sessions.
- Format the partitions:
You can’t use the partitions until you format them. Let’s use mkfs commands to format the partitions. Different versions of mkfs commends are there to format NTFS and EXT4 file systems. In this command -L specifies the label of the drive and -Q specifies quick format which takes partition name as a parameter. Note: EXT4 doesn’t take -Q as it doesn’t support the quick format.
$ sudo mkfs.ntfs -L data-ntfs -Q /dev/sda2
$ sudo mkfs.ext4 -L data-ext4 /dev/sda3 - Reboot the Raspberry Pi:
Sometimes, GUI desktop doesn’t pick this partition information. We recommand to reboot the Pi once.
After reboot you would see the partitions on your GUI desktop. But, these drives are mounted under /mdia/pi. - Remount these partitions under /mnt:
To remount these partitions under /mnt.
At first, Unmount the partitions by clicking on their eject button. Refer the first section to see how to unmount the drive.
Open the terminal and change the directory to /mnt.
$ cd /mntCreate two directory named ‘data-ntfs’ and ‘datta-ext4’ under /mnt.
$ sudo mkdir data-ntfs
$ sudo mkdir data-ext4Mount the partitions using the mount command. Note: This is just a temp mount. It is not going to work after reboot.
$ sudo mount /dev/sda2 /mnt/data-ntfs
$ sudo mount /dev/sda3 /mnt/data-ext4Do you remember the fstab? It’s a file system table. This is where you can mount a partition forever. Open the /etc/fstab file and see how it looks. You can only see the SD card at this time.
$ cat /etc/fstab - Take PARTUUID value of the two partitions:
You need to add those two partition to /etc/fstab to mount permanently. Before that, make a note of PARTUUID value of the two partitions.
- Create permanent mount:
Use your choice of text editor to edit and add the partition information in the /etc/fstab. You can add the two lines representing each line for a partition. Write this information separated by TAB.
PARTUUID=VALUE
Mount path
File System
default or default, notime: The word ‘notime’ just tells to keep track of the access time along with created and modified time.
0
0 - Reboot the Raspberry Pi
Reboot to save all the changes and mount the partitions for forever. This is how you can partition and format the hard drives on Raspberry Pi
Once the drive is ready to use on the Pi, you can use it locally as extended storage or share it over the network to feel the effect of a personal file server or a NAS. We have shown how to set up a NAS on the Raspberry Pi on a different blog post. Please read the post and leave your comments there.
https://raspberrytips.com/gparted-on-raspberry-pi/
How To Install & Use Gparted On Raspberry Pi (Partition editor)
Written by Patrick Fromagetin How-To Tutorials
Raspberry Pi OS is installed with two default partitions: /boot which uses about 256 MB, and everything else is available for the system installation (/). But you can change that after the installation, which is particularly useful if you use a big disk like an SSD or a giant SD card/USB drive. I will answer all of your disk partitioning questions in this article.
Gparted is a free, graphic partition manager that is often used on Linux systems. It can be installed on Raspberry Pi via the package manager, and used to reformat the SD card as needed.
I will start with a brief introduction about disk partitioning for those who need a quick reminder, and then I’ll show you how to install and use Gparted. I’ll also answer a few questions you might have, such as, how to do the same thing without a Desktop environment.
If you are looking to quickly progress on Raspberry Pi, you can check out my e-book here. It’s a 30-day challenge, where you learn one new thing every day until you become a Raspberry Pi expert. The first third of the book teaches you the basics, but the following chapters include projects you can try on your own.
Disk, partitions and file system: a short recap
Download the Pi Glossary!
If you are lost in all these new words and abbreviations, request my free Raspberry Pi glossary here (PDF format)!
DOWNLOAD IT NOW
If you are an expert, you can probably skip this part. I just want to make sure everybody is up to speed with the words I will use later, and how it applies to the Raspberry Pi.
Vocabulary
All of the data from your computer (or Raspberry Pi) is stored on a disk. On Raspberry Pi, it’s generally an SD card, but you can also use USB drives (USB keys, external drives, etc.) or SATA drives with an extension (like this one on Amazon).
A disk can be split in several partitions, which is a logical division of the entire disk. Partitions are often seen as different disks by the end user. For example, on this screenshot, I have one partition (D:) using a tiny part of the entire disk. But as the rest is unallocated, the end user will only see D: in the file explorer.
Each partition can use a different file system. A file system is like a set of rules to store files on the partition. File systems can differ depending on the operating system you use. So, if you plan to read files on different systems, you need to choose a file system that is compatible with all of them. I’ll clarify this later.
The default setup on Raspberry Pi
Raspberry Pi Bootcamp
Sale: 10% off today.
Take it to the next level.
I’m here to help you get started on Raspberry Pi.
Learn all the skills you need in the correct order.
When you install Raspberry Pi OS on a SD card or USB drive, it will create two partitions for you:
- /boot: Contains the file required to start the operating system, like the Raspberry Pi firmware and the configuration file (config.txt). In my case, this was a 256 MB partition, using only about 50 MB.
- /: Takes up the rest of the available space, and is used to store everything else (system, applications and user files).
The main partition (/) uses ext4 for the file system, while the /boot partition is formatted in FAT32.
EXT4 is a common file system on Linux distributions, but Windows can’t read it. This explains why you can see the system files when you insert an SD card into your computer. The only partition you can read is /boot because FAT32 is a file system invented by Microsoft, and fully supported on any Windows version.
What you can do from there
As you can see in the screenshot, a fresh installation of Raspberry Pi OS with Desktop (not the full version), only uses 4 GB on my USB key but takes up the whole available space (32 GB in this case).
This is where using Gparted can be pretty useful. Maybe not for a 32 GB drive, but more so if you use a bigger drive. For example, if you have a 500 GB SSD drive, you might want to reorganize and create another partition in FAT32 to store your personal files in order to read them from your computer too (if you use Windows).
We can imagine something like:
- /boot: 256 MB, FAT32
- /: 50 GB, EXT4 – It should be enough for almost anything.
- /data: 450 GB, NTFS – Using the rest of the disk in a format that can be read on any operating system.
I’ll show you how to use Gparted on Raspberry Pi OS to easily create a partition.
Note: FAT32 is not ideal when you have bigger disks. In theory, it’s not possible to create partitions bigger than 32 GB and format them in FAT32. Using NTFS or another file system is recommended in this case.
Install Gparted on Raspberry Pi
As explained in the introduction, Gparted is available in the default Raspberry Pi OS repository, so installing it is straightforward.
You can either use a terminal, and simply use the following commands:
sudo apt updatesudo apt install gparted
Or via the graphical tool (“Add/Remove Software”), open the package manager and look for Gparted:
Check the box corresponding to gparted, and click “Apply” to start the installation.
Once installed, Gparted should be available in the main menu, under System Tools:
Master your Raspberry Pi in 30 days
Sale: 10% off today.
Download the eBook.
Uncover the secrets of the Raspberry Pi in a 30 days challenge.
Learn useful Linux skills and practice multiples projects.
Note: If you want to modify partitions on a disk where Raspberry Pi OS is already installed, you need to use another media to start Gparted. You can’t use Gparted to make changes on the current system.
Use Gparted on Raspberry Pi
Once you understand how disk partitioning works, and what the default setup is on Raspberry Pi, using Gparted shouldn’t be that complicated.
When you start Gparted, you need to type your password (administrator privileges are required).
Then, you’ll get an interface looking like:
Start by picking the disk you want to modify in the top-right corner.
Reminder: It’s not possible to make changes on the disk you are currently using. You have to install Raspberry Pi OS on another device, and then plug the drive you want to edit.
Once done, you can change anything with a right-click on the partition name or in the graphical representation. I will show you how to resize a partition or create a new one.
Resize a partition
You need to unmount the partition before resizing it. That’s why you can resize the system partition once the system is loaded.
As Raspberry Pi OS will automatically mount all partitions, the first step is to right-click on it, and choose “Unmount”:
Then, you have access to the Resize/Move option in the menu:
You can either move the cursor on the graphical representation to resize the current partition or type the new size in the form. Then, click on “Resize/Move” to save your changes.
The last step is to click on the green tick to apply the changes on your disk.
Raspberry Pi OS should now automatically mount the partition each time you plug this drive.
Or you can use the mount command to do the same thing manually:
mount <partition> <destination>
For example:
mkdir /home/pat/usb-drivesudo mount /dev/mmcblk0p1 /home/pat/usb-drive
If the goal was to resize the system partition, you can now stop the Raspberry Pi, unplug the temporary system drive, and only keep the one you just resized.
Are you a bit lost in the Linux command line? Check this article first, for the most important commands to remember, and a free downloadable cheat sheet so you can have the commands at your fingertips.
Create a new partition
Once the disk is selected, make sure you have some unallocated space available to create a new partition. If not, you need to resize an existing partition first (or just delete one if you don’t need it anymore).
Master Python on Raspberry Pi
Sale: 10% off today.
Get the eBook.
Do more with your Raspberry Pi, learn the useful concepts and take the shortcuts.
You miss half of the fun of using a Raspberry Pi if you don’t know anything about Python.
Then, click on the unallocated space, and choose “New” in the dropdown menu.
A form will show up. Make sure to check the values where I added a red arrow:
At least, you need to set the new size (it will use all the space by default), the file system (fat32 for a small partition that you want to read on Windows, ext4 if you’ll only use it on the Raspberry Pi).
You can also choose a label, that will be used in the file explorer.
Once done, click “Add”. You’ll directly see the impact of your changes in the graphic representation.
But you need to click on the green check to apply the changes on the disk.
It may take a few minutes, depending on the partition size and hardware you use.
Once done, you’ll get a success message like this one:
If you want to access the new partition within the file explorer, the easiest way is to unplug the drive and plug it in again. Raspberry Pi OS will automatically mount the new partition:
That’s it, you can now use it and create files in this folder.
Reminder: Remember that all my Patreon supporters get access to this website without ads, early access to my videos and much more. You can become part of this community for as little as $3 per month & get all the benefits immediately.
You may also like:
- 25 awesome Raspberry Pi project ideas at home
- 15 best operating systems for Raspberry Pi (with pictures)
- My book: Master your Raspberry Pi in 30 days
Q&A
Get My Cheat Sheet!
Grab your free PDF file with all the commands you need to know on Raspberry Pi!
DOWNLOAD IT NOW
How to use Gparted in a terminal?
Gparted is a graphical application, there is no way to use it directly in a terminal. If you are using a Lite version of Raspberry Pi OS, a combination of commands like *fdisk* and *mkfs* can do something similar.
This will require a complete article to give you all the details, but if you want the short version, this video will be pretty useful:
https://www.youtube.com/watch?v=5kVAzxTwy5Q
Can you partition an SD card on Raspberry Pi?
It’s possible to change the partitions on a Raspberry Pi by using a tool like Gparted. But Gparted can’t resize the partition for the current system, so you need to use a second SD card with Gparted installed on it to reorganize the partition on the main SD card.
- https://www.tomshardware.com/how-to/dual-boot-raspberry-pi
https://forums.raspberrypi.com/viewtopic.php?f=29&t=282912
MultiBoot for the Raspberry Pi 4 and Raspberry Pi 3
MultiBoot maintains multiple copies of Raspberry Pi OS (RaspiOS) on a single storage device. Only one copy of RaspiOS may be active at a time, but changing the active copy requires little more than a reboot. When Master Boot Record (MBR) partitioning is used (default), a maximum of 3 copies of RaspiOS may be present. When GUID Partition Table (GPT) partitioning is used, a total of 127 copies of RaspiOS is theoretically possible, but the practical limit is around 25. MultiBoot can quickly convert an MBR storage device to GPT at any time.
Each RaspiOS instance occupies its own ROOT partition and shares a common BOOT partition. The common BOOT partition is saved to and restored from its associated ROOT partition when a different RaspiOS instance is selected. Each RaspiOS instance has a user defined name for convenient identification.
The initial starting point is an operational RaspiOS installation. Additional copies of RaspiOS are then installed by MultiBoot from normal image files. The user selects the image file to install, the partition size, and the RaspiOS instance name. RaspiOS instances may later be removed, resized, moved to the top or bottom of adjacent free space, or renamed.
A single script (mb) performs all configuration actions as well as selecting the active RaspiOS instance. Selecting the active instance of RaspiOS can be accomplished interactively by executing mb with no parameters or non-interactively by specifying the name of the RaspiOS instance to be activated. In either case, a reboot will occur and the newly selected RaspiOS instance will be active. Executing the MultiBoot script (mb) with a -i or –identify option will display the currently active RaspiOS instance.
Configuration is performed by executing the MultiBoot script (mb) with a -c or –config option. The storage device that contains the currently running RaspiOS system cannot be configured due to the partitioning operations that are involved. Simply boot from another storage device to perform configuration. MultiBoot will display a list of storage device candidates to select from for configuration. Configuration candidates are storage devices whose first partition is VFAT and second partition is EXT4. The first time MultiBoot configures a storage device, you will be asked for permission to initialize it, which consists of copying the BOOT partition contents to the ROOT partition /boot directory.
Configuration actions include:
Insert
This action inserts a new RaspiOS instance. You first select an 'Unpartitioned_Free_Space' area of sufficient size for the new RaspiOS instance to reside in. Then you specify the pathto/imagefile to be installed. Next, a partition size is requested. Partition size can be entered with a multiplier suffix of K, M, G, or T, for Kilobytes, Megabytes, Gigabytes, or Terabytes. If no multiplier suffix is given, the number is interpreted as the number of sectors. Then you must enter a name for the new RaspiOS instance. Names may contain embedded spaces which will be converted to underscores. Names may not start with a hyphen. Maximum name length is 40 characters. If WiFi is to be enabled (optional), you may specify the pathto/filename to be used for wpa_supplicant.conf. You may also enable or disable SSH logins. The final step is to confirm installation of the new RaspiOS instance.
Remove
This action removes an existing RaspiOS instance. Choose the name of the RaspiOS instance you wish to remove and confirm. The currently active RaspiOS instance cannot be removed until another RaspiOS instance is first made active.
Resize
This action resizes a partition. A partition can only be expanded into free space above it. To utilize free space below it, first use the Locate action to move the partition down. The current, minimum, and maximum partition sizes are displayed. Partition size can be entered with a multiplier suffix of K, M, G, or T, for Kilobytes, Megabytes, Gigabytes, or Terabytes. If no multiplier suffix is given, the number is interpreted as the number of sectors. The partition size may also be specified as 'minimum' or 'maximum'.
Locate
This action moves a partition to the top of free space above it or the bottom of free space below it. Depending on the speed of the media and size of the partition, this action can take a considerable amount of time to complete.
Rename
This action prompts for a new name and renames the chosen RaspiOS instance following confirmation
Select
This action selects the active RaspiOS instance. The currently active RaspiOS instance is indicated by a '=' instead of a ':' separating the RaspiOS instance name and partition size. A reboot does not occur during this configuration action.
MBRGPT
This action converts MBR partitioning to GPT partitioning.
NOTE: Do NOT use the 'Expand Filesystem' function in raspi-config! Doing so will render your storage device unusable. Always use MultiBoot to manipulate partitions.
NOTE: The ability to boot an SD card using GUID Partition Table (GPT) partitioning requires the RaspiOS 5.4.61 or later kernel.
image-backup may be used to create backup images of individual partitions which can be later installed by MultiBoot. The -n or –noexpand option should be used when creating a backup for use with MultiBoot.
MultiBoot is also suitable for use with a Raspberry Pi 2 (SD card only).
-
Attachments
MultiBoot.zip(9.03 KiB) Downloaded 67 times
Last edited by RonR on Wed Apr 13, 2022 8:04 pm, edited 11 times in total.
Re: MultiBoot for the Raspberry Pi 4
It's now been 3 months but there's still not an official RaspiOS image file available for download that can be loaded directly onto a USB device and booted on a Raspberry Pi 4.
The attached script will update the firmware files on older RaspiOS images making them capable of being loaded directly onto a USB device and booted without going through the steps of first creating an SD card, updating it, and creating an image file from it or copying it to a USB device.
Usage is:
sudo ./upd-image-fw <pathto/imagefile>
For example:
Code: Select all
sudo ./upd-image-fw 2020-05-27-raspios-buster-armhf.img
-
Attachments
upd-image-fw.zip(1015 Bytes) Downloaded 208 times
Last edited by RonR on Wed Nov 25, 2020 8:17 pm, edited 3 times in total.
Re: MultiBoot for the Raspberry Pi 4
New RaspiOS images have been made available (2020-08-20-raspios-buster-armhf) containing updated firmware. These images are now compatible with direct booting on a Raspberry Pi 4. See Raspberry Pi EEPROM Manager for a simplified and convenient method of updating the Raspberry Pi 4 bootloader EEPROM.
The 2020-08-20-raspios-buster-armhf images have been tested with and operate properly with MultiBoot (attached to the first post of this topic).
https://raspberrytips.com/raspberry-pi-dual-boot/
What is a dual boot?
Dual boot means that you can use two different operating systems on the same computer.
Most of the time, we use this for Windows and Linux systems on a PC.
On a computer, you can have Windows and Linux installed, and you choose which OS you want to use when you start the computer (with a menu asking you each time you boot).
This works by having a separate partition (or more) for each operating system and a small tool on the first sector of your hard drive to ask you which partition you want to start.
On a Raspberry Pi, we’d rather use multi-boot because there are many distributions you can install on Raspberry Pi (there are already 3 or 4 Raspberry Pi OS versions).
But it’s the same process.
You install several systems on your SD card and you choose which one you want to start each time.
If you want to change to another system, you just need to reboot your Raspberry Pi and select another one in the boot menu.
Why do I need this?
You may need to use multi-boot on a Raspberry Pi if you are using it for different purposes.
For example, you can install these three systems on your SD card:
- Raspberry Pi OS Lite: for basic services, like a web server, a torrentbox or anything else.
- OSMC: to watch videos (locally or with Netflix/Youtube) and listen to music.
- Lakka or Retropie: to play games sometimes, without losing all of your ROMs and data each time you want to play.
That’s just an example, but there are a lot of configurations that are possible depending on what you want.
What do I need to use it?
You don’t need a lot of things.
In fact, it’s just two or more operating systems that you install on the same SD card.
The only thing you should think about is your SD card.
Maybe for a basic installation, an 8G SD card will be enough.
But think about it, in one year, after adding GitHub downloads on Raspberry Pi OS, movies, music, and OSMC, and a ton of ROMs on Retropie, how much space do you need?
So, I recommend starting with the biggest SD card you have, maybe 64G or more.
By doing this you won’t have any space issues later.
If you don’t have big SD cards, check my recommended product page for the best card to buy.
How to dual boot with PINN on Raspberry Pi
So, let’s start with the first way to use a dual boot or more on Raspberry Pi.
As I told you, there are two main ways to use multi-boot, the first one is PINN.
Raspberry Pi Bootcamp
Sale: 10% off today.
Take it to the next level.
I’m here to help you get started on Raspberry Pi.
Learn all the skills you need in the correct order.
Here are the required steps to use dual boot on a Raspberry Pi:
- Download PINN from Sourceforge.
- Format an SD card and create a new partition (1 GB).
- Copy the PINN files on the SD card.
- Boot and follow the wizard to install several systems on the same SD card.
I will now explain everything in detail.
What is PINN?
PINN is an upgraded version of NOOBS, the installer that was previously offered by the Raspberry Pi Foundation with new Raspberry Pi models, to facilitate the installation process. Since the release of Raspberry Pi Imager, NOOBS no longer exists, but PINN is still there.
For multi-boot, PINN is probably the best tool to use.
It allows you to choose the systems you want to install from a list.
Then it will download and install them in separate partitions on your SD card.
I will let you check their GitHub project for more details.
Prepare a new SD card
Enough theory, let’s move on to practice.
As there is no image for PINN, you need to create the SD card yourself.
Reset your SD card
This step is not mandatory. If you have a fresh new SD card, you can skip this one.
But if you have already used it, especially if you already use PINN or another tool for multi-boot, I recommend resetting your SD card.
In this step, we’ll remove all the partitions on the SD card and create a new one using all the space.
PINN will manage the disk share for all the systems you want to install.
This procedure is for Windows users, but you can do the same thing on Mac or Linux.
On Linux, I recommend Gparted. On macOS, you can do this with the Disk Utility.
- Insert the SD card in your computer.
- Open your file explorer (WIN+E).
- In the left menu, right click on “This PC” and choose “Manage”.
- A new window appears: Computer Management.
- In the left menu, click on “Disk Management”.
- In this view, you should see at least two hard drives:
- Disk0: your computer hard drive
- Disk1 (or more): your SD card
- Find your SD card drive (there is the disk size on the left to help you).
In my case I have this:
I already tried PINN before so I have many partitions.
But usually, you’ll have only two (boot and system). - Remove all the existing partitions.
Right click on each segment and choose “Delete volume”. - At this step, you should have something like this:
If you have something called “Free space” you need to use a right-click and choose “Delete partition” to remove it. - Now that your SD card is empty, we’ll create a new partition.
Right-click on the “Unallocated” space and choose “New simple volume”. - A configuration wizard appears.
Click “Next” to start.
Then follow these steps:
- After a few seconds, you should see something like this:
Your SD is now ready with only one partition mounted on your computer (E: in my case).
If you don’t get this directly, eject and insert again the SD card in your computer, then finally format the partition (I have this issue each time).
This was the more complex step from this tutorial.
You can move to the next paragraph to continue the PINN installation.
Download PINN
PINN is available on Sourceforge.
Click on the Download button on this page.
The Lite version should be fine. Unless you are installing it on a Raspberry Pi with no internet connection, it’ll be faster.
If you choose the Offline mode, you need to increase the partition size for PINN to at least 3 GB (check the previous section).
Put the PINN files on your SD card
Now that your SD card is ready and you have the archive on your computer, you have almost finished.
- Extract the archive to a new folder.
- Copy all the files from this folder to the SD card (E: in my case).
- Eject the SD card from your computer (with the safe remove tool to avoid data corruption).
The SD card is ready.
Insert it in your Raspberry Pi and start it.
Install your systems
After a few seconds, the Raspberry Pi should display the PINN interface.
If you use a wireless connection, there is an extra step.
Configure the WiFi connection
If you don’t have an RJ45 cable available, you need to use the Wi-Fi connection.
As we chose the “PINN Lite” version, you need to download operating systems, so it’s not possible to use it without the internet.
On the first boot, PINN will ask you to configure a wireless connection:
- Close the error message by clicking “Close”.
- The Wifi network selection opens.
- Choose your Wifi network in the list.
- Then enter your pass phrase (you can also use the WPS button if you prefer).
- After a few seconds, you are connected.
Move to the next paragraph to choose the operating systems you want to use.
PINN menu
The main menu from NOOBS look like this:
You have access to many options, including:
- Raspberry Pi OS (Full, Lite, Standard)
- Twister OS: an upgrade version of RPI OS for desktop usage.
- Ubuntu or Ubuntu Mate
- Android (Lineage)
- LibreElec: Light system for media center.
- Lakka: Retro gaming system.
- Data partition: A free 512M partition for data or to use it later for something else.
I think it may also be useful to share data over different systems, in a unique dedicated space. - OSMC: Media center system.
- RISC OS: An ancient operating system, available for Raspberry Pi, I don’t really know what it is useful for.
If you are interested in something else, you probably need to check the BerryBoot section of this article.
PINN doesn’t allow you to add an operating system that is not on this list.
Select systems
Master your Raspberry Pi in 30 days
Sale: 10% off today.
Download the eBook.
Uncover the secrets of the Raspberry Pi in a 30 days challenge.
Learn useful Linux skills and practice multiples projects.
Now, our goal is to create a dual boot on the SD card (or a multi-boot maybe).
Check the box for every system you want to use.
The required space is updated in real-time under the menu.
Keep an eye on it if you have an SD card smaller than 30G.
Also, if you want to use a USB drive to store everything, you can change the destination device here.
Once done, click the “Install” button in the top menu.
Accept the confirmation message (it will delete everything on the SD card).
The installation process starts.
Wait a few minutes/hours depending on your internet connection.
Try the dual boot
After the installation, reboot your Raspberry Pi.
You’ll get a menu at the beginning, asking you to choose the operating system you want to start.
It looks like this:
Choose the operating system in the list and confirm.
You can change at any boot, without losing data.
This menu stays 10s and then it will boot the previously selected OS.
So if you often use the same OS, you don’t need to choose at each boot.
PINN limits
As you have seen there is a good list of operating systems available in the boot menu, but you don’t have everything.
If you want to install any “exotic” system, it’s not possible natively with PINN.
You can probably add other partitions later and install the system manually.
But it’s not the “easy way” announced in the title and I never tried it so I can’t show you.
Anyway, if you need to install another system, you can try with BerryBoot, the NOOBS alternative we’ll try right now.
Multi boot with BerryBoot
BerryBoot is the second software I suggest you create multi-boot SD cards.
It’s an alternative to PINN.
What is BerryBoot?
BerryBoot is another boot selection screen for Raspberry Pi.
As it’s not released by the Raspberry Pi Foundation, it’s more open to other systems and you can even use an external device to host the operating system (USB stick or hard drive for example).
There are also other differences with PINN.
BerryBoot is a true bootloader (and not only an installer).
PINN will create a partition for each system and “emulate” on boot an SD card smaller than the one you have.
BerryBoot will keep a compressed file of each system and you can install other systems later.
In short, PINN is perfect for beginners, BerryBoot is rather a good choice for power users and testers.
In this post, I’ll teach you how to create an SD card with BerryBoot and several operating systems on your SD card.
SD card preparation
The SD card preparation is almost the same as for PINN, so I’ll go faster:
- Download the file corresponding to your Raspberry Pi model from the official website.
- Extract the archive content to a new folder.
- Format your SD card as for PINN (I gave all details and screenshots previously on this post)
:
- Insert your SD card in your computer.
- Go to your Disk Management tool.
Depending on your OS, it could be in the computer management tool on Windows, Gparted on Linux or any other partitioning tool. - Delete all partitions.
- Create a new one from 1G or more.
- Format it in FAT32 (on Windows assign it a letter) .
- Copy all the files from the extracted archive (the files inside the folder, not the folder itself) and paste them on your SD card (letter D: or E: for example on Windows).
- Eject safely your SD card and insert it in the Raspberry Pi.
That’s it, your SD card with BerryBoot is ready.
Let’s move to the system installation.
Install your systems
Basic configuration
On the first boot you’ll get a configuration screen like this:
Set your settings as asked:
- Enable or disable overscan.
- Configure your network connection.
It’s mandatory to download OS files. - Set your local settings (Wifi country, time zone and keyboard layout).
Click OK to confirm.
For WiFi configuration, it will ask you on the next screen to select your SSID and enter your password.
You can then select the destination drive for the operating system.
It’s one of the strengths of BerryBoot, as you can choose an external device to install and run your systems.
You can also encrypt the destination disk.
Master Python on Raspberry Pi
Sale: 10% off today.
Get the eBook.
Do more with your Raspberry Pi, learn the useful concepts and take the shortcuts.
You miss half of the fun of using a Raspberry Pi if you don’t know anything about Python.
During my test, I chose a USB key. The wizard will then prepare the device before the installation.
Systems selection
You have now access to the system selection tool:
Another strength of BerryBoot is the OS selection you have access to.
By default, you already have systems not available on NOOBS: Ubuntu, Retropie, Kali Linux, …
But in the Network settings, you can also select a custom repository to get a lot more systems on this list.
If you want to try this feature, I’ll let you follow this documentation page.
You have to download an image list from the Internet and put it on a share in your local network.
Installation
Now, select an operating system from the list and install it.
You can only install one distribution at a time.
At the end of the installation, click “OK” to reboot the Raspberry Pi.
Try it
After the reboot, you’ll get a menu with only the first system you installed.
Yes, it’s not dual boot.
But you can add another system now!
Instead of booting the system, click on “Edit menu”.
You have now access to a menu from where you can install another system or change the default system to boot.
After installation, each new system will now be available in the boot menu.
Video
https://www.youtube.com/watch?v=gv4LSTpVkdM
Related questions
How do I add another system with PINN? If you selected two systems on PINN and want to add another, it’s possible. On the boot, you can hold the Shift key to enter the Recovery Mode to access the same installation menu. Here you can check another OS to install, exactly like for the first installation.
How to choose the default OS booting with PINN? BerryBoot allows you to set a default OS to boot each time as PINN is booting the last one. But it may not be a good thing for everyone. It’s not possible to change this directly in PINN, but you can try to edit the PINN configuration file manually to do this.
How to resize the partitions created by PINN? Unfortunately, there is no way to do this automatically. Raspi-config doesn’t support PINN partitions and no menu offers this feature in PINN directly. So if you want to give more space to one system, you have probably to do it manually, but it won’t be an easy part. As you can see below, here is what my SD card looks like after installing almost all the systems available. If I want to increase the partition size for Lakka for example, I have to identify which partition is for Lakka and then move all the others to find a free space. Not sure I’ll try 🙂 You can find good pieces of information about how PINN manages partitioning on this GitHub page.
Reminder: Remember that all my Patreon supporters get access to this website without ads, early access to my videos and much more. You can become part of this community for as little as $3 per month & get all the benefits immediately.
You may also like:
- 25 awesome Raspberry Pi project ideas at home
- 15 best operating systems for Raspberry Pi (with pictures)
- My book: Master your Raspberry Pi in 30 days
Conclusion
Get My Cheat Sheet!
Grab your free PDF file with all the commands you need to know on Raspberry Pi!
DOWNLOAD IT NOW
That’s it, you now know two ways to use dual boot on your Raspberry Pi (or multi-boot).
Depending on what you prefer and what you want to do, it’s your choice to use PINN or BerryBoot.
PINN seems easier for a beginner and for the main distributions.
BerryBoot seems a little more complex but you can install any systems you want, with more configuration features.
And for experimented users, you can also try installing VMWare ESXi to run virtual machines on your Raspberry Pi.
If you are interested to test other distributions than Raspberry Pi OS, check my post about the best-operating systems for your Raspberry Pi.