Skip to content

Instantly share code, notes, and snippets.

@jamiekurtz
Last active December 12, 2025 14:14
Show Gist options
  • Select an option

  • Save jamiekurtz/26c46b3e594f8cdd453a to your computer and use it in GitHub Desktop.

Select an option

Save jamiekurtz/26c46b3e594f8cdd453a to your computer and use it in GitHub Desktop.

Revisions

  1. jamiekurtz revised this gist Jul 4, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions grub.cfg
    Original file line number Diff line number Diff line change
    @@ -64,8 +64,8 @@ menuentry 'ubuntu-14.04.2-desktop-amd64' {
    initrd (loop)/casper/initrd.lz
    }

    menuentry 'ubuntu-15.04.2-desktop-amd64' {
    set isofile='/boot/iso/ubuntu-14.04.2-desktop-amd64.iso'
    menuentry 'ubuntu-15.04-desktop-amd64' {
    set isofile='/boot/iso/ubuntu-15.04-desktop-amd64.iso'
    loopback loop $isofile
    linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=$isofile locale=en_US.UTF-8
    initrd (loop)/casper/initrd.lz
  2. jamiekurtz revised this gist Jul 4, 2015. 1 changed file with 7 additions and 0 deletions.
    7 changes: 7 additions & 0 deletions grub.cfg
    Original file line number Diff line number Diff line change
    @@ -64,6 +64,13 @@ menuentry 'ubuntu-14.04.2-desktop-amd64' {
    initrd (loop)/casper/initrd.lz
    }

    menuentry 'ubuntu-15.04.2-desktop-amd64' {
    set isofile='/boot/iso/ubuntu-14.04.2-desktop-amd64.iso'
    loopback loop $isofile
    linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=$isofile locale=en_US.UTF-8
    initrd (loop)/casper/initrd.lz
    }

    menuentry 'Fedora-Live-Workstation-x86_64-21-5' {
    set isofile='/boot/iso/Fedora-Live-Workstation-x86_64-21-5.iso'
    loopback loop $isofile
  3. jamiekurtz revised this gist May 14, 2015. 1 changed file with 13 additions and 6 deletions.
    19 changes: 13 additions & 6 deletions grub.cfg
    Original file line number Diff line number Diff line change
    @@ -22,21 +22,28 @@
    # This will completely wipe existing content on the USB stick!!
    # BE SURE TO USE CORRECT DEVICE PATH BELOW!!! Your USB stick might not be /dev/sdc1 !!
    # $ sudo umount /dev/sdc1
    # $ sudo dd if=multiboot.iso of=/dev/sdc1
    # $ sudo dd if=multiboot.iso of=/dev/sdc # (this will take a while!)
    # ...
    # Or two, if you don't want to completely wipe out your USB stick, you can do the following:
    # Or, two, if you don't want to completely wipe out your USB stick, you can do the following:
    # Copy the contents of the multiboot folder (created above) to a USB stick
    # Then run grub-install against the USB stick to install the grub bootloader - which will use the ISO files and grub.cfg file we just copied:
    # BE SURE TO USE CORRECT DEVICE PATH BELOW!!! Your USB stick might not be /dev/sdc1 !!
    # $ sudo umount /dev/sdc1
    # $ mkdir -p ~/mnt/usb
    # $ sudo mount /dev/sdc1 ~/mnt/usb
    # $ cp -r multiboot/boot ~/mnt/usb
    # $ sudo grub-install --boot-directory=~/mnt/usb/boot /dev/sdc1
    # $ mkdir -p /home/$USER/mnt/usb
    # $ sudo mount /dev/sdc2 /home/$USER/mnt/usb
    # $ sudo cp -r multiboot/boot /home/$USER/mnt/usb
    # $ (Fedora) sudo mv /home/$USER/mnt/usb/boot/grub /home/$USER/mnt/usb/boot/grub2
    # $ sudo grub-install --target=i386-pc --boot-directory=/home/$USER/mnt/usb/boot /dev/sdc
    # (that would be grub2-install on Fedora)
    # ...
    # Once the bootable USB stick is created, you can easily add/remove ISOs and simply update the grub.cfg file (i.e. no need to do this all over again)

    # Help with formatting USB stick:
    # $ sudo parted /dev/sdc rm 1
    # $ sudo parted /dev/sdc mklabel msdos
    # $ sudo parted /dev/sdc mkpart primary 0% 100%
    # $ sudo mkfs.vfat -F 32 -n MULTIBOOT /dev/sdc1



    set timeout=20
  4. jamiekurtz revised this gist May 13, 2015. 1 changed file with 43 additions and 8 deletions.
    51 changes: 43 additions & 8 deletions grub.cfg
    Original file line number Diff line number Diff line change
    @@ -1,13 +1,41 @@
    # This grub.cfg file was created by Jamie Kurtz
    # Detailed instructions for use will soon be found here: http://www.jamiekurtz.com
    # Simplified instructions below
    # Sample grub entries... https://wiki.archlinux.org/index.php/Multiboot_USB_drive
    # Goes into /boot/grub2 folder
    # Some tips here: http://www.pendrivelinux.com/boot-multiple-iso-from-usb-via-grub2-using-linux/
    # Inspiration from here: http://www.pendrivelinux.com/boot-multiple-iso-from-usb-via-grub2-using-linux/

    # use the instructions in link above to format a USB stick
    # on the USB stick, create /boot folder, with subfolders grub2 and iso
    # put ISO files in the ISO folder
    # install grub2 onto the USB stick using those instructions
    # place this file in the /boot/grub2 folder
    # Simplified instructions...
    # Make sure grub, grub-efi, and xorriso packages are installed and up-to-date
    # In your terminal go to directory where want to create the USB image contents
    # Run the following to create the necessary folder structure:
    # $ mkdir -p multiboot/boot/{grub,iso}
    # Copy ISOs into the new iso folder
    # Create grub.cfg in the boot/grub folder... for example:
    # $ wget https://gist.githubusercontent.com/jamiekurtz/26c46b3e594f8cdd453a/raw/grub.cfg -o multiboot/boot/grub/grub.cfg
    # Create the ISO image
    # (Debian/Ubuntu) $ grub-mkrescue -o multiboot.iso multiboot
    # (Fedora) $ grub2-mkrescue -o multiboot.iso multiboot
    # At this point you can use VirtualBox to boot a new virtual machine using that multiboot.iso file; this is great for testing your multiboot image
    # You now have two different choices for creating the USB stick itself...
    # ...
    # One, you can write the ISO file to a FAT32 formatted USB stick (after unmounting a USB stick that was recently inserted into the computer)
    # This will completely wipe existing content on the USB stick!!
    # BE SURE TO USE CORRECT DEVICE PATH BELOW!!! Your USB stick might not be /dev/sdc1 !!
    # $ sudo umount /dev/sdc1
    # $ sudo dd if=multiboot.iso of=/dev/sdc1
    # ...
    # Or two, if you don't want to completely wipe out your USB stick, you can do the following:
    # Copy the contents of the multiboot folder (created above) to a USB stick
    # Then run grub-install against the USB stick to install the grub bootloader - which will use the ISO files and grub.cfg file we just copied:
    # BE SURE TO USE CORRECT DEVICE PATH BELOW!!! Your USB stick might not be /dev/sdc1 !!
    # $ sudo umount /dev/sdc1
    # $ mkdir -p ~/mnt/usb
    # $ sudo mount /dev/sdc1 ~/mnt/usb
    # $ cp -r multiboot/boot ~/mnt/usb
    # $ sudo grub-install --boot-directory=~/mnt/usb/boot /dev/sdc1
    # (that would be grub2-install on Fedora)
    # ...
    # Once the bootable USB stick is created, you can easily add/remove ISOs and simply update the grub.cfg file (i.e. no need to do this all over again)



    @@ -50,9 +78,16 @@ menuentry "Try elementary OS without installing" {
    initrd (loop)/casper/initrd.lz
    }

    menuentry "linuxmint-17.1-xfce-64bit" {
    set isofile='/boot/iso/linuxmint-17.1-xfce-64bit.iso'
    loopback loop $isofile
    linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile live-config quiet splash noeject noprompt
    initrd (loop)/casper/initrd.lz
    }

    menuentry "gparted-live-0.22.0-1-i586" {
    set isofile="/boot/iso/gparted-live-0.22.0-1-i586.iso"
    loopback loop $isofile
    linux (loop)/live/vmlinuz boot=live username=user config components quiet noswap noeject findiso=$isofile toram=filesystem.squashfs nosplash
    initrd (loop)/live/initrd.img
    }
    }
  5. jamiekurtz revised this gist May 12, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion grub.cfg
    Original file line number Diff line number Diff line change
    @@ -53,6 +53,6 @@ menuentry "Try elementary OS without installing" {
    menuentry "gparted-live-0.22.0-1-i586" {
    set isofile="/boot/iso/gparted-live-0.22.0-1-i586.iso"
    loopback loop $isofile
    linux (loop)/live/vmlinuz boot=live config union=aufs noswap noprompt ip=frommedia toram=filesystem.squashfs findiso=$isofile
    linux (loop)/live/vmlinuz boot=live username=user config components quiet noswap noeject findiso=$isofile toram=filesystem.squashfs nosplash
    initrd (loop)/live/initrd.img
    }
  6. jamiekurtz revised this gist May 12, 2015. 1 changed file with 17 additions and 4 deletions.
    21 changes: 17 additions & 4 deletions grub.cfg
    Original file line number Diff line number Diff line change
    @@ -15,31 +15,44 @@ set timeout=20
    set default=0


    menuentry '[loopback]kali-linux-1.1.0-amd64' {
    menuentry 'kali-linux-1.1.0-amd64' {
    set isofile='/boot/iso/kali-linux-1.1.0a-amd64.iso'
    loopback loop $isofile
    linux (loop)/live/vmlinuz boot=live findiso=$isofile noconfig=sudo username=root hostname=kali
    initrd (loop)/live/initrd.img
    }

    menuentry '[loopback]ubuntu-14.04.2-desktop-amd64' {
    menuentry 'ubuntu-14.04.2-desktop-amd64' {
    set isofile='/boot/iso/ubuntu-14.04.2-desktop-amd64.iso'
    loopback loop $isofile
    linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=$isofile locale=en_US.UTF-8
    initrd (loop)/casper/initrd.lz
    }

    menuentry '[loopback]Fedora-Live-Workstation-x86_64-21-5' {
    menuentry 'Fedora-Live-Workstation-x86_64-21-5' {
    set isofile='/boot/iso/Fedora-Live-Workstation-x86_64-21-5.iso'
    loopback loop $isofile
    linux (loop)/isolinux/vmlinuz0 root=live:CDLABEL=Fedora-Live-WS-x86_64-21-5 iso-scan/filename=$isofile rd.live.image
    initrd (loop)/isolinux/initrd0.img
    }

    menuentry '[loopback]debian-live-8.0.0-amd64-cinnamon-desktop' {
    menuentry 'debian-live-8.0.0-amd64-cinnamon-desktop' {
    set isofile='/boot/iso/debian-live-8.0.0-amd64-cinnamon-desktop.iso'
    loopback loop $isofile
    linux (loop)/live/vmlinuz boot=live config findiso=$isofile
    initrd (loop)/live/initrd.img
    }

    menuentry "Try elementary OS without installing" {
    set isofile='/boot/iso/elementaryos-freya-amd64.20150411.iso'
    loopback loop $isofile
    linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile quiet splash --
    initrd (loop)/casper/initrd.lz
    }

    menuentry "gparted-live-0.22.0-1-i586" {
    set isofile="/boot/iso/gparted-live-0.22.0-1-i586.iso"
    loopback loop $isofile
    linux (loop)/live/vmlinuz boot=live config union=aufs noswap noprompt ip=frommedia toram=filesystem.squashfs findiso=$isofile
    initrd (loop)/live/initrd.img
    }
  7. jamiekurtz revised this gist May 10, 2015. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions grub.cfg
    Original file line number Diff line number Diff line change
    @@ -14,15 +14,16 @@
    set timeout=20
    set default=0


    menuentry '[loopback]kali-linux-1.1.0-amd64' {
    set isofile='/boot/iso/kali-linux-1.1.0a-amd64.iso'
    loopback loop $isofile
    linux (loop)/live/vmlinuz boot=live findiso=$isofile noconfig=sudo username=root hostname=kali
    initrd (loop)/live/initrd.img
    }

    menuentry '[loopback]ubuntu-14.04.2-server-amd64' {
    set isofile='/boot/iso/ubuntu-14.04.2-server-amd64.iso'
    menuentry '[loopback]ubuntu-14.04.2-desktop-amd64' {
    set isofile='/boot/iso/ubuntu-14.04.2-desktop-amd64.iso'
    loopback loop $isofile
    linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=$isofile locale=en_US.UTF-8
    initrd (loop)/casper/initrd.lz
  8. jamiekurtz revised this gist May 1, 2015. 1 changed file with 16 additions and 1 deletion.
    17 changes: 16 additions & 1 deletion grub.cfg
    Original file line number Diff line number Diff line change
    @@ -3,8 +3,15 @@
    # Goes into /boot/grub2 folder
    # Some tips here: http://www.pendrivelinux.com/boot-multiple-iso-from-usb-via-grub2-using-linux/

    # use the instructions in link above to format a USB stick
    # on the USB stick, create /boot folder, with subfolders grub2 and iso
    # put ISO files in the ISO folder
    # install grub2 onto the USB stick using those instructions
    # place this file in the /boot/grub2 folder

    set timeout=10


    set timeout=20
    set default=0

    menuentry '[loopback]kali-linux-1.1.0-amd64' {
    @@ -27,3 +34,11 @@ menuentry '[loopback]Fedora-Live-Workstation-x86_64-21-5' {
    linux (loop)/isolinux/vmlinuz0 root=live:CDLABEL=Fedora-Live-WS-x86_64-21-5 iso-scan/filename=$isofile rd.live.image
    initrd (loop)/isolinux/initrd0.img
    }

    menuentry '[loopback]debian-live-8.0.0-amd64-cinnamon-desktop' {
    set isofile='/boot/iso/debian-live-8.0.0-amd64-cinnamon-desktop.iso'
    loopback loop $isofile
    linux (loop)/live/vmlinuz boot=live config findiso=$isofile
    initrd (loop)/live/initrd.img
    }

  9. jamiekurtz created this gist Apr 28, 2015.
    29 changes: 29 additions & 0 deletions grub.cfg
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,29 @@
    # This grub.cfg file was created by Jamie Kurtz
    # Sample grub entries... https://wiki.archlinux.org/index.php/Multiboot_USB_drive
    # Goes into /boot/grub2 folder
    # Some tips here: http://www.pendrivelinux.com/boot-multiple-iso-from-usb-via-grub2-using-linux/


    set timeout=10
    set default=0

    menuentry '[loopback]kali-linux-1.1.0-amd64' {
    set isofile='/boot/iso/kali-linux-1.1.0a-amd64.iso'
    loopback loop $isofile
    linux (loop)/live/vmlinuz boot=live findiso=$isofile noconfig=sudo username=root hostname=kali
    initrd (loop)/live/initrd.img
    }

    menuentry '[loopback]ubuntu-14.04.2-server-amd64' {
    set isofile='/boot/iso/ubuntu-14.04.2-server-amd64.iso'
    loopback loop $isofile
    linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=$isofile locale=en_US.UTF-8
    initrd (loop)/casper/initrd.lz
    }

    menuentry '[loopback]Fedora-Live-Workstation-x86_64-21-5' {
    set isofile='/boot/iso/Fedora-Live-Workstation-x86_64-21-5.iso'
    loopback loop $isofile
    linux (loop)/isolinux/vmlinuz0 root=live:CDLABEL=Fedora-Live-WS-x86_64-21-5 iso-scan/filename=$isofile rd.live.image
    initrd (loop)/isolinux/initrd0.img
    }