Grub2Stick

download archive

wget https://www.paranoids.at/downloads/usbstick.tar.gz

sha512 checksum

370a7d6916bd0fbbddd95d314a0c10bbecaa23e8f9670753ad4b4dde51f08406e1b7a8441b854472475d62cf875e93df535665736fa3e7290f7f70fabf085cd6  usbstick.tar.gz

prepare stick all data lost

zero stick

dd if=/dev/zero of=/dev/sdx bs=1M count=10

create partition

fdisk /dev/sdx

format with fat32

mkfs.vfat /dev/sdx1

mount stick

mount /dev/sdx1 /mnt/sdx

change directory

cd /mnt/sdx

unpack archive

tar -xzvf /home/user/downloads/usbsitck.tar.gz

install grub

bios grub

grub-install --target=i386-pc --removable --root-directory=/mnt/ /dev/sdx

uefi grub

grub-install --target=x86_64-efi --removable --root-directory=/mnt/ --efi-directory=/mnt/ /dev/sdx

unmount stick

umount /mnt/sdx

grub.cfg

vim /mnt/sdx/boot/grub/grub.cfg
insmod all_video

menuentry "Debian Buster NetBoot amd64" {
        loopback loop /boot/iso/debian-buster-amd64.iso
        linux (loop)/linux --
        initrd (loop)/initrd.gz
}

menuentry "Debian Live Buster amd64 non-free" {
        linux /boot/iso/debian-live-amd64/vmlinuz-4.19.0-6-amd64 boot=live config timezone=Europe/Vienna locales=en_US.UTF-8 keyb=de noswap toram live-media-path=/boot/iso/debian-live-amd64
        initrd /boot/iso/debian-live-amd64/initrd.img-4.19.0-6-amd64
}

menuentry "Ubuntu 18.04 NetBoot amd64" {
        loopback loop /boot/iso/ubuntu-18.04-amd64.iso
        linux (loop)/linux --
        initrd (loop)/initrd.gz
}

menuentry "Clonezilla live clonezilla-live-2.6.4-10-amd64" {
        set isofile="/boot/iso/clonezilla-live-2.6.4-10-amd64.iso"
        loopback loop $isofile
        linux (loop)/live/vmlinuz boot=live live-config noswap ip=frommedia locales="en_US.UTF-8" keyboard-layouts="de" toram=filesystem.squashfs findiso=$isofile
        initrd (loop)/live/initrd.img
}

menuentry "GRML64 Small Testing Latest" {
        set isofile="/boot/iso/grml64-small_testing_latest.iso"
        loopback loop $isofile
        linux (loop)/boot/grml64small_testing/vmlinuz boot=live live-media-path=/live/grml64-small_testing/ toram findiso=$isofile lang=de ignore_bootid noswap ssh
        initrd (loop)/boot/grml64small_testing/initrd.img
}