This repository stores the files needed to create a pendrive capable of booting different ISO files using GRUB2.
If we have Git installed on the system, we can get the files directly from the repository:
git clone git://github.com/aguslr/multibootusb.git
After this, every time we want to update the files we do:
cd multibootusb && git pull
If Git is not installed, we can still get the files as long as we have a basic Unix environment available:
wget https://github.com/aguslr/multibootusb/tarball/master -O - | tar -xzv --strip-components 1 --exclude={README.md,demo.gif}
Simply run as root:
./makeUSB.sh <device>
Where <device>
is the name of the USB device (e.g. /dev/sdh). Run mount
to get this information.
WARNING: This will delete all data in the device, so make sure you pick the right one.
These are the options for the script:
Script to prepare multiboot USB drive
Usage: makeUSB.sh [options] device [fs-type]
device Device to modify (e.g. /dev/sdb)
fs-type Filesystem type for the data partition [ext3|ext4|vfat|ntfs]
-b, --hybrid Create a hybrid MBR
-e, --efi Enable EFI compatibility
-i, --interactive Launch gdisk to create a hybrid MBR
-l, --log Save debug information to log
-h, --help Display this message
Follow the instructions to create a Hybrid UEFI GPT + BIOS GPT/MBR boot from the ArchWiki.
-
Mount the data partition:
mount --target <mountpoint> <partition>
Where
<mountpoint>
is any directory you want the partition to be mounted at, and<partition>
is the name of the data partition (e.g. /dev/sdh3). Rundmesg
to get this information. -
Create a directory named boot to store GRUB's configuration files, a directory named bin for binary files and another named isos for the kernel/ISO files:
mkdir -p <mountpoint>/boot/{grub/grub.d/,bin,isos}
-
Copy the necessary GRUB files:
cd multibootusb && cp -rf {grub.cfg,grub.d,multiboot.*} <mountpoint>/boot/grub/
-
Download and copy the ISO files into the USB drive:
wget "http://cdimage.kali.org/kali-1.1.0/kali-linux-1.1.0-i386.iso" -P <mountpoint>/boot/isos/
-
Reboot and select the USB drive to access the menu.
Boot any ISO with MEMDISK
Using Syslinux's MEMDISK, an ISO file can be loaded directly into memory (as long as the system has enough) which will allow for booting some unsupported ISO's.
To get MEMDISK's binary, you can install syslinux using your system's package manager, and find it at /usr/lib/syslinux/memdisk
or /usr/lib/syslinux/bios/memdisk
, depending on your distribution.
Alternatively, you can download the official tarball from kernel.org, in which case, you will find the binary at /bios/memdisk/memdisk
.
Once you have the file, simply copy it to your data partition:
cp -f memdisk <mountpoint>/boot/grub/
Testing USB drive with QEMU
To test the newly created USB drive in a virtual environment, run:
qemu-system-x86_64 -enable-kvm -localtime -m 2G -vga std -drive file=<device>,cache=none,if=virtio
Where <device>
is the name of the USB device (e.g. /dev/sdh). Run mount
to get this information.
You can download ISO files from these websites (save to <mountpoint>/boot/isos
):
-
Antergos: a modern, elegant, and powerful operating system based on one of the best Linux distributions available, Arch Linux.
-
Arch Linux: a lightweight and flexible Linux® distribution that tries to Keep It Simple.
-
AVG Rescue CD: a tool to repair system crashes and return your systems to operating at full capacity.
-
BackBox: an Ubuntu-based distribution developed to perform penetration tests and security assessments.
-
boot.rackspace.com: a collection of iPXE scripts that allow you to rapidly network boot Operating Systems, Utilities and other tools very easily.
-
Boot-repair-disk: the 'must-have' rescue CD.
-
Byzantium: a live Linux distribution that delivers easy-to-use, secure, and robust mesh networking capabilities.
-
CentOS: a community-driven free software effort focused on delivering a robust open source ecosystem.
-
Clonezilla Live: a small bootable GNU/Linux distribution for x86/amd64 (x86-64) based computers.
-
DBAN: a free erasure software designed for the personal user.
-
Debian: a free operating system (OS) for your computer.
-
elementary OS: a fast and open replacement for Windows and OS X.
-
Fedora: a polished, easy to use operating system.
-
Gentoo Linux: a flexible, source-based Linux distribution that becomes just about any system you need—and much more.
-
GParted Live: a small bootable GNU/Linux distribution for x86 based computers.
-
Grml Live Linux: a bootable live system based on Debian that includes a collection of GNU/Linux software especially for system administrators.
-
Hiren's BootCD: a first aid kit for your computer.
-
Kali Linux: a Debian-derived Linux distribution designed for digital forensics and penetration testing.
-
KDE neon: the latest and greatest of KDE community software packaged on a rock-solid base.
-
Linux Mint: an Ubuntu-based distribution whose goal is to provide a more complete out-of-the-box experience by including browser plugins, media codecs, support for DVD playback, Java and other components.
-
Manjaro Linux: a user-friendly Linux distribution based on the independently developed Arch operating system.
-
netboot.xyz: a way to select various operating system installers or utilities from one place within the BIOS without the need of having to go retrieve the media to run the tool.
-
openSUSE: a Linux-based project and distribution sponsored by SUSE Linux GmbH and other companies.
-
Parabola GNU/Linux-libre: a community driven effort to provide a fully Free (as in freedom) operating system that is simple and lightweight.
-
Parted Magic: a complete hard disk management solution.
-
Raspberry PIXEL: the Raspberry Pi OS for PC and Mac.
-
Slax Linux: a modern, portable, small and fast Linux operating system with a modular approach and outstanding design.
-
SliTaz: a secure and high performance operating system using the Linux Kernel and GNU software.
-
SystemRescueCd: a Linux system rescue disk for administrating or repairing your system and data after a crash.
-
Tails: a live operating system, that aims at preserving your privacy and anonymity.
-
Trisquel GNU/Linux: a fully free operating system for home users, small enterprises and educational centers.
-
Ubuntu: an open source software platform that runs from the cloud, to the smartphone, to all your things.
-
Void: a general purpose operating system, based on the monolithic Linux® kernel.
- Hybrid UEFI GPT + BIOS GPT/MBR boot
- Using Syslinux and memdisk
- Thermionix/multipass-usb
- Transform a USB stick into a boot device packing multiple Linux distros
- MultiBoot USB with Grub2 (boot directly from iso files)
- Grub2 Loop Boot Solution
- Multiboot USB-Stick: grml 2014.11 einrichten
- Man page of SGDISK
- Hybrid MBRs