Introduction

Ever needed to boot multiple operating systems or utilities from a single USB drive? Whether you’re a DevOps engineer managing servers, a sysadmin troubleshooting machines, or a tech enthusiast experimenting with different Linux distros, a multiboot USB is an invaluable tool. Instead of juggling multiple flash drives, you can consolidate multiple ISOs into one portable device.

In this guide, we’ll explore how to create a multiboot USB key using GRUB and MultiBoot USB, allowing you to boot various LiveCD ISOs seamlessly.


Why Use a Multiboot USB?

A multiboot USB offers several advantages:

  • Portability – Carry multiple OS installations on a single drive.
  • Efficiency – No need to burn separate USBs for each ISO.
  • Flexibility – Boot into different environments (Linux, Windows recovery tools, diagnostics).
  • Cost-effective – Save money on multiple USB sticks.

Popular tools like MultiBoot USB, YUMI, and Easy2Boot exist, but we’ll focus on an open-source GRUB-based solution for maximum control.


How to Create a Multiboot USB

1. Prerequisites

Before starting, ensure you have:

  • A USB drive (16GB+ recommended).
  • GRUB2 installed (available on Linux via grub-pc-bin or grub-efi-amd64-bin).
  • A Linux or Windows system (with WSL for Windows users).

2. Preparing the USB Drive

Option A: Manual Setup (Advanced Users)

  1. Partition the USB using sgdisk (GPT) or fdisk (MBR).
  2. Create:
    • A BIOS boot partition (1MB, type ef02).
    • An EFI partition (50MB, FAT32).
    • A data partition (remaining space, ext4 or NTFS).
  3. Install GRUB for both BIOS and UEFI:
    1grub-install --target=i386-pc --boot-directory=/mnt/usb/boot /dev/sdX  
    2grub-install --target=x86_64-efi --efi-directory=/mnt/efi --boot-directory=/mnt/usb/boot  
    

Option B: Automated Script

The MultiBoot USB project provides a makeUSB.sh script:

1./makeUSB.sh /dev/sdX --efi --hybrid  

This automates partitioning, formatting, and GRUB installation.

3. Adding ISOs

  1. Copy your ISO files to /boot/isos/ on the USB.
  2. Configure GRUB entries in /boot/grub/mbusb.d/.
    • Use loopback.cfg (if available).
    • Convert ISOLINUX entries to GRUB format.
    • For small ISOs (<128MB), use MEMDISK.

Example GRUB entry for Ubuntu LiveCD:

1menuentry "Ubuntu 22.04" {  
2  set isofile="/boot/isos/ubuntu-22.04.iso"  
3  loopback loop $isofile  
4  linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile  
5  initrd (loop)/casper/initrd  
6}  

Best Practices for DevOps Use Cases

  • Test in QEMU before real hardware:
    1qemu-system-x86_64 -enable-kvm -drive file=/dev/sdX,format=raw  
    
  • Automate updates – Sync ISOs via cron jobs.
  • Backup configurations – Store GRUB configs in Git.

Q&A Section

Q: Can I boot Windows ISOs this way?

A: Yes, but Windows ISOs often require Ventoy or WoeUSB due to bootloader limitations.

Q: What if my ISO isn’t supported?

A: Check the MultiBoot USB docs or manually convert ISOLINUX entries to GRUB.

Q: Does this work on Macs?

A: Only on Intel Macs (not Apple Silicon).


Final Thoughts

A multiboot USB is a must-have for DevOps engineers, sysadmins, and IT professionals. With GRUB and MultiBoot USB, you can efficiently manage multiple LiveCD ISOs on a single drive.

Got questions? Drop them in the comments below! 🚀


SEO Keywords Used:

  • multiboot USB
  • LiveCD ISOs
  • GRUB configuration
  • USB bootloader
  • DevOps tools

By following these steps, you’ll have a versatile bootable USB ready for any task. Happy hacking! 🛠️