The creator of mkusb has released an Template Image for creating BIOS/UEFI boot partitions on a USB.
How can I use this image to boot ISO files from a USB?
The creator of mkusb has released an Template Image for creating BIOS/UEFI boot partitions on a USB.
How can I use this image to boot ISO files from a USB?
Booting ISO Files with mkusb BIOS/UEFI GRUB Template Image
There are a few pre-built programs available for multibooting Linux systems: MultiBootUSB, Ventoy and YUMI. The inner workings of these tools is not very transparent.
Now it is easy to build an ISO booting USB that works in BIOS and ISO mode from scratch.
There are several versions of the mkusb BIOS/UEFI GRUB template.
https://phillw.net/isos/linux-tools/uefi-n-bios/dd_grub-boot-template-for-uefi-n-bios.img.xz For use in Windows 10 and in Linux.
https://phillw.net/isos/linux-tools/uefi-n-bios/mkusb_grub-boot-template-for-uefi-n-bios_fat32_4GB_use-in-wins.img.xz For use in Windows 7 thru 10, it has a 4GB FAT32 No 1 partition that is accessible in older versions of Windows or IOS.
MD5SUM's can be found here: https://phillw.net/isos/linux-tools/uefi-n-bios/grub-boot-templates-for-uefi-n-bios.md5.
Basic ISO Booter (Min 4GB USB)
Flash
mkusb_grub-boot-template-for-uefi-n-bios_fat32_4GB_use-in-wins.img
to a USB using Rufus, Etcher, Gnome-Disks, mkusb or etc. (Use 7zip to extract from xz if necessary).Copy the ISO file for any flavor of Ubuntu (Kubuntu, Lubuntu ... Xubuntu) or Linux Mint* to the USB.
Rename the ISO file to
ubuntu.iso
.Boot the USB and confirm that everything works.
Linux Mint, Elementary OS and some flavors of Ubuntu may require
initrd.lz
rather thaninitrd
in grub.cfg.Basic ISO Booter with Persistent Partition Alt1 (Min 4GB USB) Only one persistent partition is allowed per Computer.
Create Basic ISO Booter above.
Boot USB, open GParted and format empty space to the right of the boot partitions as ext4, label it
casper-rw
.Basic ISO Booter with Persistent Partition Alt2 (Min 4GB USB)
Create Basic ISO Booter above.
Boot the USB, at the boot menu select live-only option and press
e
to edit.Use the arrow keys to get to the end of the linux line, (one space after the word
nopersistent
). and typetoram
then press F10 to boot.In Terminal type
sudo umount -lrf /isodevice
to unmount the USB.Open GParted. Move EFI boot partition 1MB from right side. Move BIOS boot partition next to it. click apply, Adjust Partition No1 size as required.
Create a new ext4 partition in the unused space, label it
casper-rw
A persistent partition labeled home-rw can also be created, It is similar to a /home partition in a Full install.
Boot the USB using the persistent menuentry option.
Named ISO Files
Boot the USB and edit
grub.cfg
usingAdd proper ISO names, (and path), as shown below. Note: Using
/etc/grub.d/40_custom
to editgrub.cfg
does not work with ISO files.ISO Multi-Booter (Min 8GB USB)
Boot
toram
and move boot partitions as above using GParted.Resize FAT32 partition to fill empty space.
Copy preferred Ubuntu flavors (Kubuntu, Lubuntu ... Xubuntu) ISO's to USB.
Edit grub.cfg providing a uniquely named menuentry for each ISO.
ISO Multi-Booter with Multi-Persistence (16GB+ USB)
Create multi-booter as above.
Add a uniquely named folder to a FAT32 partition for each ISO file requiring persistence if not already there.
Add a persistence file labeled
writable
to each folder.Add a persistence file labeled
home-rw
to each folder as desired.*Edit
linux
line of eachpersistent
menuentry addingpersistent-path=foldername
Example:
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile noprompt noeject quiet splash fsck.mode=skip persistent persistent-path=ubuntu-20.04.1
To create persistence file:
casper-rw
withwritable
home-rw
partition replacecasper-rw
withhome-rw
Additional Tweaks
Booting to RAM: Add
toram
at the end of the grub.cfg menuentry linux line.Eliminating Disk Check: Add
fsck.mode=skip
at the end of the grub.cfglive-only
menuentry linux line.Eliminating Try/Install screen: Remove
maybe-ubiquity
from the grub.cfglive-only
menuentry linux line.Safe Graphics Mode: Add
nomodeset
at the end of the grub.cfg menuentry linux line.To watch boot progress remove
quiet splash
from the menuentry linux line.Personalize a persistent ISO. Go to settings/Users and add a New User and a password. You can make new users for each persistent ISO.
Additional menuentries see: https://help.ubuntu.com/community/Grub2/ISOBoot/Examples
When booted from the USB, data copied to the disk is located in the isodevice folder.
These templates require editing to work with other Linux distros
grub.cfg
).Additional Menuentries for some popular Linux distro's:
Debian Live
To create persistence file:
then mount it
Create a persistence.conf file
Move it to the
perst
directory.And unmount:
To create persistence partition:
Create an ext4 partition, label it
persistence
and drop a persistence.conf file into it.