Boot certain Linux distributions from ISOs in ten steps:
- Debian Live 10 amd64 gnome non-free
- Debian Live 10 amd64 standard non-free
- Fedora Silverblue x86_64 31 installation image
- Lubuntu 18.04 desktop i386
The Debian distributions selected above include non-free firmware, for devices including WiFi adapters. Distribution 1 does not include a desktop environment.
For simplicity these instructions don't check any GnuPG signatures on checksums; checking signatures on checksums is a good practice and should be considered.
Alpine Linux does not appear to support booting ISO images directly; there is an open issue on the bug tracker.
The process below will:
- check a device for errors
- format the disk with a single "FAT32" partition in a GPT partition table
- download distribution 1 above
- install grub including settings to boot distribution 1
These steps have been tested from distribution 1 above.
- Clear the kernel ring buffer with
dmesg -c
, insert the USB device, and clear the ring buffer again is order to identify the device. In the example below the device is/dev/sdb
.$ sudo dmesg -c โ [ XX.XXXXXX] sd X:0:0:0: [sdb] Attached SCSI removable disk
- Check the device for errors:
This is a slow process as the entire device will be written several times.
sudo badblocks -v -w /dev/sdb
- Partition the disk: GPT partition table (
g
), single new partition with default number, start and end (n
), type of Microsoft Basic Data (t
,11
,w
):sudo fdisk /dev/sdb
- Connect to the internet.
- Install
grub
andmkfs.vfat
:sudo apt update && sudo apt install --yes curl dosfstools grub-efi-amd64-bin
- Format and mount the disk:
sudo mkfs.vfat -v -n distributio /dev/sdb1 && sudo mount /dev/sdb1 /mnt && cd /mnt
- Install grub onto the device:
sudo grub-install -v --target=x86_64-efi --efi-directory=. --boot-directory=. --removable --no-uefi-secure-boot
- Download these files:
curl -L https://github.com/maxwell-k/distributio/archive/master.tar.gz | sudo tar xz --strip-components=1
- Download and check an ISO then generate grub configuration:
sudo sh bin/prepare.sh debian-live-10.?.?-amd64-gnome+nonfree.sh
- Reboot.
To test manually, the following should succeed:
rm *.sha256 *.iso
sh bin/prepare.sh debian-live-10.?.?-amd64-gnome+nonfree.sh
sh bin/prepare.sh debian-live-10.?.?-amd64-standard+nonfree.sh
sh bin/prepare.sh Fedora-Silverblue-ostree-x86_64-31-1.9.sh
sh bin/prepare.sh lubuntu-18.04-desktop-i386.sh
Booting into each distribution should also be tested.
- https://docs.pagure.org/docs-fedora/bootloading-with-grub2.html
- https://wiki.archlinux.org/index.php/Multiboot_USB_drive
- https://wiki.debian.org/Firmware
- https://www.gnu.org/software/grub/manual/grub/grub.html
- https://manpages.debian.org/buster/grub2-common/grub-install.8.en.html
- http://man7.org/linux/man-pages/man7/dracut.cmdline.7.html
- https://github.com/aguslr/multibootusb