Multi Boot Raspberri Pi and amd64 OS
Mastering Multi-Booting on Your Raspberry Pi: ARM64 OS with Persistence and x86 (amd64) Flexibility via Ventoy
At revWhiteShadow, we understand the burgeoning need for versatility and enhanced functionality within the Raspberry Pi ecosystem. Gone are the days of single-purpose devices; today’s users demand the ability to seamlessly switch between operating systems, leverage advanced features like persistence, and even integrate non-native architectures into their workflows. This comprehensive guide delves into the intricate process of achieving robust multi-booting on Raspberry Pi, specifically focusing on the powerful combination of a 64-bit ARM OS with persistence and the flexibility of x86 (amd64) operating systems managed by Ventoy, all while ensuring your primary Pi OS remains the default.
The Raspberry Pi, particularly in its ARM64 iterations, has evolved into a formidable computing platform capable of handling a diverse range of tasks, from sophisticated server applications and media centers to advanced development projects and educational tools. However, the inherent nature of ARM architecture sometimes presents limitations when it comes to running software designed for the ubiquitous x86 (amd64) platform. This is where innovative solutions like Ventoy come into play, bridging the gap and opening up a world of possibilities.
Our objective is to empower you with the knowledge and step-by-step instructions to configure your Raspberry Pi for dual or multi-booting, with a particular emphasis on preserving your critical data and configurations for your primary ARM64 operating system. Simultaneously, we will demonstrate how to integrate a separate bootable environment for amd64-based operating systems using the unparalleled ease of Ventoy. This configuration ensures that your Raspberry Pi remains a highly adaptable and powerful tool, catering to both ARM-native demands and the broader spectrum of x86 software.
Understanding the Core Concepts: ARM64, Persistence, and Ventoy
Before we embark on the practical implementation, it’s crucial to grasp the foundational concepts that underpin this advanced multi-boot setup.
Raspberry Pi OS (ARM64) and the Importance of Persistence
The Raspberry Pi OS (64-bit), previously known as Raspbian, is the flagship operating system for the Raspberry Pi. Its 64-bit variant offers significant advantages in terms of memory management and the ability to run more demanding applications, making it the preferred choice for many advanced users.
Persistence in the context of a live operating system refers to the ability to retain changes made during a session. When you install an operating system on a USB drive or an SD card in a “live” mode without persistence, any files you save, applications you install, or settings you change are lost upon reboot. This is often the default behavior for many live USB distributions.
However, for a truly usable and productive environment, especially when using your Raspberry Pi as a daily driver or for specific projects, persistence is paramount. It allows you to:
- Save your work: Store documents, code, and project files directly on the bootable media.
- Install and configure software: Ensure your preferred applications and their settings are available on every boot.
- Customize your environment: Tailor the desktop, system settings, and user preferences to your liking.
- Maintain configurations: Keep network settings, SSH keys, and other system-level configurations intact.
Achieving persistence on a Raspberry Pi OS installation typically involves creating a dedicated partition or a persistent overlay file system that stores these changes. This ensures that your customisations are available every time you boot into your Pi OS.
Ventoy: The Revolutionary Multi-Boot Solution
Ventoy is a groundbreaking open-source tool that dramatically simplifies the process of creating bootable USB drives. Unlike traditional methods that require formatting the drive for each operating system, Ventoy allows you to simply copy ISO, WIM, IMG, VHD(x), and EFI files directly onto the drive. When you boot from a Ventoy-enabled drive, it presents you with a menu of all the bootable operating systems you’ve copied, allowing you to select and boot into them seamlessly.
The key advantages of Ventoy for our multi-boot scenario are:
- Ease of Use: No need to reformat the drive for each new OS. Just drag and drop your ISO files.
- Broad Compatibility: Supports a vast array of operating systems, including Windows, Linux distributions, and various utility tools.
- Bootable Drive Creation: Ventoy itself is installed onto a USB drive, making it bootable.
- No Installation Required for Most ISOs: For many operating systems, Ventoy can boot them directly from the ISO file without any additional installation to the USB drive.
- Plugin Support: Ventoy offers a powerful plugin system for advanced customization, including persistence for many Linux distributions.
While Ventoy is primarily known for its x86 (amd64) compatibility, its innovative design also extends its utility to ARM architectures like the Raspberry Pi, albeit with specific considerations.
Designing Your Multi-Boot Strategy for revWhiteShadow
Our goal at revWhiteShadow is to create a flexible and powerful setup that prioritizes the stable and persistent ARM64 Raspberry Pi OS as the primary boot option, while offering the convenience of accessing a range of x86 (amd64) operating systems via Ventoy from the same storage medium.
This strategy requires careful partitioning of your storage device (typically a high-quality USB 3.0 drive or an external SSD for optimal performance). The key is to have a dedicated, persistent installation of your Raspberry Pi OS (ARM64) and then leverage Ventoy’s capabilities on another portion of the drive or a separate partition.
We will aim for a configuration where:
- Primary Boot: Your Raspberry Pi OS (ARM64) with full persistence is the default and most readily accessible operating system.
- Secondary Boot Options: A Ventoy partition that hosts a collection of x86 (amd64) ISOs for on-demand booting.
This approach ensures that your day-to-day Raspberry Pi operations benefit from a stable, customized, and persistent environment, while enabling you to experiment with or utilize various amd64 operating systems without the need to swap physical media or reconfigure your entire system.
Prerequisites for Your Multi-Boot Raspberry Pi Setup
Before we dive into the installation and configuration process, ensure you have the following essential components and software:
- A Powerful Raspberry Pi: A Raspberry Pi 4 Model B or Raspberry Pi 5 is highly recommended due to their increased processing power, USB 3.0 ports, and sufficient RAM, which are crucial for running multiple OSes smoothly.
- High-Quality Storage Media:
- For Raspberry Pi OS (ARM64): A fast, reliable microSD card (Class 10, U3, A1/A2 rated) or, preferably, a USB 3.0 SSD or high-end USB 3.0 flash drive for significantly better performance and longevity. We will be installing the OS and its persistence data here.
- For Ventoy and amd64 ISOs: A separate USB 3.0 flash drive or a partition on the same drive where you plan to store your Ventoy installation and the ISO files. Using a separate drive is often simpler for initial setup.
- Power Supply: A robust, official Raspberry Pi power supply is critical to ensure stable operation, especially when multiple peripherals are connected.
- Computer for Preparation: A separate Windows, macOS, or Linux computer to download OS images, flash Ventoy, and prepare your storage media.
- Internet Connection: For downloading operating system images and Ventoy.
- Basic Linux Command-Line Familiarity: Some familiarity with the Linux command line will be beneficial, although we will provide clear instructions.
Step-by-Step Guide: Implementing the Multi-Boot Strategy
Let’s break down the process into manageable steps to achieve your multi-boot Raspberry Pi setup with persistent ARM64 OS and Ventoy for amd64.
Phase 1: Preparing and Installing Persistent Raspberry Pi OS (ARM64)
This phase focuses on creating a fully functional and persistent installation of your chosen 64-bit Raspberry Pi OS on your primary storage device.
1. Downloading the Latest Raspberry Pi OS (64-bit)
- Visit the official Raspberry Pi OS download page.
- Download the “Raspberry Pi OS (64-bit)” image. It’s often available in both “with desktop” and “lite” versions. For a more comprehensive experience, the “with desktop” version is recommended.
2. Flashing Raspberry Pi OS to Your Storage Media
We will use a reliable imaging tool to write the downloaded OS image to your microSD card or USB drive.
- Recommended Tool: Raspberry Pi Imager. This official tool is cross-platform and simplifies the process.
- Using Raspberry Pi Imager:
- Install Raspberry Pi Imager on your preparation computer.
- Insert your microSD card or USB drive into your computer.
- Launch Raspberry Pi Imager.
- Click “Choose OS” and select “Use custom” to browse and select the downloaded Raspberry Pi OS (64-bit)
.img
file. - Click “Choose Storage” and carefully select your target microSD card or USB drive. Ensure you select the correct drive to avoid data loss.
- Before clicking “Write”, click the gear icon (Advanced options). Here, you can:
- Set hostname: Give your Pi a unique name.
- Enable SSH: Crucial for remote access.
- Set username and password: Create a secure login.
- Configure Wi-Fi: If connecting wirelessly.
- Click “Write” and wait for the process to complete. Raspberry Pi Imager will verify the write, ensuring data integrity.
3. Booting and Initial Configuration of Raspberry Pi OS
- Safely eject the storage media from your preparation computer.
- Insert it into your Raspberry Pi.
- Connect your display, keyboard, and mouse.
- Power on your Raspberry Pi.
The Raspberry Pi will boot into the newly installed OS. The first boot might take a bit longer as the system expands the file system to utilize the entire storage device.
4. Enabling and Verifying Persistence
While Raspberry Pi OS is generally configured to use the entire storage device, explicitly ensuring persistence involves understanding how it’s managed. By default, when you install an OS image directly to a USB drive or SSD, the system typically boots from it and operates normally, saving changes. However, if you were using a specific “live” image that didn’t auto-configure persistence, you might need to create a separate persistent partition or overlay.
For a standard Raspberry Pi OS installation using Raspberry Pi Imager onto a USB drive or SSD, the system should automatically utilize the entire drive and allow you to save files and install software directly. The key to true robustness in our multi-boot scenario is to ensure this primary OS is on its own dedicated, well-performing storage.
To ensure you are using the full capacity of your storage device:
- Open a terminal on your Raspberry Pi OS.
- Run
lsblk
to view your block devices. You should see your storage device (e.g.,/dev/sda
for USB,/dev/mmcblk0
for SD card) and its partitions. - If the OS did not automatically expand to fill the drive, you can use
sudo raspi-config
:- Navigate to “Advanced Options” -> “Expand Filesystem”.
- Follow the prompts and reboot.
With your Raspberry Pi OS installed on a dedicated drive, any files you save, applications you install, and configurations you make will be persisted across reboots. This is your robust, primary operating environment.
Phase 2: Installing and Configuring Ventoy for amd64 OS on the Same Drive (or a Separate Drive)
Now, we’ll prepare the Ventoy part of our multi-boot system. We will install Ventoy onto a separate partition of the same drive or a different USB drive. For simplicity and to avoid complex partitioning on an existing OS installation, we recommend using a separate USB 3.0 drive for Ventoy, especially if your primary Pi OS is on an SD card. If your Pi OS is on a USB SSD, you can create a new partition on that SSD.
Scenario A: Ventoy on a Separate USB Drive
This is the most straightforward method and recommended for most users.
1. Downloading Ventoy
- Visit the official Ventoy download page.
- Download the “Ventoy-x.x.xx-linux.tar.gz” file for Linux.
2. Preparing the Ventoy USB Drive
- Insert a separate USB flash drive (e.g., 16GB or larger, depending on how many amd64 ISOs you plan to store).
- Extract the downloaded Ventoy archive on your preparation computer:
tar -zxvf ventoy-x.x.xx-linux.tar.gz cd ventoy-x.x.xx
- Crucially, identify the device name of your Ventoy USB drive. Use
lsblk
orsudo fdisk -l
. Be extremely careful to select the correct device name (e.g.,/dev/sdb
) to avoid overwriting your Pi OS drive. - Run the Ventoy installation script:
sudo sh Ventoy2Disk.sh -i /dev/sdX # Replace /dev/sdX with your Ventoy USB drive
- The script will warn you that all data on the target drive will be lost. Type
y
and press Enter to confirm. - Ventoy will create two partitions: a small EFI System Partition (ESP) and a larger exFAT partition named “Ventoy”.
- The script will warn you that all data on the target drive will be lost. Type
3. Copying amd64 ISO Files
- Once Ventoy is installed, your Ventoy USB drive will have a partition labeled “Ventoy”.
- Simply copy your desired amd64 operating system ISO files (e.g., Ubuntu, Debian, Windows installer) directly into the root directory or any subfolders of this “Ventoy” partition. Ventoy automatically scans these directories for bootable images.
Scenario B: Ventoy on a New Partition of the Same Drive (If Pi OS is on USB SSD)
This method requires careful disk management. If your Pi OS is on an SD card, we strongly advise using a separate USB drive for Ventoy.
1. Resizing the Pi OS Partition (if necessary)
- If your Pi OS installation on the USB SSD is using the entire drive, you might need to shrink its existing partition to make space for Ventoy. This can be done using tools like
gparted
from a live Linux environment or cautiously from within your Pi OS (though it’s riskier). - Alternatively, if you have sufficient space, you can create a new partition directly.
2. Installing Ventoy to a New Partition
- On your preparation computer, after downloading and extracting Ventoy (as in Scenario A, step 1), ensure you identify the correct device name of your USB SSD that contains your Pi OS. Let’s assume it’s
/dev/sda
. - You will need to create a new partition on
/dev/sda
. You can usefdisk
orparted
for this. For example, to create a partition usingfdisk
:sudo fdisk /dev/sda
- Press
n
to create a new partition. - Choose primary or extended as needed.
- Select the partition number.
- Specify the start and end sectors or size (e.g.,
+20G
for a 20GB partition). - Press
t
to change the partition type if needed. You’ll want a system partition for Ventoy. However, Ventoy’s script typically handles this. - Press
w
to write changes and exit.
- Press
- Now, identify the new partition (e.g.,
/dev/sda3
). - Run the Ventoy installation script pointing to the partition:
sudo sh Ventoy2Disk.sh -i /dev/sda3 # Replace /dev/sda3 with your new Ventoy partition
- Again, confirm the data loss warning. Ventoy will format this partition and install itself.
3. Copying amd64 ISO Files
- Mount the newly created Ventoy partition (e.g.,
/dev/sda3
) if it wasn’t automatically mounted. - Copy your desired amd64 operating system ISO files into this partition.
Phase 3: Configuring the Raspberry Pi for Multi-Booting
This is where we tie everything together and ensure your Pi boots into the desired OS sequence.
1. Setting the Boot Order
The Raspberry Pi’s bootloader prioritizes boot devices in a specific order. Typically, it checks the SD card first, then USB devices.
- If your persistent Pi OS is on an SD card: The Pi will naturally boot into it first. When you want to use Ventoy, you will typically need to interrupt the boot process or have Ventoy available on a different boot path.
- If your persistent Pi OS is on a USB SSD: You need to ensure the Pi’s bootloader is configured to prioritize booting from USB. This is often the default for newer Raspberry Pi models, but you might need to adjust settings in
raspi-config
.
2. Booting from Ventoy
When you want to boot into an amd64 operating system:
- Ensure your Ventoy USB drive is plugged in.
- Power on or reboot your Raspberry Pi.
- Interrupt the boot sequence: You might need to press a specific key (often
Esc
orF2
) during the initial boot process to access the boot menu. This varies by Pi model and firmware. - Select your Ventoy USB drive from the boot menu.
- The Ventoy boot menu will appear, listing all the ISO files you copied. Select the desired amd64 OS and press Enter to boot.
3. Persistence for amd64 ISOs with Ventoy (Advanced)
While our primary goal is persistent ARM64 OS and non-persistent amd64 ISOs, Ventoy does support persistence for many Linux distributions, even on ARM. This is a more advanced configuration.
If you wish to have persistence for specific amd64 Linux distributions booted via Ventoy:
- Create a persistence file: Within the Ventoy USB drive’s “Ventoy” partition, create a folder named
ventoy/persistence
. Inside this folder, create a.dat
file for each OS you want persistence for (e.g.,ubuntu.dat
,debian.dat
). - Configure persistence: Ventoy uses a
persistence.json
file within theventoy/
folder to map these.dat
files to specific ISOs and define their attributes. You’ll need to consult the Ventoy documentation for the exact syntax to create these files and configurepersistence.json
. - Note: Achieving reliable persistence for amd64 ISOs on an ARM architecture like the Raspberry Pi can be complex and may not be supported for all distributions or configurations. For this guide, we are focusing on the simpler, non-persistent boot for amd64 ISOs.
4. Setting the Default Boot (Ensuring Pi OS is Primary)
The Raspberry Pi’s boot order mechanism is designed to prioritize the primary OS.
- If your Pi OS is on the SD card: It will naturally be the default boot device.
- If your Pi OS is on a USB drive: Ensure it’s recognized as the primary boot device. If you also have Ventoy on a separate USB drive, the Pi will typically try to boot from the first recognized bootable device in its priority list. If your Pi OS USB drive is connected, it should be prioritized. If you encounter issues where Ventoy boots by default even when your Pi OS drive is connected, you may need to investigate boot order settings specific to your Raspberry Pi model or firmware, though this is less common.
The key to having your persistent Raspberry Pi OS (ARM64) as the default is to ensure its storage device is the one the Raspberry Pi’s firmware attempts to boot from first. When you want to use Ventoy, you’ll perform the manual boot selection process as described above.
Optimizing Performance and User Experience
To ensure a smooth and responsive multi-boot experience on your Raspberry Pi, consider these optimizations:
- Use USB 3.0 or SSD: For both your persistent Pi OS and your Ventoy drive, USB 3.0 speeds (or an SSD) are crucial. SD cards can be a bottleneck for OS performance.
- Sufficient RAM: For multitasking or running more demanding amd64 OSes, a Raspberry Pi with 4GB or 8GB of RAM is highly recommended.
- Cooling: Running multiple operating systems, especially those with higher resource demands, can generate heat. Ensure your Raspberry Pi has adequate cooling (heatsinks, fan).
- High-Quality Power Supply: An unstable power supply can lead to data corruption and system crashes, particularly in complex setups.
- Organize Your ISOs: For Ventoy, create subfolders on the “Ventoy” partition to categorize your amd64 ISOs (e.g.,
/Ventoy/Linux/Ubuntu/
,/Ventoy/Windows/
). This makes the Ventoy menu cleaner and easier to navigate. - Keep Ventoy Updated: Periodically update Ventoy to its latest version on your Ventoy USB drive to benefit from new features and compatibility improvements. The update process involves re-running the
Ventoy2Disk.sh
script with the-i
flag, but crucially, you can usually use the--re-install
option if you want to preserve your existing ISO files and configurations, though backing them up first is always wise.
Troubleshooting Common Issues
While this guide aims for clarity, you might encounter a few hiccups. Here are some common issues and their solutions:
- Raspberry Pi not booting from USB:
- Ensure your Pi model supports USB booting (Pi 4 and later generally do).
- Check if the boot order needs to be adjusted. Sometimes, an older SD card with a bootloader config might interfere. Ensure your Pi OS USB drive is properly formatted and recognized.
- Try a different USB port or a different USB drive.
- Ventoy menu not appearing:
- Ensure the Ventoy USB drive is correctly flashed.
- Verify that you are interrupting the boot sequence correctly to select the USB drive.
- Check if the Ventoy partition is formatted as FAT32 or exFAT.
- amd64 ISO not booting from Ventoy:
- Some amd64 ISOs might have specific boot requirements that Ventoy cannot meet on an ARM architecture. Ensure you are using standard, widely compatible ISOs.
- Try copying the ISO to the root of the Ventoy partition rather than a subdirectory.
- Ensure the ISO file is not corrupted.
- Persistence not working for Pi OS:
- Double-check that the filesystem was expanded to fill the entire storage device.
- Ensure you are not using a “live” image that explicitly disables persistence.
Conclusion: Embracing the Versatility of Your Raspberry Pi
By meticulously following these steps, you have successfully transformed your Raspberry Pi into a highly versatile computing hub. You now possess a powerful, persistent 64-bit ARM OS for your core operations and the unparalleled flexibility of Ventoy to seamlessly boot into a variety of x86 (amd64) operating systems.
This multi-boot Raspberry Pi setup empowers you to:
- Develop and experiment with different ARM64 distributions with your configurations saved.
- Test and utilize a wide range of software applications designed for the x86 architecture without reformatting your primary drive.
- Create specialized environments for tasks ranging from media playback to server hosting and development, all from a single, adaptable device.
At revWhiteShadow, we are committed to pushing the boundaries of what’s possible with platforms like the Raspberry Pi. This detailed guide, focusing on the synergy between persistent ARM64 operating systems and the adaptable Ventoy solution for amd64 compatibility, is a testament to that commitment. Embrace this newfound flexibility and unlock the full potential of your Raspberry Pi for all your projects and endeavors.