Skip to content

Instantly share code, notes, and snippets.

@amitwh
Forked from Pysis868/grub.cfg
Created September 2, 2018 09:33
Show Gist options
  • Save amitwh/95d00b80d9d88e454b4a3dff6af1e71a to your computer and use it in GitHub Desktop.
Save amitwh/95d00b80d9d88e454b4a3dff6af1e71a to your computer and use it in GitHub Desktop.

Revisions

  1. @Pysis868 Pysis868 revised this gist Jun 15, 2017. 1 changed file with 269 additions and 335 deletions.
    604 changes: 269 additions & 335 deletions grub.cfg
    Original file line number Diff line number Diff line change
    @@ -6,8 +6,8 @@

    # This grub.cfg file was created by Lance http://www.pendrivelinux.com
    # Suggested Entries and the suggestor, if available, will also be noted.

    # and then improved by Pysis.

    # Improvement Sources:
    # https://www.pendrivelinux.com/boot-multiple-iso-from-usb-via-grub2-using-linux/
    # Used GRUB2 with command `grub2-install` instead, along with the `--boot-directory` parameter.
    @@ -19,19 +19,26 @@
    # https://gist.github.com/yeahunter/9eca12b3db064e5dc23b
    # https://gist.github.com/jeekl/5564476
    # https://wiki.archlinux.org/index.php/Multiboot_USB_drive
    # and this one. How did I forget about these!!!!
    # https://help.ubuntu.com/community/Grub2/ISOBoot/Examples
    # Seems to be a gold mine for my purposes!!
    # http://www.coreboot.org/GRUB2
    # http://www.backtrack-linux.org/forums/showthread.php?t=42722
    # http://www.linuxdevcenter.com/pub/a/linux/excerpts/9780596100797/kernel-boot-command-line-parameter-reference.html
    # https://wiki.archlinux.org/index.php/Grub2

    # Notes:
    # - For variables, be sure to use double-quotes to have them actually resolve in the string.
    # - Need to re-declare variables inside sub-menus because they open a new "context"..... great..
    # Source: https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1175127

    # Great GRUB2 Reference: http://www.dedoimedo.com/computers/grub-2.html
    # Linting:
    # - Make sure every 'submenu' command contains 3 periods at the end, connected to the main content string's last charcter

    # "OS" being referred specifically to when the image/booted environment is expected to or can be used for general computing tasks, and not just repair/maintenance/inspection of another.
    # TODO:
    # - Separate different types of booting options into more grub config files, if possible. Look into it.

    # Great GRUB2 Reference: http://www.dedoimedo.com/computers/grub-2.html

    # Timeout for menu
    set timeout=20
    @@ -43,35 +50,13 @@ set isoPath="/ISOs"
    set linuxPath="$isoPath/Linux"
    set toolPath="$isoPath/Tools"
    set memdiskPath="/boot/memdisk"
    set grub4dosPath="/boot/grub.exe"

    # Menu Colours
    set menu_color_normal=white/black
    set menu_color_highlight=white/cyan

    # https://docs.fedoraproject.org/en-US/Fedora/19/html/Installation_Guide/ap-admin-options.html

    # Adapted from $iso/isolinux.grub.conf
    menuentry "TEST Fedora-Workstation-Live-x86_64-25-1.3 TEST" {
    set isofile="$linuxPath/Fedora-Workstation-Live-x86_64-25-1.3.iso"
    loopback loop "$isofile"
    linux (loop)/isolinux/vmlinuz root=live:CDLABEL=Fedora-S-dvd-x86_64-25 iso-scan/filename=$isofile rd.shell
    # append initrd=initrd.img inst.stage2=hd:LABEL=Fedora-S-dvd-x86_64-25 quiet
    initrd (loop)/isolinux/initrd.img # dracut-initqueue timeout looping errors
    }

    menuentry "TEST Fedora-Workstation-Live-x86_64-25-1.3 TEST 2" {
    set isofile="$linuxPath/Fedora-Workstation-Live-x86_64-25-1.3.iso"
    loopback loop "$isofile"
    set root=(loop)
    # linux (loop)/isolinux/vmlinuz root=live:CDLABEL=Fedora-WS-Live-25-1-3 rd.live.image quiet
    # linux (loop)/isolinux/vmlinuz root=UUID="2016-11-15-22-03-09-00" rootfstype=vfat ro rd.live.image quiet rhgb rd.luks=0 rd.md=0 rd.dm=0
    linux (loop)/isolinux/vmlinuz iso-scan/filename="$isofile" rootfstype=vfat ro rd.live.image quiet rhgb rd.luks=0 rd.md=0 rd.dm=0
    # linux (loop)/isolinux/vmlinuz root=CDLABEL=Fedora-WS-Live-25-1-3 rd.live.image quiet
    initrd (loop)/isolinux/initrd.img
    }


    submenu "OS Full installations..." {
    submenu "Local OS installations..." {

    submenu "Elementary OS..." {

    @@ -100,151 +85,90 @@ submenu "OS Full installations..." {

    }

    submenu "OS Live Images..." {
    submenu "Linux-based OS Live/Install Images..." {

    submenu "Linux Distros..." {
    set isoPath="/ISOs"
    set linuxPath="$isoPath/Linux"

    ## Ubuntu-based distros

    menuentry "Elementary OS 20130810 x64" {
    set isofile="$linuxPath/elementaryos-stable-amd64.20130810.iso"
    loopback loop $isofile
    linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile quiet splash --
    initrd (loop)/casper/initrd.lz
    }
    menuentry "Linux Mint 17.2 x64" {
    set isofile="$linuxPath/linuxmint-17.2-mate-64bit.iso"
    loopback loop $isofile
    linux (loop)/casper/vmlinuz file=/cdrom/preseed/mint.seed boot=casper initrd=/casper/initrd.lz iso-scan/filename=$isofile noeject noprompt splash --
    initrd (loop)/casper/initrd.lz
    }

    submenu "Fedora..." {
    set isoPath="/ISOs"
    set linuxPath="$isoPath/Linux"

    ## Ubuntu-based distros

    menuentry "Elementary OS 20130810 x64" {
    set isofile="$linuxPath/elementaryos-stable-amd64.20130810.iso"
    # https://docs.fedoraproject.org/en-US/Fedora/19/html/Installation_Guide/ap-admin-options.html

    menuentry 'Fedora Workstation Live 64-bit 25 (1.3)' {
    set isofile="$linuxPath/Fedora-Workstation-Live-x86_64-25-1.3.iso"
    loopback loop "$isofile"
    linux (loop)/isolinux/vmlinuz root=live:CDLABEL=Fedora-WS-Live-25-1-3 iso-scan/filename="$isofile" rd.live.image quiet
    initrd (loop)/isolinux/initrd.img
    }

    menuentry 'Fedora Server 64-bit 25 (1.3) Doesn"t Work' {
    set isofile="$linuxPath/Fedora-Server-dvd-x86_64-25-1.3.iso"
    loopback loop "$isofile"
    linux (loop)/isolinux/vmlinuz inst.stage2=hd:LABEL=Fedora-S-dvd-x86_64-25 iso-scan/filename="$isofile" quiet
    initrd (loop)/isolinux/initrd.img
    }

    menuentry 'Fedora Workstation Live 64-bit 25 (1.3)' {
    set isofile="$linuxPath/Fedora-Workstation-Live-x86_64-25-1.3.iso"
    loopback loop "$isofile"
    linux (loop)/isolinux/vmlinuz inst.stage2=live:CDLABEL=Fedora-WS-Live-25-1-3 iso-scan/filename="$isofile" rd.live.image quiet
    initrd (loop)/isolinux/initrd.img
    }
    }

    submenu "(X/L)Ubuntu..." {
    set isoPath="/ISOs"
    set linuxPath="$isoPath/Linux"

    menuentry "Ubuntu 16.10 Minimal" {
    set isofile="$linuxPath/ubuntu-16.10-mini"
    loopback loop $isofile
    linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile quiet splash --
    initrd (loop)/casper/initrd.lz
    # linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile locale=en_US.UTF-8
    # linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile liveimg noprompt noeject quiet splash --
    linux (loop)/linux boot=casper iso-scan/filename=$isofile locale=en_US.UTF-8
    # initrd (loop)/casper/initrd.lz
    initrd (loop)/initrd.gz
    }
    menuentry "Linux Mint 17.2 x64" {
    set isofile="$linuxPath/linuxmint-17.2-mate-64bit.iso"
    menuentry "ubuntu-15.04-desktop-amd64" {
    set isofile="$linuxPath/ubuntu-15.04-desktop-amd64.iso"
    loopback loop $isofile
    linux (loop)/casper/vmlinuz file=/cdrom/preseed/mint.seed boot=casper initrd=/casper/initrd.lz iso-scan/filename=$isofile noeject noprompt splash --
    linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=$isofile locale=en_US.UTF-8
    initrd (loop)/casper/initrd.lz
    }

    submenu "Fedora..." {
    set isoPath="/ISOs"
    set linuxPath="$isoPath/Linux"

    menuentry "Fedora-Workstation-Live-x86_64-25-1.3" {
    set isofile="$linuxPath/Fedora-Workstation-Live-x86_64-25-1.3.iso"
    loopback loop $isofile
    linux (loop)/isolinux/vmlinuz root=live:CDLABEL=Fedora-Live-WS-x86_64-21-5 iso-scan/filename=$isofile rd.live.image
    initrd (loop)/isolinux/initrd.img
    }
    # Adapted from $iso/isolinux.grub.conf
    menuentry "Fedora-Server-dvd-x86_64-25-1.3" {
    set isofile="$linuxPath/Fedora-Server-dvd-x86_64-25-1.3.iso"
    loopback loop $isofile
    linux (loop)/isolinux/vmlinuz root=live:CDLABEL=Fedora-S-dvd-x86_64-25 iso-scan/filename=$isofile rd.live.image
    initrd (loop)/isolinux/initrd.img # dracut-initqueue timeout looping errors
    }
    # Adapted from $iso/isolinux.grub.conf
    menuentry "Fedora-Server-dvd-x86_64-25-1.3 2" {
    set isofile="$linuxPath/Fedora-Server-dvd-x86_64-25-1.3.iso"
    loopback loop $isofile
    linux (loop)/isolinux/vmlinuz root=live:CDLABEL=Fedora-S-dvd-x86_64-25 iso-scan/filename=$isofile rd.live.image quiet
    initrd (loop)/isolinux/initrd.img # dracut-initqueue timeout looping errors
    }
    # Adapted from $iso/isolinux.grub.conf
    # Changed CDLABEL
    menuentry "Fedora-Server-dvd-x86_64-25-1.3 3" {
    set isofile="$linuxPath/Fedora-Server-dvd-x86_64-25-1.3.iso"
    loopback loop $isofile
    linux (loop)/isolinux/vmlinuz root=live:CDLABEL=Fedora-Server-dvd-x86_64-25-1.3 iso-scan/filename=$isofile rd.live.image quiet
    initrd (loop)/isolinux/initrd.img # dracut-initqueue timeout looping errors
    }
    menuentry "Fedora-Server-dvd-x86_64-25-1.3 4" {
    set isofile="$linuxPath/Fedora-Server-dvd-x86_64-25-1.3.iso"
    loopback loop $isofile
    linux16 (loop)/isolinux/vmlinuz root=live:CDLABEL=Fedora-S-dvd-x86_64-25 iso-scan/filename=$isofile rd.live.image
    initrd16 (loop)/isolinux/initrd.img # dracut-initqueue timeout looping errors
    }
    # https://ask.fedoraproject.org/en/question/33055/boot-fedora-20-from-iso/?answer=60554#post-id-60554
    menuentry "Fedora-Server-dvd-x86_64-25-1.3 5" {
    insmod loopback
    set isofile="$linuxPath/Fedora-Server-dvd-x86_64-25-1.3.iso"
    loopback loop $isofile
    linux (loop)/isolinux/vmlinuz iso-scan/filename=$isofile root=live:CDLABEL=Fedora-S-dvd-x86_64-25 rootfstype=auto ro rd.live.image quiet rhgb rd.luks=0 rd.md=0 rd.dm=0
    initrd (loop)/isolinux/initrd.img
    }
    # https://ask.fedoraproject.org/en/question/33055/boot-fedora-20-from-iso/?answer=36242#post-id-36242
    menuentry "Fedora-Server-dvd-x86_64-25-1.3 6" {
    set isofile="$linuxPath/Fedora-Server-dvd-x86_64-25-1.3.iso"
    loopback loop $isofile
    linux (loop)/isolinux/vmlinuz inst.stage2=hd:UUID="2016-11-15-22-03-09-00" noeject iso-scan/filename=$iso_path
    initrd (loop)/isolinux/initrd.img
    }
    menuentry "Fedora-Atomic-ostree-x86_64-25-20170215.1" {
    echo "WIP..."
    set isofile="$linuxPath/Fedora-Atomic-ostree-x86_64-25-20170215.1.iso"
    loopback loop $isofile
    linux (loop)/isolinux/vmlinuz root=live:CDLABEL=Fedora-Atomic-ostree-x86_64-25-20170215.1 iso-scan/filename=$isofile rd.live.image # /dev/mapper/live-rw does not exist error
    #linux (loop)/isolinux/vmlinuz root=live:CDLABEL=Fedora-Atomic-ostree-x86_64-25-20170215.1 iso-scan/filename=$isofile rd.live.image ro liveimg # Guru Meditation error
    # linux (loop)/isolinux/vmlinuz root=live:CDLABEL=Fedora-Atomic-ostree-x86_64-25-20170215.1 iso-scan/filename=$isofile rd.live.image ro liveimg # dracut-initqueue timeout looping errors # /dev/mapper/live-rw does not exist error
    initrd (loop)/isolinux/initrd.img
    boot
    }
    menuentry "Fedora-Atomic-ostree-x86_64-25-20170215.1 2" {
    set isofile="$linuxPath/Fedora-Atomic-ostree-x86_64-25-20170215.1.iso"
    loopback loop $isofile
    linuxefi (loop)/images/pxeboot/vmlinuz inst.stage2=hd:LABEL=Fedora-Atomic-ostree-x86_64-25 quiet
    initrdefi (loop)/images/pxeboot/initrd.img
    }
    menuentry "Fedora-Atomic-ostree-x86_64-25-20170215.1 3" {
    set isofile="$linuxPath/Fedora-Atomic-ostree-x86_64-25-20170215.1.iso"
    loopback loop $isofile
    insmod part_msdos
    insmod xfs
    insmod lvm
    set root='(loop)'
    #chainloader +1
    #configfile (loop)/isolinux/grub.conf
    configfile (loop)/EFI/BOOT/grub.cfg
    }
    }

    submenu "Ubuntu..." {
    set isoPath="/ISOs"
    set linuxPath="$isoPath/Linux"

    menuentry "Ubuntu 16.10 Minimal" {
    set isofile="$linuxPath/ubuntu-16.10-mini.iso"
    loopback loop $isofile
    # linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile locale=en_US.UTF-8
    # linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile liveimg noprompt noeject quiet splash --
    linux (loop)/linux boot=casper iso-scan/filename=$isofile locale=en_US.UTF-8
    # initrd (loop)/casper/initrd.lz
    initrd (loop)/initrd.gz
    }
    menuentry "ubuntu-15.04-desktop-amd64.iso" {
    set isofile="$linuxPath/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
    }
    menuentry "ubuntu-15.04-server-amd64.iso" {
    set isofile="$linuxPath/ubuntu-15.04-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 "Ubuntu 10.10 Desktop ISO 64-bit" {
    # loopback loop /ubuntu1064.iso
    # linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/ubuntu1064.iso noeject noprompt splash --
    # initrd (loop)/casper/initrd.lz
    # }
    menuentry "ubuntu-16.10-server-amd64" {
    set isofile="$linuxPath/ubuntu-16.10-server-amd64.iso"
    loopback loop $isofile
    linux (loop)/install/vmlinuz boot=casper iso-scan/filename=$isofile locale=en_US.UTF-8
    initrd (loop)/install/initrd.gz
    }

    menuentry "Xbuntu 14.04 Beta - 64bit" {
    set isofile="$linuxPath/xubuntu-15.04-desktop-amd64.iso"
    loopback loop $isofile
    linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile noprompt noeject splash --
    linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=$isofile noprompt noeject splash --
    initrd (loop)/casper/initrd.lz
    }

    ## Other desktop distros

    }

    ## Other desktop distros

    # submenu "Debian..." {
    # menuentry "Debian 7.0 Wheezy AMD64 Installer (netinst, firmware)" {
    # set isofile="$linuxPath/debian-7.0.0-amd64-firmware-netinst.iso"
    @@ -261,14 +185,17 @@ submenu "OS Live Images..." {
    # }
    # }

    ## Minimal resource-focused distros
    ## Minimal resource-focused distros

    menuentry "CorePlus ISO" {
    set isofile="$linuxPath/CorePlus-current.iso"
    loopback loop $isofile
    linux (loop)/boot/bzImage --
    initrd (loop)/boot/tinycore.gz
    }
    menuentry "CorePlus ISO" {
    set isofile="$linuxPath/CorePlus-current.iso"
    loopback loop $isofile
    #linux (loop)/boot/bzImage --
    linux (loop)/boot/vmlinuz --
    # Add ' loglevel=3 cde showapps desktop=flwm_topside' ?
    #initrd (loop)/boot/tinycore.gz
    initrd (loop)/boot/core.gz
    }
    # menuentry "CorePlus (Variant 2)" {
    # set isofile="$linuxPath/COREPLUS"
    # loopback loop $isofile
    @@ -284,124 +211,109 @@ submenu "OS Live Images..." {
    # #initrd (loop)/boot/tinycore.gz
    # initrd (loop)/boot/core.gz
    # }

    # Source: https://wiki.archlinux.org/index.php/Multiboot_USB_drive#Arch_Linux_monthly_release
    # Installing from USB: "You must specify the filesystem type for loop0"
    # - https://bbs.archlinux.org/viewtopic.php?id=212871
    # ~ https://bbs.archlinux.org/viewtopic.php?id=226410
    # https://askubuntu.com/questions/143718/mount-you-must-specify-the-filesystem-type#comment172573_143723

    # https://bbs.archlinux.org/viewtopic.php?pid=1620387#p1620387
    menuentry 'Arch Linux x64 2017-06-01' {
    set isofile="$linuxPath/archlinux-2017.06.01-x86_64.iso"
    loopback loop "$isofile"

    menuentry "ArchLinux x86_64" {
    set isofile="$linuxPath/archlinux-2015.08.01-dual.iso"
    loopback loop $isofile
    linux (loop)/arch/boot/x86_64/vmlinuz archisolabel=ARCH_201406 img_dev=/dev/disk/by-label/UNJEB img_loop=$isofile earlymodules=loop
    initrd (loop)/arch/boot/x86_64/archiso.img
    }

    menuentry "CentOS 6 x86_64 minimal" {
    set isofile="$linuxPath/CentOS-7-x86_64-Minimal-1503-01.iso"
    loopback loop $isofile
    linux (loop)/isolinux/vmlinuz noeject inst.stage2=hd:LABEL=UNJEB:/$isofile
    initrd (loop)/isolinux/initrd.img
    }
    menuentry "CentOS 6 x86_64 minimal with basic video driver" {
    set isofile="$linuxPath/CentOS-7-x86_64-Minimal-1503-01.iso"
    loopback loop $iso
    linux (loop)/isolinux/vmlinuz noeject inst.stage2=hd:LABEL=UNJEB:/$isofile xdriver=vesa nomodset askmethod
    initrd (loop)/isolinux/initrd.img
    }
    # Leftover, unused kernel boot options that may be helpful later on.
    # video=efifb fbdev noefi single
    # archisolabel=ARCH_201508
    # archisobasedir=arch
    # archisodevice=/dev/loop0

    menuentry "Damn Small Linux" {
    echo "Doesn't work yet"'!';
    # Maybe try this instead later: https://gist.github.com/oxplot/2041319
    # set isofile="$linuxPath/..."
    linux16 /boot/bootdistro/damnsmall/isolinux/linux24 knoppix_dir=damnsmall ramdisk_size=100000 lang=en apm=power-off nomce noapic quiet BOOT_IMAGE=knoppix
    initrd16 /boot/bootdistro/damnsmall/isolinux/minirt24.gz
    }
    linux (loop)/arch/boot/x86_64/vmlinuz img_dev=/dev/sda1 img_loop=$isofile earlymodules=loop
    initrd (loop)/arch/boot/x86_64/archiso.img
    }

    menuentry "CentOS 6 x86_64 minimal" {
    set isofile="$linuxPath/CentOS-7-x86_64-Minimal-1503-01.iso"
    loopback loop $isofile
    linux (loop)/isolinux/vmlinuz noeject inst.stage2=hd:LABEL=UNJEB:/$isofile
    initrd (loop)/isolinux/initrd.img
    }
    menuentry "CentOS 6 x86_64 minimal with basic video driver" {
    set isofile="$linuxPath/CentOS-7-x86_64-Minimal-1503-01.iso"
    loopback loop $iso
    linux (loop)/isolinux/vmlinuz noeject inst.stage2=hd:LABEL=UNJEB:/$isofile xdriver=vesa nomodset askmethod
    initrd (loop)/isolinux/initrd.img
    }

    menuentry "Damn Small Linux" {
    echo "Doesn't work yet"'!';
    # Maybe try this instead later: https://gist.github.com/oxplot/2041319
    # set isofile="$linuxPath/..."
    linux16 /boot/bootdistro/damnsmall/isolinux/linux24 knoppix_dir=damnsmall ramdisk_size=100000 lang=en apm=power-off nomce noapic quiet BOOT_IMAGE=knoppix
    initrd16 /boot/bootdistro/damnsmall/isolinux/minirt24.gz
    }

    ## Administrative- / Recovery- focused distros
    # menuentry "Knoppix" {
    # set isofile="$linuxPath/knoppix.iso"
    # }
    menuentry "Boot Finnix 109 (64-bit)" {
    set isofile="$linuxPath/finnix-111.iso"
    loopback loop $isofile
    linux (loop)/boot/x86/linux64 findiso=$isofile vga=791 nomodeset quiet --
    initrd (loop)/boot/x86/initrd.xz
    }
    menuentry "Boot Finnix 109 (64-bit, text mode)" {
    set isofile="$linuxPath/finnix-111.iso"
    loopback loop $isofile
    linux /boot/x86/linux64 findiso=$isofile vga=normal nomodeset quiet --
    initrd /boot/x86/initrd.xz
    }
    ## Administrative- / Recovery- focused distros

    # menuentry "Knoppix" {
    # set isofile="$linuxPath/knoppix.iso"
    # }

    menuentry "Boot Finnix 109 (64-bit)" {
    set isofile="$linuxPath/finnix-111.iso"
    loopback loop $isofile
    linux (loop)/boot/x86/linux64 findiso=$isofile vga=791 nomodeset quiet --
    initrd (loop)/boot/x86/initrd.xz
    }
    menuentry "Boot Finnix 109 (64-bit, text mode)" {
    set isofile="$linuxPath/finnix-111.iso"
    loopback loop $isofile
    linux /boot/x86/linux64 findiso=$isofile vga=normal nomodeset quiet --
    initrd /boot/x86/initrd.xz
    }

    menuentry "GRML - the sysadmins best friend" {
    set isofile="$linuxPath/grml96-full_2014.11.iso"
    loopback loop "$isofile"
    set root=(loop)
    configfile /boot/grub/loopback.cfg
    }
    # https://github.com/grml/grml-live/blob/3ac646b41e6ce3aa58ff914bf2ba5d52d157d125/templates/boot/grub/%25SHORT_NAME%25_default.cfg
    menuentry "grml64-full - copy Grml to RAM" {
    set isofile="$linuxPath/grml96-full_2014.11.iso"
    loopback loop "$isofile"
    set root=(loop)
    set gfxpayload=keep
    echo 'Loading kernel...'
    linux (loop)/boot/grml64full/vmlinuz apm=power-off boot=live nomce net.ifnames=0 "${loopback}" "${kernelopts}" toram=grml64-full.squashfs live-media-path="(loop)/live/grml64-full/" bootid=0fdfb62c-40af-40b9-9387-014232eb1f74
    echo 'Loading initrd...'
    initrd (loop)/boot/grml64full/initrd.img
    }
    menuentry "GRML - the sysadmins best friend" {
    set isofile="$linuxPath/grml96-full_2014.11.iso"
    loopback loop "$isofile"
    set root=(loop)
    configfile /boot/grub/loopback.cfg
    }

    # https://github.com/grml/grml-live/blob/3ac646b41e6ce3aa58ff914bf2ba5d52d157d125/templates/boot/grub/%25SHORT_NAME%25_default.cfg
    menuentry "grml64-full - copy Grml to RAM" {
    set isofile="$linuxPath/grml96-full_2014.11.iso"
    loopback loop "$isofile"
    set root=(loop)
    set gfxpayload=keep
    echo 'Loading kernel...'
    linux (loop)/boot/grml64full/vmlinuz apm=power-off boot=live nomce net.ifnames=0 "${loopback}" "${kernelopts}" toram=grml64-full.squashfs live-media-path="(loop)/live/grml64-full/" bootid=0fdfb62c-40af-40b9-9387-014232eb1f74
    echo 'Loading initrd...'
    initrd (loop)/boot/grml64full/initrd.img
    }

    ## Pentesting distros
    ## Pentesting distros

    menuentry "kali-linux-1.1.0a-amd64" {
    set isofile="$linuxPath/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 "kali-linux-1.1.0a-amd64" {
    set isofile="$linuxPath/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
    }
    # Will leave commented out and unusued, but still referenced; Using Kali instead.
    # menuentry "BackTrack 5" {
    # loopback loop /BT5-GNOME-64.iso
    # linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/BT5-GNOME-64.iso noeject noprompt splash --
    # initrd (loop)/casper/initrd.lz
    # }

    ## Anonymous distros
    ## Anonymous distros

    menuentry "TAILS - The Amnesic Incognito Live System" {
    set isofile="$linuxPath/tails-i386-0.17.2.iso"
    loopback loop $isofile
    linux (loop)/live/vmlinuz boot=live config live-media=removable nopersistent noprompt quiet timezone=America/New_York block.events_dfl_poll_msecs=1000 splash nox11autologin module=Tails findiso=$isofile quiet_
    initrd (loop)/live/initrd.img
    }
    }

    submenu "DOS/Windows..." {

    set isoPath="/ISOs";

    # menuentry "win7" {
    # loopback loop "$isoPath/win7.iso"
    # chainloader (loop)
    # }

    submenu "MS-DOS..." {

    set isoPath="/ISOs";
    set dosWinPath="$isoPath/Dos-Win";

    menuentry "MS-DOS" {
    set isofile="$dosWinPath/DOS6.22_bootdisk.iso"
    set gfxpayload=text
    linux16 "$memdiskPath" raw
    initrd16 "$isofile"
    }
    menuentry "MS-DOS 2" {
    set isofile="$dosWinPath/DOS6.22_bootdisk.iso"
    linux16 "$memdiskPath" bigraw
    initrd16 "$isofile"
    }
    }
    menuentry "TAILS - The Amnesic Incognito Live System" {
    set isofile="$linuxPath/tails-i386-0.17.2.iso"
    loopback loop $isofile
    linux (loop)/live/vmlinuz boot=live config live-media=removable nopersistent noprompt quiet timezone=America/New_York block.events_dfl_poll_msecs=1000 splash nox11autologin module=Tails findiso=$isofile quiet_
    initrd (loop)/live/initrd.img
    }
    }

    @@ -442,25 +354,19 @@ submenu "Utils..." {

    # If I want direct access to TestDisk/PhotoRec, maybe look into bundling FreeDOS to run them: http://www.cgsecurity.org/wiki/Create_a_TestDisk_FreeDos_LiveCD

    submenu "GPartEd... (None work yet)" {
    set isoPath="/ISOs";
    set toolPath="$isoPath/Tools";

    menuentry "GPartEd Live 0.28.1-1 amd64 (Doesn't work yet)" {
    # Error: <in screen shot> mounting aufs on /root/ failed: No such device
    set isofile="$toolPath/gparted-live-0.28.1-1-amd64.iso"
    # set gfxpayload=text
    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
    }
    menuentry "GPartEd Live 0.28.1-1 amd64 2 (Doesn't work yet)" {
    # Error: <in screen shot> mounting aufs on /root/ failed: No such device
    set isofile="$toolPath/gparted-live-0.28.1-1-amd64.iso"
    loopback loop $isofile
    linux (loop)/live/vmlinuz boot=live config union=aufs noswap noprompt vga=788 ip=frommedia toram=filesystem.squashfs findiso="$isofile"
    initrd (loop)/live/initrd.img
    }
    # Source: https://help.ubuntu.com/community/Grub2/ISOBoot/Examples#Gparted
    menuentry 'GParted 64-bit ISO' {
    #set gfxpayload=text # ~= vga='normal'
    # isofile_abspath is relative to LiveUSB root.
    set isofile_abspath="$toolPath/gparted-live-0.28.1-1-amd64.iso"
    # isofile_devpath is relative to (and begins with) '/dev'
    set isofile_devpath="${devroot}${isofile_abspath}"
    # "mount" the ISO
    loopback loop "(${root})${isofile_abspath}"
    # Following (single!) line adapted from https://wiki.archlinux.org/index.php/Multiboot_USB_drive#GParted_Live
    linux '(loop)/live/vmlinuz' boot='live' union='overlay' username='user' config components noswap noeject toram='filesystem.squashfs' ip='' nosplash findiso="${isofile_abspath}"
    # start RAMdisk from device=loop
    initrd '(loop)/live/initrd.img'
    }

    #menuentry "Parted Magic" {
    @@ -539,7 +445,7 @@ submenu "Utils..." {

    # Source: dann.com.br...
    menuentry "Hiren's boot CD using grub.exe" {
    set dosGRUBPath="/boot/grub.exe";
    set dosGRUBPath="$grub4dosPath";
    set hbcdPath="$toolPath/HBCD";
    set menuLstPath="$hbcdPath/menu.lst";
    set isofile="$toolPath/Hiren's.BootCD.15.2.iso"
    @@ -562,34 +468,12 @@ submenu "Utils..." {
    #}
    #menuentry "UBCD with grub4dos" {
    # set isofile="$toolPath/ubcd502.iso"
    # linux16 /grub.exe --config-file="map (rd) (hd32); map --hook; root (hd32); chainloader (hd32);"
    # linux16 "$grub4dosPath" --config-file="map (rd) (hd32); map --hook; root (hd32); chainloader (hd32);"
    # initrd $isofile
    #}

    submenu "Windows PE..." {

    menuentry "WinPE 1a" {
    set root=(hd0,msdos5)
    boot
    }

    menuentry "WinPE 1b" {
    set root=(hd0,msdos5)
    chainloader +1
    }

    menuentry "WinPE 2" {
    rootnoverify (hd0,msdos5)
    chainloader +1
    }
    }
    }

    #menuentry "Grub4dos"{
    # linux /grub4dos/grub.exe
    #}

    menuentry 'Scan for OS on internal HDD' {
    menuentry "Scan for OS on internal HDD (Untested)" {
    insmod regexp
    insmod ahci
    insmod part_msdos
    @@ -609,46 +493,96 @@ menuentry 'Scan for OS on internal HDD' {
    done
    }

    menuentry '(Attempt to) Run Windows 7 Ultimate 64-bit Installer' {
    #insmod part_msdos
    #insmod ntfs
    set root='(hd0,msdos5)'
    #search --no-floppy --fs-uuid --set=root 01D0DC21970FC910
    #drivemap -s (hd0) ${root}
    chainloader +1
    boot
    }
    submenu "DOS/Windows (Doesn't work)..." {

    menuentry "(Attempt to) Microsoft Windows x86_64 UEFI-GPT Setup" {
    insmod usbms
    insmod part_gpt
    insmod part_msdos
    insmod fat
    insmod search_fs_uuid
    insmod chain
    search --fs-uuid --no-floppy --set=root 01D0DC21970FC910
    #chainloader (${root})/efi/Microsoft/Boot/bootmgfw.efi
    chainloader (${root})/efi/Microsoft/Boot/cdboot_noprompt.efi
    }
    set isoPath="/ISOs";

    # menuentry "win7" {
    # loopback loop "$isoPath/win7.iso"
    # chainloader (loop)
    # }

    menuentry "Run Windows 7 Ultimate 64-bit Installer (Doesn't work)" {
    #insmod part_msdos
    #insmod ntfs
    set root='(hd0,msdos5)'
    #search --no-floppy --fs-uuid --set=root 01D0DC21970FC910
    #drivemap -s (hd0) ${root}
    chainloader +1
    boot
    }

    menuentry "Microsoft Windows x86_64 UEFI-GPT Setup (Doesn't work)" {
    insmod usbms
    insmod part_gpt
    insmod part_msdos
    insmod fat
    insmod search_fs_uuid
    insmod chain
    search --fs-uuid --no-floppy --set=root 01D0DC21970FC910
    #chainloader (${root})/efi/Microsoft/Boot/bootmgfw.efi
    chainloader (${root})/efi/Microsoft/Boot/cdboot_noprompt.efi
    }

    menuentry 'Windows 7 (loader) (on /dev/sda1)' {
    menuentry "Windows 7 (loader) (on /dev/sda1) (Doesn't work)" {
    insmod part_msdos
    insmod ntfs
    insmod ntldr
    set root='hd0,msdos5'
    ntldr /bootmgr
    }

    menuentry 'System setup' {
    submenu "Windows PE..." {

    menuentry "WinPE 1a" {
    set root=(hd0,msdos5)
    boot
    }

    menuentry "WinPE 1b" {
    set root=(hd0,msdos5)
    chainloader +1
    }

    menuentry "WinPE 2" {
    rootnoverify (hd0,msdos5)
    chainloader +1
    }
    }

    submenu "MS-DOS..." {

    set isoPath="/ISOs";
    set dosWinPath="$isoPath/Dos-Win";

    menuentry "MS-DOS" {
    set isofile="$dosWinPath/DOS6.22_bootdisk.iso"
    set gfxpayload=text
    linux16 "$memdiskPath" raw
    initrd16 "$isofile"
    }
    menuentry "MS-DOS 2" {
    set isofile="$dosWinPath/DOS6.22_bootdisk.iso"
    linux16 "$memdiskPath" bigraw
    initrd16 "$isofile"
    }
    }
    }

    menuentry "Grub4dos (Untested)"{
    linux "$grub4dosPath"
    }

    menuentry 'System setup (Untested)' {
    fwsetup
    }

    menuentry "System shutdown" {
    menuentry "System shutdown (Untested)" {
    echo "System shutting down..."
    halt
    }

    menuentry "System restart" {
    menuentry "System restart (Untested)" {
    echo "System rebooting..."
    reboot
    }
  2. @Pysis868 Pysis868 revised this gist Jun 11, 2017. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion grub.cfg
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,7 @@
    # Config for GNU GRand Unified Bootloader (GRUB)
    # Config for GNU GRand Unified Bootloader (GRUB) (2)
    # /boot/grub/grub.cfg
    # or
    # /boot/grub2/grub.cfg


    # This grub.cfg file was created by Lance http://www.pendrivelinux.com
  3. @Pysis868 Pysis868 revised this gist Jun 11, 2017. 1 changed file with 452 additions and 267 deletions.
    719 changes: 452 additions & 267 deletions grub.cfg
    Original file line number Diff line number Diff line change
    @@ -8,13 +8,17 @@
    # and then improved by Pysis.
    # Improvement Sources:
    # https://www.pendrivelinux.com/boot-multiple-iso-from-usb-via-grub2-using-linux/
    # Used GRUB2 with command `grub2-install` instead, along with the `--boot-directory` parameter.
    # If you get an error about failing 'to get a canonical path', or folders not existing on the device, then again, you need to run the command as a privileged user.
    # If you get errors concerning a bad superblock, and unable to install grub, try rewriting the filesystem again.
    # https://gist.github.com/jamiekurtz/26c46b3e594f8cdd453a
    # https://gist.github.com/noisufnoc/e0053d738f5fbb679535
    # https://gist.github.com/samdoran/90056b8e4a2aedc6a3e8
    # https://gist.github.com/yeahunter/9eca12b3db064e5dc23b
    # https://gist.github.com/jeekl/5564476
    # https://wiki.archlinux.org/index.php/Multiboot_USB_drive
    # https://help.ubuntu.com/community/Grub2/ISOBoot/Examples
    # Seems to be a gold mine for my purposes!!
    # http://www.coreboot.org/GRUB2
    # http://www.backtrack-linux.org/forums/showthread.php?t=42722

    @@ -25,8 +29,10 @@

    # Great GRUB2 Reference: http://www.dedoimedo.com/computers/grub-2.html

    # "OS" being referred specifically to when the image/booted environment is expected to or can be used for general computing tasks, and not just repair/maintenance/inspection of another.

    # Timeout for menu
    set timeout=10
    set timeout=20

    # Default boot entry
    set default=0
    @@ -40,281 +46,420 @@ set memdiskPath="/boot/memdisk"
    set menu_color_normal=white/black
    set menu_color_highlight=white/cyan

    menuentry "Elementary OS on Disk" {
    set root=(hd0,msdos6)
    linux /boot/vmlinuz-3.2.0-88-generic root=/dev/sda6
    initrd /boot/initrd.img-3.2.0-88-generic
    boot
    }
    # https://docs.fedoraproject.org/en-US/Fedora/19/html/Installation_Guide/ap-admin-options.html

    menuentry "Elementary OS on Disk; RO, Quiet, Splash" {
    set root=(hd0,msdos6)
    linux /boot/vmlinuz-3.2.0-88-generic root=/dev/sda6 ro quiet splash
    initrd /boot/initrd.img-3.2.0-88-generic
    boot
    # Adapted from $iso/isolinux.grub.conf
    menuentry "TEST Fedora-Workstation-Live-x86_64-25-1.3 TEST" {
    set isofile="$linuxPath/Fedora-Workstation-Live-x86_64-25-1.3.iso"
    loopback loop "$isofile"
    linux (loop)/isolinux/vmlinuz root=live:CDLABEL=Fedora-S-dvd-x86_64-25 iso-scan/filename=$isofile rd.shell
    # append initrd=initrd.img inst.stage2=hd:LABEL=Fedora-S-dvd-x86_64-25 quiet
    initrd (loop)/isolinux/initrd.img # dracut-initqueue timeout looping errors
    }

    menuentry "Elementary OS on Disk; RO, Recovery, NoModeSet" {
    set root=(hd0,msdos6)
    linux /boot/vmlinuz-3.2.0-88-generic root=/dev/sda6 ro recovery nomodeset
    initrd /boot/initrd.img-3.2.0-88-generic
    boot
    menuentry "TEST Fedora-Workstation-Live-x86_64-25-1.3 TEST 2" {
    set isofile="$linuxPath/Fedora-Workstation-Live-x86_64-25-1.3.iso"
    loopback loop "$isofile"
    set root=(loop)
    # linux (loop)/isolinux/vmlinuz root=live:CDLABEL=Fedora-WS-Live-25-1-3 rd.live.image quiet
    # linux (loop)/isolinux/vmlinuz root=UUID="2016-11-15-22-03-09-00" rootfstype=vfat ro rd.live.image quiet rhgb rd.luks=0 rd.md=0 rd.dm=0
    linux (loop)/isolinux/vmlinuz iso-scan/filename="$isofile" rootfstype=vfat ro rd.live.image quiet rhgb rd.luks=0 rd.md=0 rd.dm=0
    # linux (loop)/isolinux/vmlinuz root=CDLABEL=Fedora-WS-Live-25-1-3 rd.live.image quiet
    initrd (loop)/isolinux/initrd.img
    }

    submenu "Linux Distros" {

    set isoPath="/ISOs"
    set linuxPath="$isoPath/Linux"
    submenu "OS Full installations..." {

    ## Ubuntu-based distros

    menuentry "Elementary OS" {
    set isofile="$linuxPath/elementaryos-stable-amd64.20130810.iso"
    loopback loop $isofile
    linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile quiet splash --
    initrd (loop)/casper/initrd.lz
    }
    menuentry "Linux Mint ISO" {
    set isofile="$linuxPath/linuxmint-17.2-mate-64bit.iso"
    loopback loop $isofile
    linux (loop)/casper/vmlinuz file=/cdrom/preseed/mint.seed boot=casper initrd=/casper/initrd.lz iso-scan/filename=$isofile noeject noprompt splash --
    initrd (loop)/casper/initrd.lz
    }
    menuentry "Xbuntu 14.04 Beta - 64bit" {
    set isofile="$linuxPath/xubuntu-15.04-desktop-amd64.iso"
    loopback loop $isofile
    linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile noprompt noeject splash --
    initrd (loop)/casper/initrd.lz
    }
    menuentry "ubuntu-15.04-desktop-amd64.iso" {
    set isofile="$linuxPath/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
    }
    menuentry "ubuntu-15.04-server-amd64.iso" {
    set isofile="$linuxPath/ubuntu-15.04-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 "Ubuntu 10.10 Desktop ISO 64-bit" {
    # loopback loop /ubuntu1064.iso
    # linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/ubuntu1064.iso noeject noprompt splash --
    # initrd (loop)/casper/initrd.lz
    #}

    ## Other desktop distros
    submenu "Elementary OS..." {

    menuentry "Fedora-Live-Workstation-x86_64-21-5" {
    set isofile="$linuxPath/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 "Elementary OS on Disk" {
    set root=(hd0,msdos6)
    linux /boot/vmlinuz-3.2.0-88-generic root=/dev/sda6
    initrd /boot/initrd.img-3.2.0-88-generic
    boot
    }

    menuentry "Elementary OS on Disk; RO, Quiet, Splash" {
    set root=(hd0,msdos6)
    linux /boot/vmlinuz-3.2.0-88-generic root=/dev/sda6 ro quiet splash
    initrd /boot/initrd.img-3.2.0-88-generic
    boot
    }

    menuentry "Elementary OS on Disk; RO, Recovery, NoModeSet" {
    set root=(hd0,msdos6)
    linux /boot/vmlinuz-3.2.0-88-generic root=/dev/sda6 ro recovery nomodeset
    initrd /boot/initrd.img-3.2.0-88-generic
    boot
    }

    }

    #menuentry "Debian 7.0 Wheezy AMD64 Installer (netinst, firmware)" {
    # set isofile="$linuxPath/debian-7.0.0-amd64-firmware-netinst.iso"
    # loopback loop $iso
    # linux (loop)/install.amd/vmlinuz
    # initrd (loop)/install.amd/initrd.gz
    #}
    }

    #menuentry "Debian 7.0 Wheezy AMD64 Live system (GNOME, firmware/non-free)" {
    # set isofile="$linuxPath/debian-live-7.0.0-amd64-gnome-desktop+nonfree.iso"
    # loopback loop $iso
    # linux (loop)/live/vmlinuz boot=live
    # initrd (loop)/live/initrd.img
    #}
    submenu "OS Live Images..." {

    submenu "Linux Distros..." {

    set isoPath="/ISOs"
    set linuxPath="$isoPath/Linux"

    ## Ubuntu-based distros

    menuentry "Elementary OS 20130810 x64" {
    set isofile="$linuxPath/elementaryos-stable-amd64.20130810.iso"
    loopback loop $isofile
    linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile quiet splash --
    initrd (loop)/casper/initrd.lz
    }
    menuentry "Linux Mint 17.2 x64" {
    set isofile="$linuxPath/linuxmint-17.2-mate-64bit.iso"
    loopback loop $isofile
    linux (loop)/casper/vmlinuz file=/cdrom/preseed/mint.seed boot=casper initrd=/casper/initrd.lz iso-scan/filename=$isofile noeject noprompt splash --
    initrd (loop)/casper/initrd.lz
    }

    submenu "Fedora..." {
    set isoPath="/ISOs"
    set linuxPath="$isoPath/Linux"

    menuentry "Fedora-Workstation-Live-x86_64-25-1.3" {
    set isofile="$linuxPath/Fedora-Workstation-Live-x86_64-25-1.3.iso"
    loopback loop $isofile
    linux (loop)/isolinux/vmlinuz root=live:CDLABEL=Fedora-Live-WS-x86_64-21-5 iso-scan/filename=$isofile rd.live.image
    initrd (loop)/isolinux/initrd.img
    }
    # Adapted from $iso/isolinux.grub.conf
    menuentry "Fedora-Server-dvd-x86_64-25-1.3" {
    set isofile="$linuxPath/Fedora-Server-dvd-x86_64-25-1.3.iso"
    loopback loop $isofile
    linux (loop)/isolinux/vmlinuz root=live:CDLABEL=Fedora-S-dvd-x86_64-25 iso-scan/filename=$isofile rd.live.image
    initrd (loop)/isolinux/initrd.img # dracut-initqueue timeout looping errors
    }
    # Adapted from $iso/isolinux.grub.conf
    menuentry "Fedora-Server-dvd-x86_64-25-1.3 2" {
    set isofile="$linuxPath/Fedora-Server-dvd-x86_64-25-1.3.iso"
    loopback loop $isofile
    linux (loop)/isolinux/vmlinuz root=live:CDLABEL=Fedora-S-dvd-x86_64-25 iso-scan/filename=$isofile rd.live.image quiet
    initrd (loop)/isolinux/initrd.img # dracut-initqueue timeout looping errors
    }
    # Adapted from $iso/isolinux.grub.conf
    # Changed CDLABEL
    menuentry "Fedora-Server-dvd-x86_64-25-1.3 3" {
    set isofile="$linuxPath/Fedora-Server-dvd-x86_64-25-1.3.iso"
    loopback loop $isofile
    linux (loop)/isolinux/vmlinuz root=live:CDLABEL=Fedora-Server-dvd-x86_64-25-1.3 iso-scan/filename=$isofile rd.live.image quiet
    initrd (loop)/isolinux/initrd.img # dracut-initqueue timeout looping errors
    }
    menuentry "Fedora-Server-dvd-x86_64-25-1.3 4" {
    set isofile="$linuxPath/Fedora-Server-dvd-x86_64-25-1.3.iso"
    loopback loop $isofile
    linux16 (loop)/isolinux/vmlinuz root=live:CDLABEL=Fedora-S-dvd-x86_64-25 iso-scan/filename=$isofile rd.live.image
    initrd16 (loop)/isolinux/initrd.img # dracut-initqueue timeout looping errors
    }
    # https://ask.fedoraproject.org/en/question/33055/boot-fedora-20-from-iso/?answer=60554#post-id-60554
    menuentry "Fedora-Server-dvd-x86_64-25-1.3 5" {
    insmod loopback
    set isofile="$linuxPath/Fedora-Server-dvd-x86_64-25-1.3.iso"
    loopback loop $isofile
    linux (loop)/isolinux/vmlinuz iso-scan/filename=$isofile root=live:CDLABEL=Fedora-S-dvd-x86_64-25 rootfstype=auto ro rd.live.image quiet rhgb rd.luks=0 rd.md=0 rd.dm=0
    initrd (loop)/isolinux/initrd.img
    }
    # https://ask.fedoraproject.org/en/question/33055/boot-fedora-20-from-iso/?answer=36242#post-id-36242
    menuentry "Fedora-Server-dvd-x86_64-25-1.3 6" {
    set isofile="$linuxPath/Fedora-Server-dvd-x86_64-25-1.3.iso"
    loopback loop $isofile
    linux (loop)/isolinux/vmlinuz inst.stage2=hd:UUID="2016-11-15-22-03-09-00" noeject iso-scan/filename=$iso_path
    initrd (loop)/isolinux/initrd.img
    }
    menuentry "Fedora-Atomic-ostree-x86_64-25-20170215.1" {
    echo "WIP..."
    set isofile="$linuxPath/Fedora-Atomic-ostree-x86_64-25-20170215.1.iso"
    loopback loop $isofile
    linux (loop)/isolinux/vmlinuz root=live:CDLABEL=Fedora-Atomic-ostree-x86_64-25-20170215.1 iso-scan/filename=$isofile rd.live.image # /dev/mapper/live-rw does not exist error
    #linux (loop)/isolinux/vmlinuz root=live:CDLABEL=Fedora-Atomic-ostree-x86_64-25-20170215.1 iso-scan/filename=$isofile rd.live.image ro liveimg # Guru Meditation error
    # linux (loop)/isolinux/vmlinuz root=live:CDLABEL=Fedora-Atomic-ostree-x86_64-25-20170215.1 iso-scan/filename=$isofile rd.live.image ro liveimg # dracut-initqueue timeout looping errors # /dev/mapper/live-rw does not exist error
    initrd (loop)/isolinux/initrd.img
    boot
    }
    menuentry "Fedora-Atomic-ostree-x86_64-25-20170215.1 2" {
    set isofile="$linuxPath/Fedora-Atomic-ostree-x86_64-25-20170215.1.iso"
    loopback loop $isofile
    linuxefi (loop)/images/pxeboot/vmlinuz inst.stage2=hd:LABEL=Fedora-Atomic-ostree-x86_64-25 quiet
    initrdefi (loop)/images/pxeboot/initrd.img
    }
    menuentry "Fedora-Atomic-ostree-x86_64-25-20170215.1 3" {
    set isofile="$linuxPath/Fedora-Atomic-ostree-x86_64-25-20170215.1.iso"
    loopback loop $isofile
    insmod part_msdos
    insmod xfs
    insmod lvm
    set root='(loop)'
    #chainloader +1
    #configfile (loop)/isolinux/grub.conf
    configfile (loop)/EFI/BOOT/grub.cfg
    }
    }

    submenu "Ubuntu..." {
    set isoPath="/ISOs"
    set linuxPath="$isoPath/Linux"

    menuentry "Ubuntu 16.10 Minimal" {
    set isofile="$linuxPath/ubuntu-16.10-mini.iso"
    loopback loop $isofile
    # linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile locale=en_US.UTF-8
    # linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile liveimg noprompt noeject quiet splash --
    linux (loop)/linux boot=casper iso-scan/filename=$isofile locale=en_US.UTF-8
    # initrd (loop)/casper/initrd.lz
    initrd (loop)/initrd.gz
    }
    menuentry "ubuntu-15.04-desktop-amd64.iso" {
    set isofile="$linuxPath/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
    }
    menuentry "ubuntu-15.04-server-amd64.iso" {
    set isofile="$linuxPath/ubuntu-15.04-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 "Ubuntu 10.10 Desktop ISO 64-bit" {
    # loopback loop /ubuntu1064.iso
    # linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/ubuntu1064.iso noeject noprompt splash --
    # initrd (loop)/casper/initrd.lz
    # }
    }

    menuentry "Xbuntu 14.04 Beta - 64bit" {
    set isofile="$linuxPath/xubuntu-15.04-desktop-amd64.iso"
    loopback loop $isofile
    linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile noprompt noeject splash --
    initrd (loop)/casper/initrd.lz
    }

    ## Other desktop distros

    # submenu "Debian..." {
    # menuentry "Debian 7.0 Wheezy AMD64 Installer (netinst, firmware)" {
    # set isofile="$linuxPath/debian-7.0.0-amd64-firmware-netinst.iso"
    # loopback loop $iso
    # linux (loop)/install.amd/vmlinuz
    # initrd (loop)/install.amd/initrd.gz
    # }
    #
    # menuentry "Debian 7.0 Wheezy AMD64 Live system (GNOME, firmware/non-free)" {
    # set isofile="$linuxPath/debian-live-7.0.0-amd64-gnome-desktop+nonfree.iso"
    # loopback loop $iso
    # linux (loop)/live/vmlinuz boot=live
    # initrd (loop)/live/initrd.img
    # }
    # }

    ## Minimal resource-focused distros

    menuentry "CorePlus ISO" {
    set isofile="$linuxPath/CorePlus-current.iso"
    loopback loop $isofile
    linux (loop)/boot/bzImage --
    initrd (loop)/boot/tinycore.gz
    }
    #menuentry "CorePlus (Variant 2)" {
    # set isofile="$linuxPath/COREPLUS"
    # loopback loop $isofile
    # linux (loop)/boot/vmlinuz
    # initrd (loop)/boot/core.gz
    #}
    # Will leave commented out and unused; Using CorePlus instead.
    #menuentry "Tinycore" {
    # set isofile="$linuxPath/TINYCORE"
    # loopback loop $isofile
    # linux (loop)/boot/vmlinuz
    # #linux (loop)/boot/vmlinuz quiet cde iso=/mnt/sd[x]X$isofile
    # #initrd (loop)/boot/tinycore.gz
    # initrd (loop)/boot/core.gz
    #}

    menuentry "ArchLinux x86_64" {
    set isofile="$linuxPath/archlinux-2015.08.01-dual.iso"
    loopback loop $isofile
    linux (loop)/arch/boot/x86_64/vmlinuz archisolabel=ARCH_201406 img_dev=/dev/disk/by-label/UNJEB img_loop=$isofile earlymodules=loop
    initrd (loop)/arch/boot/x86_64/archiso.img
    }

    menuentry "CentOS 6 x86_64 minimal" {
    set isofile="$linuxPath/CentOS-7-x86_64-Minimal-1503-01.iso"
    loopback loop $isofile
    linux (loop)/isolinux/vmlinuz noeject inst.stage2=hd:LABEL=UNJEB:/$isofile
    initrd (loop)/isolinux/initrd.img
    }
    menuentry "CentOS 6 x86_64 minimal with basic video driver" {
    set isofile="$linuxPath/CentOS-7-x86_64-Minimal-1503-01.iso"
    loopback loop $iso
    linux (loop)/isolinux/vmlinuz noeject inst.stage2=hd:LABEL=UNJEB:/$isofile xdriver=vesa nomodset askmethod
    initrd (loop)/isolinux/initrd.img
    }

    menuentry "Damn Small Linux" {
    echo "Doesn't work yet"'!';
    # Maybe try this instead later: https://gist.github.com/oxplot/2041319
    # set isofile="$linuxPath/..."
    linux16 /boot/bootdistro/damnsmall/isolinux/linux24 knoppix_dir=damnsmall ramdisk_size=100000 lang=en apm=power-off nomce noapic quiet BOOT_IMAGE=knoppix
    initrd16 /boot/bootdistro/damnsmall/isolinux/minirt24.gz
    }
    menuentry "CorePlus ISO" {
    set isofile="$linuxPath/CorePlus-current.iso"
    loopback loop $isofile
    linux (loop)/boot/bzImage --
    initrd (loop)/boot/tinycore.gz
    }
    # menuentry "CorePlus (Variant 2)" {
    # set isofile="$linuxPath/COREPLUS"
    # loopback loop $isofile
    # linux (loop)/boot/vmlinuz
    # initrd (loop)/boot/core.gz
    # }
    # Will leave commented out and unused; Using CorePlus instead.
    # menuentry "Tinycore" {
    # set isofile="$linuxPath/TINYCORE"
    # loopback loop $isofile
    # linux (loop)/boot/vmlinuz
    # #linux (loop)/boot/vmlinuz quiet cde iso=/mnt/sd[x]X$isofile
    # #initrd (loop)/boot/tinycore.gz
    # initrd (loop)/boot/core.gz
    # }
    menuentry "ArchLinux x86_64" {
    set isofile="$linuxPath/archlinux-2015.08.01-dual.iso"
    loopback loop $isofile
    linux (loop)/arch/boot/x86_64/vmlinuz archisolabel=ARCH_201406 img_dev=/dev/disk/by-label/UNJEB img_loop=$isofile earlymodules=loop
    initrd (loop)/arch/boot/x86_64/archiso.img
    }
    menuentry "CentOS 6 x86_64 minimal" {
    set isofile="$linuxPath/CentOS-7-x86_64-Minimal-1503-01.iso"
    loopback loop $isofile
    linux (loop)/isolinux/vmlinuz noeject inst.stage2=hd:LABEL=UNJEB:/$isofile
    initrd (loop)/isolinux/initrd.img
    }
    menuentry "CentOS 6 x86_64 minimal with basic video driver" {
    set isofile="$linuxPath/CentOS-7-x86_64-Minimal-1503-01.iso"
    loopback loop $iso
    linux (loop)/isolinux/vmlinuz noeject inst.stage2=hd:LABEL=UNJEB:/$isofile xdriver=vesa nomodset askmethod
    initrd (loop)/isolinux/initrd.img
    }
    menuentry "Damn Small Linux" {
    echo "Doesn't work yet"'!';
    # Maybe try this instead later: https://gist.github.com/oxplot/2041319
    # set isofile="$linuxPath/..."
    linux16 /boot/bootdistro/damnsmall/isolinux/linux24 knoppix_dir=damnsmall ramdisk_size=100000 lang=en apm=power-off nomce noapic quiet BOOT_IMAGE=knoppix
    initrd16 /boot/bootdistro/damnsmall/isolinux/minirt24.gz
    }

    ## Administrative- / Recovery- focused distros

    menuentry "Boot Finnix 109 (64-bit)" {
    set isofile="$linuxPath/finnix-111.iso"
    loopback loop $isofile
    linux (loop)/boot/x86/linux64 findiso=$isofile vga=791 nomodeset quiet --
    initrd (loop)/boot/x86/initrd.xz
    }
    menuentry "Boot Finnix 109 (64-bit, text mode)" {
    set isofile="$linuxPath/finnix-111.iso"
    loopback loop $isofile
    linux /boot/x86/linux64 findiso=$isofile vga=normal nomodeset quiet --
    initrd /boot/x86/initrd.xz
    }

    # menuentry "Knoppix" {
    # set isofile="$linuxPath/knoppix.iso"
    # }

    menuentry "Boot Finnix 109 (64-bit)" {
    set isofile="$linuxPath/finnix-111.iso"
    loopback loop $isofile
    linux (loop)/boot/x86/linux64 findiso=$isofile vga=791 nomodeset quiet --
    initrd (loop)/boot/x86/initrd.xz
    }
    menuentry "Boot Finnix 109 (64-bit, text mode)" {
    set isofile="$linuxPath/finnix-111.iso"
    loopback loop $isofile
    linux /boot/x86/linux64 findiso=$isofile vga=normal nomodeset quiet --
    initrd /boot/x86/initrd.xz
    }

    menuentry "GRML - the sysadmins best friend" {
    set isofile="$linuxPath/grml64-full_2014.11.iso"
    loopback loop $isofile
    set root=(loop)
    configfile /boot/grub/loopback.cfg
    }
    menuentry "GRML - the sysadmins best friend" {
    set isofile="$linuxPath/grml96-full_2014.11.iso"
    loopback loop "$isofile"
    set root=(loop)
    configfile /boot/grub/loopback.cfg
    }

    # https://github.com/grml/grml-live/blob/3ac646b41e6ce3aa58ff914bf2ba5d52d157d125/templates/boot/grub/%25SHORT_NAME%25_default.cfg
    menuentry "grml64-full - copy Grml to RAM" {
    set isofile="$linuxPath/grml96-full_2014.11.iso"
    loopback loop "$isofile"
    set root=(loop)
    set gfxpayload=keep
    echo 'Loading kernel...'
    linux (loop)/boot/grml64full/vmlinuz apm=power-off boot=live nomce net.ifnames=0 "${loopback}" "${kernelopts}" toram=grml64-full.squashfs live-media-path="(loop)/live/grml64-full/" bootid=0fdfb62c-40af-40b9-9387-014232eb1f74
    echo 'Loading initrd...'
    initrd (loop)/boot/grml64full/initrd.img
    }

    ## Pentesting distros

    menuentry "kali-linux-1.1.0a-amd64" {
    set isofile="$linuxPath/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
    }
    # Will leave commented out and unusued; Using Kali instead.
    #menuentry "BackTrack 5" {
    # loopback loop /BT5-GNOME-64.iso
    # linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/BT5-GNOME-64.iso noeject noprompt splash --
    # initrd (loop)/casper/initrd.lz
    #}
    menuentry "kali-linux-1.1.0a-amd64" {
    set isofile="$linuxPath/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
    }
    # Will leave commented out and unusued, but still referenced; Using Kali instead.
    # menuentry "BackTrack 5" {
    # loopback loop /BT5-GNOME-64.iso
    # linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/BT5-GNOME-64.iso noeject noprompt splash --
    # initrd (loop)/casper/initrd.lz
    # }

    ## Anonymous distros

    menuentry "TAILS - The Amnesic Incognito Live System" {
    set isofile="$linuxPath/tails-i386-0.17.2.iso"
    loopback loop $isofile
    linux (loop)/live/vmlinuz boot=live config live-media=removable nopersistent noprompt quiet timezone=America/New_York block.events_dfl_poll_msecs=1000 splash nox11autologin module=Tails findiso=$isofile quiet_
    initrd (loop)/live/initrd.img
    menuentry "TAILS - The Amnesic Incognito Live System" {
    set isofile="$linuxPath/tails-i386-0.17.2.iso"
    loopback loop $isofile
    linux (loop)/live/vmlinuz boot=live config live-media=removable nopersistent noprompt quiet timezone=America/New_York block.events_dfl_poll_msecs=1000 splash nox11autologin module=Tails findiso=$isofile quiet_
    initrd (loop)/live/initrd.img
    }
    }
    }

    menuentry "WinPE 1a" {
    set root=(hd0,msdos5)
    boot
    }

    menuentry "WinPE 1b" {
    set root=(hd0,msdos5)
    chainloader +1
    submenu "DOS/Windows..." {

    set isoPath="/ISOs";

    # menuentry "win7" {
    # loopback loop "$isoPath/win7.iso"
    # chainloader (loop)
    # }

    submenu "MS-DOS..." {

    set isoPath="/ISOs";
    set dosWinPath="$isoPath/Dos-Win";

    menuentry "MS-DOS" {
    set isofile="$dosWinPath/DOS6.22_bootdisk.iso"
    set gfxpayload=text
    linux16 "$memdiskPath" raw
    initrd16 "$isofile"
    }
    menuentry "MS-DOS 2" {
    set isofile="$dosWinPath/DOS6.22_bootdisk.iso"
    linux16 "$memdiskPath" bigraw
    initrd16 "$isofile"
    }
    }
    }
    }

    menuentry "WinPE 2" {
    rootnoverify (hd0,msdos5)
    chainloader +1
    }

    #menuentry "win7" {
    # loopback loop "$isoPath/win7.iso"
    # chainloader (loop)
    #}

    submenu "Utils" {
    submenu "Utils..." {

    set isoPath="/ISOs";
    set toolPath="$isoPath/Tools";
    set dosWinPath="$isoPath/Dos-Win";
    set memdiskPath="/boot/memdisk";


    set oldMemtestPath="$toolPath/Memtest86-4.3.7.iso"; # I keep this around for some reason. Something about a major version difference. Compatibility maybe? MBR?
    set memtestPath="$toolPath/Memtest86-7.3.iso";
    menuentry "Memtest 86+" {
    set isofile="$toolPath/memtest86+-5.01.iso"
    linux16 $isofile
    }

    menuentry "SpinRite" {
    set isofile="$toolPath/SpinRite 6.0/SpinRite.img"
    set gfxpayload=text
    linux16 "$memdiskPath" raw
    initrd16 "$isofile"
    }
    menuentry "SpinRite (Variant 2)" {
    echo "Doesn't work yet"'!';
    set isofile="$toolPath/SpinRite 6.0/SpinRite.img"
    loopback loop "$isofile"
    linux (loop)/vmlinuz boot=cd isofrom="$isofile" xbmc=nvidia,nodiskmount,tempfs,setvolume loglevel=0 --
    initrd (loop)/initrd0.img
    }

    # Source: http://codeverge.com/grc.techtalk.linux/grub-booting-spinrite-image-got-it-working/1617093
    menuentry "SpinRite 6.0 (Variant 3)" {
    set isofile="$toolPath/SpinRite 6.0/SpinRite.img"
    linux16 "$memdiskPath" bigraw
    initrd16 "$isofile"
    }

    menuentry "SpinRite 6.0 (Variant 4)" {
    echo "Doesn't work yet"'!';
    set isofile="$toolPath/SpinRite 6.0/SpinRite.img"
    title SpinRite 6
    set isofile="$memtestPath"
    loopback loop "$isofile"
    root (loop)
    chainloader "$isofile"
    linux16 (loop)/isolinux/memtest iso-scan/filename="$isofile"
    }

    submenu "SpinRite..." {
    set isoPath="/ISOs";
    set toolPath="$isoPath/Tools";
    set memdiskPath="/boot/memdisk";

    menuentry "MS-DOS" {
    set isofile="$dosWinPath/DOS6.22_bootdisk.iso"
    set gfxpayload=text
    linux16 "$memdiskPath" raw
    initrd16 "$isofile"
    }
    menuentry "MS-DOS 2" {
    set isofile="$dosWinPath/DOS6.22_bootdisk.iso"
    linux16 "$memdiskPath" bigraw
    initrd16 "$isofile"
    menuentry "SpinRite 6.0 (raw)" {
    set isofile="$toolPath/SpinRite 6.0/SpinRite.img"
    set gfxpayload=text
    linux16 "$memdiskPath" raw
    initrd16 "$isofile"
    }
    # Source: http://codeverge.com/grc.techtalk.linux/grub-booting-spinrite-image-got-it-working/1617093
    menuentry "SpinRite 6.0 (bigraw)" {
    set isofile="$toolPath/SpinRite 6.0/SpinRite.img"
    set gfxpayload=text
    linux16 "$memdiskPath" bigraw
    initrd16 "$isofile"
    }
    }

    menuentry "gparted-live-0.22.0-2-i586" {
    #set isofile="$toolPath/gparted-live-0.22.0-2-i586.iso"
    set isofile="$toolPath/gparted-live-0.23.0-1-i586.iso"
    # set gfxpayload=text
    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
    }
    # If I want direct access to TestDisk/PhotoRec, maybe look into bundling FreeDOS to run them: http://www.cgsecurity.org/wiki/Create_a_TestDisk_FreeDos_LiveCD

    submenu "GPartEd... (None work yet)" {
    set isoPath="/ISOs";
    set toolPath="$isoPath/Tools";

    menuentry "Gparted live 2" {
    set isofile="$toolPath/gparted-live-0.22.0-2-i586.iso"
    menuentry "GPartEd Live 0.28.1-1 amd64 (Doesn't work yet)" {
    # Error: <in screen shot> mounting aufs on /root/ failed: No such device
    set isofile="$toolPath/gparted-live-0.28.1-1-amd64.iso"
    # set gfxpayload=text
    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
    }
    menuentry "GPartEd Live 0.28.1-1 amd64 2 (Doesn't work yet)" {
    # Error: <in screen shot> mounting aufs on /root/ failed: No such device
    set isofile="$toolPath/gparted-live-0.28.1-1-amd64.iso"
    loopback loop $isofile
    linux (loop)/live/vmlinuz boot=live config union=aufs noswap noprompt vga=788 ip=frommedia toram=filesystem.squashfs findiso=$isofile
    linux (loop)/live/vmlinuz boot=live config union=aufs noswap noprompt vga=788 ip=frommedia toram=filesystem.squashfs findiso="$isofile"
    initrd (loop)/live/initrd.img
    }
    }

    #menuentry "Parted Magic" {
    # set isofile="$toolPath/pmagic.iso"
    @@ -324,18 +469,31 @@ submenu "Utils" {
    #}

    menuentry "SystemRescueCd" {
    set isofile="$toolPath/systemrescuecd.iso"
    loopback loop $isofile
    linux (loop)/isolinux/rescuecd isoloop=$isofile setkmap=us docache dostartx
    set isofile="$toolPath/systemrescuecd-x86-4.5.3.iso"
    loopback loop "$isofile"
    # linux (loop)/isolinux/rescuecd isoloop"=$isofile" setkmap=us docache dostartx
    # Or linux (loop)/isolinux/rescue32
    # Or linux (loop)/isolinux/rescue64
    linux (loop)/isolinux/rescue64 isoloop="$isofile" setkmap=us docache dostartx
    initrd (loop)/isolinux/initram.igz
    }

    menuentry "CloneZilla" {
    set isofile="$toolPath/clonezilla-live-2.4.2-10-amd64.iso"
    loopback loop $isofile
    linux (loop)/live/vmlinuz boot=live live-config union=aufs nolocales noprompt gfxpayload=800x600x16 ip=frommedia findiso=$isofile
    set isofile="$toolPath/clonezilla-live-2.5.0-25-amd64.iso"
    loopback loop "$isofile"
    # linux (loop)/live/vmlinuz boot=live live-config union=aufs nolocales noprompt gfxpayload=800x600x16 ip=frommedia findiso="$isofile"
    # initrd (loop)/live/initrd.img

    # linux (loop)/live/vmlinuz initrd=/live/initrd.img boot=live union=overlay username=user config components quiet noswap edd=on nomodeset locales= keyboard-layouts= ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_batch="no" vga=788 ip= net.ifnames=0 nosplash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1

    linux (loop)/live/vmlinuz
    initrd /live/initrd.img boot=live union=overlay username=user config components quiet noswap edd=on nomodeset locales= keyboard-layouts= ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_batch="no" vga=788 ip= net.ifnames=0 nosplash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1
    }
    # Source: https://askubuntu.com/a/880484
    menuentry "clonezilla" {
    set isofile="$toolPath/clonezilla-live-2.5.0-25-amd64.iso"
    loopback loop "$isofile"
    linux (loop)/live/vmlinuz boot=live components config findiso=$isofile ip=frommedia toram=filesystem.squashfs union=overlay username=user
    initrd (loop)/live/initrd.img
    }

    @@ -376,6 +534,15 @@ submenu "Utils" {
    # linux16 $memdiskPath iso
    # initrd16 (hd0,6)$isofile
    #}

    # Source: dann.com.br...
    menuentry "Hiren's boot CD using grub.exe" {
    set dosGRUBPath="/boot/grub.exe";
    set hbcdPath="$toolPath/HBCD";
    set menuLstPath="$hbcdPath/menu.lst";
    set isofile="$toolPath/Hiren's.BootCD.15.2.iso"
    linux16 "$dosGRUBPath" --config-file="find --set-root $menuLstPath; configfile $menuLstPath"
    }
    menuentry "Hiren's boot CD using memdisk 4.05" {
    set isofile="$toolPath/Hiren's.BootCD.15.2.iso"
    linux16 $memdiskPath iso
    @@ -396,34 +563,52 @@ submenu "Utils" {
    # linux16 /grub.exe --config-file="map (rd) (hd32); map --hook; root (hd32); chainloader (hd32);"
    # initrd $isofile
    #}

    submenu "Windows PE..." {

    menuentry "WinPE 1a" {
    set root=(hd0,msdos5)
    boot
    }

    menuentry "WinPE 1b" {
    set root=(hd0,msdos5)
    chainloader +1
    }

    menuentry "WinPE 2" {
    rootnoverify (hd0,msdos5)
    chainloader +1
    }
    }
    }

    #menuentry "Grub4dos"{
    # linux /grub4dos/grub.exe
    #}

    menuentry 'Scan for OS on internal HDD' {
    insmod regexp
    insmod ahci
    insmod part_msdos
    for x in (ahci0,*) ; do
    if [ -f "$x/grub/grub.cfg" ] ; then
    menuentry "Load Config from $x" $x {
    root=$2
    configfile /grub/grub.cfg
    }
    fi
    if [ -f "$x/boot/grub/grub.cfg" ] ; then
    menuentry "Load Config from $x" $x {
    root=$2
    configfile /boot/grub/grub.cfg
    }
    fi
    done
    insmod regexp
    insmod ahci
    insmod part_msdos
    for x in (ahci0,*) ; do
    if [ -f "$x/grub/grub.cfg" ] ; then
    menuentry "Load Config from $x" $x {
    root=$2
    configfile /grub/grub.cfg
    }
    fi
    if [ -f "$x/boot/grub/grub.cfg" ] ; then
    menuentry "Load Config from $x" $x {
    root=$2
    configfile /boot/grub/grub.cfg
    }
    fi
    done
    }

    menuentry '(Attempt to) Run Windows 7 Ultimate 64-bit Installer' {
    #insmod part_msdos
    #insmod part_msdos
    #insmod ntfs
    set root='(hd0,msdos5)'
    #search --no-floppy --fs-uuid --set=root 01D0DC21970FC910
    @@ -445,23 +630,23 @@ menuentry "(Attempt to) Microsoft Windows x86_64 UEFI-GPT Setup" {
    }

    menuentry 'Windows 7 (loader) (on /dev/sda1)' {
    insmod part_msdos
    insmod ntfs
    insmod part_msdos
    insmod ntfs
    insmod ntldr
    set root='hd0,msdos5'
    ntldr /bootmgr
    set root='hd0,msdos5'
    ntldr /bootmgr
    }

    menuentry 'System setup' {
    fwsetup
    fwsetup
    }

    menuentry "System shutdown" {
    echo "System shutting down..."
    halt
    echo "System shutting down..."
    halt
    }

    menuentry "System restart" {
    echo "System rebooting..."
    reboot
    echo "System rebooting..."
    reboot
    }
  4. @Pysis868 Pysis868 revised this gist Feb 15, 2017. 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
    @@ -7,7 +7,7 @@

    # and then improved by Pysis.
    # Improvement Sources:
    # http://www.pendrivelinux.com/boot-multiple-iso-from-usb-via--using-linux/#more-5352
    # https://www.pendrivelinux.com/boot-multiple-iso-from-usb-via-grub2-using-linux/
    # https://gist.github.com/jamiekurtz/26c46b3e594f8cdd453a
    # https://gist.github.com/noisufnoc/e0053d738f5fbb679535
    # https://gist.github.com/samdoran/90056b8e4a2aedc6a3e8
  5. @Pysis868 Pysis868 revised this gist Apr 30, 2016. No changes.
  6. @Pysis868 Pysis868 revised this gist Apr 30, 2016. No changes.
  7. @Pysis868 Pysis868 revised this gist Apr 30, 2016. 1 changed file with 297 additions and 134 deletions.
    431 changes: 297 additions & 134 deletions grub.cfg
    Original file line number Diff line number Diff line change
    @@ -1,23 +1,29 @@
    # Config for GNU GRand Unified Bootloader (GRUB)
    # /boot/grub/grub.cfg


    # This grub.cfg file was created by Lance http://www.pendrivelinux.com
    # Suggested Entries and the suggestor, if available, will also be noted.

    # Sources:
    # http://www.pendrivelinux.com/boot-multiple-iso-from-usb-via-grub2-using-linux/#more-5352
    # and then improved by Pysis.
    # Improvement Sources:
    # http://www.pendrivelinux.com/boot-multiple-iso-from-usb-via--using-linux/#more-5352
    # https://gist.github.com/jamiekurtz/26c46b3e594f8cdd453a
    # https://gist.github.com/noisufnoc/e0053d738f5fbb679535
    # https://gist.github.com/samdoran/90056b8e4a2aedc6a3e8
    # https://gist.github.com/yeahunter/9eca12b3db064e5dc23b
    # https://gist.github.com/jeekl/5564476
    # https://wiki.archlinux.org/index.php/Multiboot_USB_drive
    # https://help.ubuntu.com/community/Grub2/ISOBoot/Examples
    # http://www.coreboot.org/GRUB2
    # http://www.backtrack-linux.org/forums/showthread.php?t=42722

    # Notes:
    # For variables, be sure to use double-quotes to have them actually resolve.
    # Need to re-declare variables inside sub-menus because they open a new "context"..... great..
    # Source: https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1175127
    # - For variables, be sure to use double-quotes to have them actually resolve in the string.
    # - Need to re-declare variables inside sub-menus because they open a new "context"..... great..
    # Source: https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1175127

    # Great GRUB2 Reference: http://www.dedoimedo.com/computers/grub-2.html

    # Timeout for menu
    set timeout=10
    @@ -34,152 +40,205 @@ set memdiskPath="/boot/memdisk"
    set menu_color_normal=white/black
    set menu_color_highlight=white/cyan

    menuentry "Elementary OS on Disk" {
    set root=(hd0,msdos6)
    linux /boot/vmlinuz-3.2.0-88-generic root=/dev/sda6
    initrd /boot/initrd.img-3.2.0-88-generic
    boot
    }

    menuentry "Elementary OS on Disk; RO, Quiet, Splash" {
    set root=(hd0,msdos6)
    linux /boot/vmlinuz-3.2.0-88-generic root=/dev/sda6 ro quiet splash
    initrd /boot/initrd.img-3.2.0-88-generic
    boot
    }

    menuentry "Elementary OS on Disk; RO, Recovery, NoModeSet" {
    set root=(hd0,msdos6)
    linux /boot/vmlinuz-3.2.0-88-generic root=/dev/sda6 ro recovery nomodeset
    initrd /boot/initrd.img-3.2.0-88-generic
    boot
    }

    submenu "Linux Distros" {

    set isoPath="/ISOs"
    set linuxPath="$isoPath/Linux"

    menuentry "kali-linux-1.1.0a-amd64" {
    set isofile="$linuxPath/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 "Fedora-Live-Workstation-x86_64-21-5" {
    set isofile="$linuxPath/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
    }
    ## Ubuntu-based distros

    menuentry "Elementary OS" {
    set isofile="$linuxPath/elementaryos-stable-amd64.20130810.iso"
    loopback loop $isofile
    linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile quiet splash --
    initrd (loop)/casper/initrd.lz
    }

    #menuentry "linuxmint-17.1-xfce-64bit" {
    # set isofile="$linuxPath/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 "ubuntu-14.04.2-desktop-amd64" {
    # set isofile="$linuxPath/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 "Linux Mint ISO" {
    # set isofile="$linuxPath/linuxmint.iso"
    # loopback loop $isofile
    # linux (loop)/casper/vmlinuz file=/cdrom/preseed/mint.seed boot=casper initrd=/casper/initrd.lz iso-scan/filename=$isofile noeject noprompt splash --
    menuentry "Linux Mint ISO" {
    set isofile="$linuxPath/linuxmint-17.2-mate-64bit.iso"
    loopback loop $isofile
    linux (loop)/casper/vmlinuz file=/cdrom/preseed/mint.seed boot=casper initrd=/casper/initrd.lz iso-scan/filename=$isofile noeject noprompt splash --
    initrd (loop)/casper/initrd.lz
    }
    menuentry "Xbuntu 14.04 Beta - 64bit" {
    set isofile="$linuxPath/xubuntu-15.04-desktop-amd64.iso"
    loopback loop $isofile
    linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile noprompt noeject splash --
    initrd (loop)/casper/initrd.lz
    }
    menuentry "ubuntu-15.04-desktop-amd64.iso" {
    set isofile="$linuxPath/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
    }
    menuentry "ubuntu-15.04-server-amd64.iso" {
    set isofile="$linuxPath/ubuntu-15.04-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 "Ubuntu 10.10 Desktop ISO 64-bit" {
    # loopback loop /ubuntu1064.iso
    # linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/ubuntu1064.iso noeject noprompt splash --
    # initrd (loop)/casper/initrd.lz
    #}

    #menuentry "Tinycore ISO" {
    # set isofile="$linuxPath/tinycore.iso"
    # loopback loop $isofile
    # linux (loop)/boot/bzImage --
    # initrd (loop)/boot/tinycore.gz
    #}

    #menuentry "ArchLinux x86_64" {
    # set iso="/iso/archlinux-2014.06.01-dual.iso"
    # loopback loop $iso
    # linux (loop)/arch/boot/x86_64/vmlinuz archisolabel=ARCH_201406 img_dev=/dev/disk/by-label/UNJEB img_loop=$iso earlymodules=loop
    # initrd (loop)/arch/boot/x86_64/archiso.img
    #}
    #menuentry "ArchLinux 32 Bit" {
    # set iso="/iso/archlinux-2014.06.01-dual.iso"
    # loopback loop $iso
    # linux (loop)/arch/boot/i686/vmlinuz archisolabel=ARCH_201406 img_dev=/dev/disk/by-label/UNJEB img_loop=$iso earlymodules=loop
    # initrd (loop)/arch/boot/i686/archiso.img
    #}

    #menuentry "CentOS 6 x86_64 minimal" {
    # set iso="/iso/CentOS-6.5-x86_64-minimal.iso"
    # loopback loop $iso
    # linux (loop)/isolinux/vmlinuz noeject inst.stage2=hd:LABEL=UNJEB:/$iso
    # initrd (loop)/isolinux/initrd.img
    #}
    #menuentry "CentOS 6 x86_64 minimal with basic video driver" {
    # set iso="/iso/CentOS-6.5-x86_64-minimal.iso"
    # loopback loop $iso
    # linux (loop)/isolinux/vmlinuz noeject inst.stage2=hd:LABEL=UNJEB:/$iso xdriver=vesa nomodset askmethod
    # initrd (loop)/isolinux/initrd.img
    #}

    #menuentry "Xbuntu 14.04 Beta - 64bit" {
    # set iso="/iso/xubuntu-14.04-beta1-desktop-amd64.iso"
    # loopback loop $iso
    # linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$iso noprompt noeject splash --
    # initrd (loop)/casper/initrd.lz
    #}

    #menuentry "Boot Finnix 109 (64-bit)" {
    # set iso="/iso/finnix-109.iso"
    # loopback loop $iso
    # linux (loop)/boot/x86/linux64 findiso=$iso vga=791 nomodeset quiet --
    # initrd (loop)/boot/x86/initrd.xz
    #}
    #menuentry "Boot Finnix 109 (64-bit, text mode)" {
    # set iso="/iso/finnix-109.iso"
    # loopback loop $iso
    # linux /boot/x86/linux64 findiso=$iso vga=normal nomodeset quiet --
    # initrd /boot/x86/initrd.xz
    #}
    ## Other desktop distros

    #menuentry "Boot Finnix 109 (32-bit)" {
    # set iso="/iso/finnix-109.iso"
    # loopback loop $iso
    # linux /boot/x86/linux findiso=$iso vga=791 nomodeset quiet --
    # initrd /boot/x86/initrd.xz
    #}
    #menuentry "Boot Finnix 109 (32-bit, text mode)" {
    # set iso="/iso/finnix-109.iso"
    # loopback loop $iso
    # linux /boot/x86/linux findiso=${iso_path} vga=normal nomodeset quiet --
    # initrd /boot/x86/initrd.xz
    #}

    #menuentry "TAILS - The Amnesic Incognito Live System" {
    # set iso="/iso/tails-i386-0.17.2.iso"
    # loopback loop $iso
    # linux (loop)/live/vmlinuz boot=live config live-media=removable nopersistent noprompt quiet timezone=Europe/Stockholm block.events_dfl_poll_msecs=1000 splash nox11autologin module=Tails findiso=$iso quiet_
    # initrd (loop)/live/initrd.img
    #}

    #menuentry "GRML - the sysadmins best friend" {
    # set iso="/iso/grml64-full_2013.02.iso"
    # loopback loop $iso
    # set root=(loop)
    # configfile /boot/grub/loopback.cfg
    #}
    menuentry "Fedora-Live-Workstation-x86_64-21-5" {
    set isofile="$linuxPath/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 "Debian 7.0 Wheezy AMD64 Installer (netinst, firmware)" {
    # set iso="/iso/debian-7.0.0-amd64-firmware-netinst.iso"
    # set isofile="$linuxPath/debian-7.0.0-amd64-firmware-netinst.iso"
    # loopback loop $iso
    # linux (loop)/install.amd/vmlinuz
    # initrd (loop)/install.amd/initrd.gz
    #}

    #menuentry "Debian 7.0 Wheezy AMD64 Live system (GNOME, firmware/non-free)" {
    # set iso="/iso/debian-live-7.0.0-amd64-gnome-desktop+nonfree.iso"
    # set isofile="$linuxPath/debian-live-7.0.0-amd64-gnome-desktop+nonfree.iso"
    # loopback loop $iso
    # linux (loop)/live/vmlinuz boot=live
    # initrd (loop)/live/initrd.img
    #}

    ## Minimal resource-focused distros

    menuentry "CorePlus ISO" {
    set isofile="$linuxPath/CorePlus-current.iso"
    loopback loop $isofile
    linux (loop)/boot/bzImage --
    initrd (loop)/boot/tinycore.gz
    }
    #menuentry "CorePlus (Variant 2)" {
    # set isofile="$linuxPath/COREPLUS"
    # loopback loop $isofile
    # linux (loop)/boot/vmlinuz
    # initrd (loop)/boot/core.gz
    #}
    # Will leave commented out and unused; Using CorePlus instead.
    #menuentry "Tinycore" {
    # set isofile="$linuxPath/TINYCORE"
    # loopback loop $isofile
    # linux (loop)/boot/vmlinuz
    # #linux (loop)/boot/vmlinuz quiet cde iso=/mnt/sd[x]X$isofile
    # #initrd (loop)/boot/tinycore.gz
    # initrd (loop)/boot/core.gz
    #}

    menuentry "ArchLinux x86_64" {
    set isofile="$linuxPath/archlinux-2015.08.01-dual.iso"
    loopback loop $isofile
    linux (loop)/arch/boot/x86_64/vmlinuz archisolabel=ARCH_201406 img_dev=/dev/disk/by-label/UNJEB img_loop=$isofile earlymodules=loop
    initrd (loop)/arch/boot/x86_64/archiso.img
    }

    menuentry "CentOS 6 x86_64 minimal" {
    set isofile="$linuxPath/CentOS-7-x86_64-Minimal-1503-01.iso"
    loopback loop $isofile
    linux (loop)/isolinux/vmlinuz noeject inst.stage2=hd:LABEL=UNJEB:/$isofile
    initrd (loop)/isolinux/initrd.img
    }
    menuentry "CentOS 6 x86_64 minimal with basic video driver" {
    set isofile="$linuxPath/CentOS-7-x86_64-Minimal-1503-01.iso"
    loopback loop $iso
    linux (loop)/isolinux/vmlinuz noeject inst.stage2=hd:LABEL=UNJEB:/$isofile xdriver=vesa nomodset askmethod
    initrd (loop)/isolinux/initrd.img
    }

    menuentry "Damn Small Linux" {
    echo "Doesn't work yet"'!';
    # Maybe try this instead later: https://gist.github.com/oxplot/2041319
    # set isofile="$linuxPath/..."
    linux16 /boot/bootdistro/damnsmall/isolinux/linux24 knoppix_dir=damnsmall ramdisk_size=100000 lang=en apm=power-off nomce noapic quiet BOOT_IMAGE=knoppix
    initrd16 /boot/bootdistro/damnsmall/isolinux/minirt24.gz
    }

    ## Administrative- / Recovery- focused distros

    menuentry "Boot Finnix 109 (64-bit)" {
    set isofile="$linuxPath/finnix-111.iso"
    loopback loop $isofile
    linux (loop)/boot/x86/linux64 findiso=$isofile vga=791 nomodeset quiet --
    initrd (loop)/boot/x86/initrd.xz
    }
    menuentry "Boot Finnix 109 (64-bit, text mode)" {
    set isofile="$linuxPath/finnix-111.iso"
    loopback loop $isofile
    linux /boot/x86/linux64 findiso=$isofile vga=normal nomodeset quiet --
    initrd /boot/x86/initrd.xz
    }

    menuentry "GRML - the sysadmins best friend" {
    set isofile="$linuxPath/grml64-full_2014.11.iso"
    loopback loop $isofile
    set root=(loop)
    configfile /boot/grub/loopback.cfg
    }

    ## Pentesting distros

    menuentry "kali-linux-1.1.0a-amd64" {
    set isofile="$linuxPath/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
    }
    # Will leave commented out and unusued; Using Kali instead.
    #menuentry "BackTrack 5" {
    # loopback loop /BT5-GNOME-64.iso
    # linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/BT5-GNOME-64.iso noeject noprompt splash --
    # initrd (loop)/casper/initrd.lz
    #}

    ## Anonymous distros

    menuentry "TAILS - The Amnesic Incognito Live System" {
    set isofile="$linuxPath/tails-i386-0.17.2.iso"
    loopback loop $isofile
    linux (loop)/live/vmlinuz boot=live config live-media=removable nopersistent noprompt quiet timezone=America/New_York block.events_dfl_poll_msecs=1000 splash nox11autologin module=Tails findiso=$isofile quiet_
    initrd (loop)/live/initrd.img
    }
    }

    menuentry "WinPE 1a" {
    set root=(hd0,msdos5)
    boot
    }

    menuentry "WinPE 1b" {
    set root=(hd0,msdos5)
    chainloader +1
    }

    menuentry "WinPE 2" {
    rootnoverify (hd0,msdos5)
    chainloader +1
    }

    #menuentry "win7" {
    @@ -189,37 +248,76 @@ submenu "Linux Distros" {

    submenu "Utils" {

    set isoPath="/ISOs"
    set toolPath="$isoPath/Tools"
    set isoPath="/ISOs";
    set toolPath="$isoPath/Tools";
    set dosWinPath="$isoPath/Dos-Win";
    set memdiskPath="/boot/memdisk";

    menuentry "Memtest 86+" {
    set isofile="$toolPath/memtest86+-5.01.iso"
    linux16 $isofile
    }

    menuentry "SpinRite" {
    set isofile="$toolPath/SpinRite.iso"
    set isofile="$toolPath/SpinRite 6.0/SpinRite.img"
    set gfxpayload=text
    linux16 $memdiskPath raw
    initrd16 $isofile
    linux16 "$memdiskPath" raw
    initrd16 "$isofile"
    }
    menuentry "SpinRite 2" {
    set isofile="$toolPath/SpinRite.iso"
    loopback loop $isofile
    linux (loop)/vmlinuz boot=cd isofrom=$isofile xbmc=nvidia,nodiskmount,tempfs,setvolume loglevel=0 --
    menuentry "SpinRite (Variant 2)" {
    echo "Doesn't work yet"'!';
    set isofile="$toolPath/SpinRite 6.0/SpinRite.img"
    loopback loop "$isofile"
    linux (loop)/vmlinuz boot=cd isofrom="$isofile" xbmc=nvidia,nodiskmount,tempfs,setvolume loglevel=0 --
    initrd (loop)/initrd0.img
    }

    # Source: http://codeverge.com/grc.techtalk.linux/grub-booting-spinrite-image-got-it-working/1617093
    menuentry "SpinRite 6.0 (Variant 3)" {
    set isofile="$toolPath/SpinRite 6.0/SpinRite.img"
    linux16 "$memdiskPath" bigraw
    initrd16 "$isofile"
    }

    menuentry "SpinRite 6.0 (Variant 4)" {
    echo "Doesn't work yet"'!';
    set isofile="$toolPath/SpinRite 6.0/SpinRite.img"
    title SpinRite 6
    loopback loop "$isofile"
    root (loop)
    chainloader "$isofile"
    }

    menuentry "MS-DOS" {
    set isofile="$dosWinPath/DOS6.22_bootdisk.iso"
    set gfxpayload=text
    linux16 "$memdiskPath" raw
    initrd16 "$isofile"
    }
    menuentry "MS-DOS 2" {
    set isofile="$dosWinPath/DOS6.22_bootdisk.iso"
    linux16 "$memdiskPath" bigraw
    initrd16 "$isofile"
    }

    menuentry "gparted-live-0.22.0-2-i586" {
    set isofile="$toolPath/gparted-live-0.22.0-2-i586.iso"
    #set isofile="$toolPath/gparted-live-0.22.0-2-i586.iso"
    set isofile="$toolPath/gparted-live-0.23.0-1-i586.iso"
    # set gfxpayload=text
    loopback loop $isofile
    linux (loop)/live/vmlinuz boot=live username=user config components quiet noswap noeject findiso=$isofile toram=filesystem.squashfs nosplash
    linux (loop)/live/vmlinuz boot=live username=user config components quiet noswap noeject findiso="$isofile" toram=filesystem.squashfs nosplash
    initrd (loop)/live/initrd.img
    }

    menuentry "Gparted live 2" {
    set isofile="$toolPath/gparted-live-0.22.0-2-i586.iso"
    loopback loop $isofile
    linux (loop)/live/vmlinuz boot=live config union=aufs noswap noprompt vga=788 ip=frommedia toram=filesystem.squashfs findiso=$isofile
    initrd (loop)/live/initrd.img
    }

    #menuentry "Parted Magic" {
    # set isofile="$isopath/pmagic.iso"
    # set isofile="$toolPath/pmagic.iso"
    # loopback loop $isofile
    # linux (loop)/pmagic/bzImage iso_filename=$isofile edd=off load_ramdisk=1 prompt_ramdisk=0 rw gfxpayload=800x600x16 loglevel=9 max_loop=256 vmalloc=384MiB keymap=dvorak
    # initrd (loop)/pmagic/initrd.img
    @@ -242,15 +340,15 @@ submenu "Utils" {
    }

    #menuentry "Ophcrack No Tables" {
    # set isofile="$isopath/ophcrack-notables.iso"
    # set isofile="$toolPath/ophcrack-notables.iso"
    # set gfxpayload=text
    # loopback loop $isofile
    # linux (loop)/boot/bzImage root=/dev/null rw lang=en_US kmap=dvorak autologin iso-scan/filename=$isofile
    # initrd (loop)/boot/rootfs.gz
    #}

    #menuentry "Ophcrack Vista/7 Tables" {
    # set isofile="$isopath/ophcrack-vistatables.iso"
    # set isofile="$toolPath/ophcrack-vistatables.iso"
    # set gfxpayload=text
    # loopback loop $isofile
    # linux (loop)/boot/bzImage root=/dev/null rw lang=en_US kmap=dvorak autologin iso-scan/filename=$isofile
    @@ -263,6 +361,11 @@ submenu "Utils" {
    # linux (loop)/DBAN.BZI nuke="dwipe" iso-scan/filename=$isofile silent --
    #}

    #menuentry "PC-Doctor" {
    # loopback loop /boot/iso/pcdd1780.iso
    # linux (loop)/[BOOT]/Bootable_2.88M.img
    #}


    #menuentry "Boot Hardware Detection Tool from iso using memdisk 4.05" {
    # linux16 $memdiskPath iso
    @@ -284,15 +387,75 @@ submenu "Utils" {
    initrd16 (hd0,6)$isofile
    }
    #menuentry "UBCD with MEMDISK" {
    # linux16 /memdisk iso raw
    # initrd /ubcd502.iso
    # set isofile="$toolPath/ubcd502.iso"
    # linux16 $memdiskPath iso raw
    # initrd $isofile
    #}
    #menuentry "UBCD with grub4dos" {
    # set isofile="$toolPath/ubcd502.iso"
    # linux16 /grub.exe --config-file="map (rd) (hd32); map --hook; root (hd32); chainloader (hd32);"
    # initrd /ubcd502.iso
    # initrd $isofile
    #}
    }

    #menuentry "Grub4dos"{
    # linux /grub4dos/grub.exe
    #}

    menuentry 'Scan for OS on internal HDD' {
    insmod regexp
    insmod ahci
    insmod part_msdos
    for x in (ahci0,*) ; do
    if [ -f "$x/grub/grub.cfg" ] ; then
    menuentry "Load Config from $x" $x {
    root=$2
    configfile /grub/grub.cfg
    }
    fi
    if [ -f "$x/boot/grub/grub.cfg" ] ; then
    menuentry "Load Config from $x" $x {
    root=$2
    configfile /boot/grub/grub.cfg
    }
    fi
    done
    }

    menuentry '(Attempt to) Run Windows 7 Ultimate 64-bit Installer' {
    #insmod part_msdos
    #insmod ntfs
    set root='(hd0,msdos5)'
    #search --no-floppy --fs-uuid --set=root 01D0DC21970FC910
    #drivemap -s (hd0) ${root}
    chainloader +1
    boot
    }

    menuentry "(Attempt to) Microsoft Windows x86_64 UEFI-GPT Setup" {
    insmod usbms
    insmod part_gpt
    insmod part_msdos
    insmod fat
    insmod search_fs_uuid
    insmod chain
    search --fs-uuid --no-floppy --set=root 01D0DC21970FC910
    #chainloader (${root})/efi/Microsoft/Boot/bootmgfw.efi
    chainloader (${root})/efi/Microsoft/Boot/cdboot_noprompt.efi
    }

    menuentry 'Windows 7 (loader) (on /dev/sda1)' {
    insmod part_msdos
    insmod ntfs
    insmod ntldr
    set root='hd0,msdos5'
    ntldr /bootmgr
    }

    menuentry 'System setup' {
    fwsetup
    }

    menuentry "System shutdown" {
    echo "System shutting down..."
    halt
  8. @Pysis868 Pysis868 revised this gist Aug 3, 2015. 1 changed file with 35 additions and 4 deletions.
    39 changes: 35 additions & 4 deletions grub.cfg
    Original file line number Diff line number Diff line change
    @@ -11,6 +11,8 @@
    # https://gist.github.com/samdoran/90056b8e4a2aedc6a3e8
    # https://gist.github.com/yeahunter/9eca12b3db064e5dc23b
    # https://gist.github.com/jeekl/5564476
    # https://wiki.archlinux.org/index.php/Multiboot_USB_drive
    # https://help.ubuntu.com/community/Grub2/ISOBoot/Examples

    # Notes:
    # For variables, be sure to use double-quotes to have them actually resolve.
    @@ -26,6 +28,7 @@ set default=0
    set isoPath="/ISOs"
    set linuxPath="$isoPath/Linux"
    set toolPath="$isoPath/Tools"
    set memdiskPath="/boot/memdisk"

    # Menu Colours
    set menu_color_normal=white/black
    @@ -50,7 +53,7 @@ submenu "Linux Distros" {
    initrd (loop)/isolinux/initrd0.img
    }

    menuentry "Elementary OS - linuxPath" {
    menuentry "Elementary OS" {
    set isofile="$linuxPath/elementaryos-stable-amd64.20130810.iso"
    loopback loop $isofile
    linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile quiet splash --
    @@ -197,10 +200,9 @@ submenu "Utils" {
    menuentry "SpinRite" {
    set isofile="$toolPath/SpinRite.iso"
    set gfxpayload=text
    linux16 /boot/memdisk raw
    linux16 $memdiskPath raw
    initrd16 $isofile
    }

    menuentry "SpinRite 2" {
    set isofile="$toolPath/SpinRite.iso"
    loopback loop $isofile
    @@ -259,7 +261,36 @@ submenu "Utils" {
    # set isofile="$toolPath/dban.iso"
    # loopback loop $isofile
    # linux (loop)/DBAN.BZI nuke="dwipe" iso-scan/filename=$isofile silent --
    #}
    #}


    #menuentry "Boot Hardware Detection Tool from iso using memdisk 4.05" {
    # linux16 $memdiskPath iso
    # initrd16 /customboot/hdt.iso
    #}
    #menuentry "Free Dos from iso using memdisk 4.05" {
    # set isofile="/OS/fdbasecd.iso"
    # linux16 $memdiskPath iso
    # initrd16 (hd0,6)$isofile
    #}
    menuentry "Hiren's boot CD using memdisk 4.05" {
    set isofile="$toolPath/Hiren's.BootCD.15.2.iso"
    linux16 $memdiskPath iso
    initrd16 (hd0,6)$isofile
    }
    menuentry "Ultimate Boot CD iso using memdisk 4.05" {
    set isofile="$toolPath/UBCD4WinBuilder.iso"
    linux16 $memdiskPath iso
    initrd16 (hd0,6)$isofile
    }
    #menuentry "UBCD with MEMDISK" {
    # linux16 /memdisk iso raw
    # initrd /ubcd502.iso
    #}
    #menuentry "UBCD with grub4dos" {
    # linux16 /grub.exe --config-file="map (rd) (hd32); map --hook; root (hd32); chainloader (hd32);"
    # initrd /ubcd502.iso
    #}
    }

    menuentry "System shutdown" {
  9. @Pysis868 Pysis868 revised this gist Aug 3, 2015. 1 changed file with 31 additions and 29 deletions.
    60 changes: 31 additions & 29 deletions grub.cfg
    Original file line number Diff line number Diff line change
    @@ -12,11 +12,17 @@
    # https://gist.github.com/yeahunter/9eca12b3db064e5dc23b
    # https://gist.github.com/jeekl/5564476

    # Notes:
    # For variables, be sure to use double-quotes to have them actually resolve.
    # Need to re-declare variables inside sub-menus because they open a new "context"..... great..
    # Source: https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1175127

    # Timeout for menu
    set timeout=10

    # Default boot entry
    set default=0

    set isoPath="/ISOs"
    set linuxPath="$isoPath/Linux"
    set toolPath="$isoPath/Tools"
    @@ -25,56 +31,41 @@ set toolPath="$isoPath/Tools"
    set menu_color_normal=white/black
    set menu_color_highlight=white/cyan

    submenu 'Linux Distros' {
    submenu "Linux Distros" {

    set isoPath="/ISOs"
    set linuxPath="$isoPath/Linux"

    menuentry 'kali-linux-1.1.0a-amd64' {
    set isofile='$linuxPath/kali-linux-1.1.0a-amd64.iso'
    menuentry "kali-linux-1.1.0a-amd64" {
    set isofile="$linuxPath/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 'Fedora-Live-Workstation-x86_64-21-5' {
    set isofile='$linuxPath/Fedora-Live-Workstation-x86_64-21-5.iso'
    menuentry "Fedora-Live-Workstation-x86_64-21-5" {
    set isofile="$linuxPath/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 "Elementary OS - linuxPath" {
    set isofile='$linuxPath/elementaryos-stable-amd64.20130810.iso'
    loopback loop $isofile
    linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile quiet splash --
    initrd (loop)/casper/initrd.lz
    }
    menuentry "Elementary OS - linuxPath2" {
    set isofile="$linuxPath/elementaryos-stable-amd64.20130810.iso"
    loopback loop $isofile
    linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile quiet splash --
    initrd (loop)/casper/initrd.lz
    }
    menuentry "Elementary OS - isoPath" {
    set isofile='$isoPath/Linux/elementaryos-stable-amd64.20130810.iso'
    loopback loop $isofile
    linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile quiet splash --
    initrd (loop)/casper/initrd.lz
    }
    menuentry "Elementary OS - Direct Path" {
    set isofile='/ISOs/Linux/elementaryos-stable-amd64.20130810.iso'
    loopback loop $isofile
    linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile quiet splash --
    initrd (loop)/casper/initrd.lz
    }

    #menuentry "linuxmint-17.1-xfce-64bit" {
    # set isofile='$linuxPath/linuxmint-17.1-xfce-64bit.iso'
    # set isofile="$linuxPath/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 'ubuntu-14.04.2-desktop-amd64' {
    # set isofile='$linuxPath/ubuntu-14.04.2-desktop-amd64.iso'
    #menuentry "ubuntu-14.04.2-desktop-amd64" {
    # set isofile="$linuxPath/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
    @@ -189,11 +180,15 @@ submenu 'Linux Distros' {
    }

    #menuentry "win7" {
    # loopback loop /win7.iso
    # loopback loop "$isoPath/win7.iso"
    # chainloader (loop)
    #}

    submenu 'Utils' {
    submenu "Utils" {

    set isoPath="/ISOs"
    set toolPath="$isoPath/Tools"

    menuentry "Memtest 86+" {
    set isofile="$toolPath/memtest86+-5.01.iso"
    linux16 $isofile
    @@ -206,6 +201,13 @@ submenu 'Utils' {
    initrd16 $isofile
    }

    menuentry "SpinRite 2" {
    set isofile="$toolPath/SpinRite.iso"
    loopback loop $isofile
    linux (loop)/vmlinuz boot=cd isofrom=$isofile xbmc=nvidia,nodiskmount,tempfs,setvolume loglevel=0 --
    initrd (loop)/initrd0.img
    }

    menuentry "gparted-live-0.22.0-2-i586" {
    set isofile="$toolPath/gparted-live-0.22.0-2-i586.iso"
    # set gfxpayload=text
    @@ -268,4 +270,4 @@ menuentry "System shutdown" {
    menuentry "System restart" {
    echo "System rebooting..."
    reboot
    }
    }
  10. @Pysis868 Pysis868 revised this gist Aug 3, 2015. 1 changed file with 25 additions and 7 deletions.
    32 changes: 25 additions & 7 deletions grub.cfg
    Original file line number Diff line number Diff line change
    @@ -41,12 +41,30 @@ submenu 'Linux Distros' {
    initrd (loop)/isolinux/initrd0.img
    }

    #menuentry "Elementary OS" {
    # set isofile='$linuxPath/elementaryos-stable-amd64.20130810.iso'
    # loopback loop $isofile
    # linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile quiet splash --
    # initrd (loop)/casper/initrd.lz
    #}
    menuentry "Elementary OS - linuxPath" {
    set isofile='$linuxPath/elementaryos-stable-amd64.20130810.iso'
    loopback loop $isofile
    linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile quiet splash --
    initrd (loop)/casper/initrd.lz
    }
    menuentry "Elementary OS - linuxPath2" {
    set isofile="$linuxPath/elementaryos-stable-amd64.20130810.iso"
    loopback loop $isofile
    linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile quiet splash --
    initrd (loop)/casper/initrd.lz
    }
    menuentry "Elementary OS - isoPath" {
    set isofile='$isoPath/Linux/elementaryos-stable-amd64.20130810.iso'
    loopback loop $isofile
    linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile quiet splash --
    initrd (loop)/casper/initrd.lz
    }
    menuentry "Elementary OS - Direct Path" {
    set isofile='/ISOs/Linux/elementaryos-stable-amd64.20130810.iso'
    loopback loop $isofile
    linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile quiet splash --
    initrd (loop)/casper/initrd.lz
    }

    #menuentry "linuxmint-17.1-xfce-64bit" {
    # set isofile='$linuxPath/linuxmint-17.1-xfce-64bit.iso'
    @@ -182,7 +200,7 @@ submenu 'Utils' {
    }

    menuentry "SpinRite" {
    set isofile="$toolPath/SpinRite.img"
    set isofile="$toolPath/SpinRite.iso"
    set gfxpayload=text
    linux16 /boot/memdisk raw
    initrd16 $isofile
  11. @Pysis868 Pysis868 revised this gist Aug 3, 2015. No changes.
  12. @Pysis868 Pysis868 created this gist Aug 3, 2015.
    253 changes: 253 additions & 0 deletions grub.cfg
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,253 @@
    # Config for GNU GRand Unified Bootloader (GRUB)
    # /boot/grub/grub.cfg

    # This grub.cfg file was created by Lance http://www.pendrivelinux.com
    # Suggested Entries and the suggestor, if available, will also be noted.

    # Sources:
    # http://www.pendrivelinux.com/boot-multiple-iso-from-usb-via-grub2-using-linux/#more-5352
    # https://gist.github.com/jamiekurtz/26c46b3e594f8cdd453a
    # https://gist.github.com/noisufnoc/e0053d738f5fbb679535
    # https://gist.github.com/samdoran/90056b8e4a2aedc6a3e8
    # https://gist.github.com/yeahunter/9eca12b3db064e5dc23b
    # https://gist.github.com/jeekl/5564476

    # Timeout for menu
    set timeout=10

    # Default boot entry
    set default=0
    set isoPath="/ISOs"
    set linuxPath="$isoPath/Linux"
    set toolPath="$isoPath/Tools"

    # Menu Colours
    set menu_color_normal=white/black
    set menu_color_highlight=white/cyan

    submenu 'Linux Distros' {

    menuentry 'kali-linux-1.1.0a-amd64' {
    set isofile='$linuxPath/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 'Fedora-Live-Workstation-x86_64-21-5' {
    set isofile='$linuxPath/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 "Elementary OS" {
    # set isofile='$linuxPath/elementaryos-stable-amd64.20130810.iso'
    # loopback loop $isofile
    # linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile quiet splash --
    # initrd (loop)/casper/initrd.lz
    #}

    #menuentry "linuxmint-17.1-xfce-64bit" {
    # set isofile='$linuxPath/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 'ubuntu-14.04.2-desktop-amd64' {
    # set isofile='$linuxPath/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 "Linux Mint ISO" {
    # set isofile="$linuxPath/linuxmint.iso"
    # loopback loop $isofile
    # linux (loop)/casper/vmlinuz file=/cdrom/preseed/mint.seed boot=casper initrd=/casper/initrd.lz iso-scan/filename=$isofile noeject noprompt splash --
    # initrd (loop)/casper/initrd.lz
    #}

    #menuentry "Tinycore ISO" {
    # set isofile="$linuxPath/tinycore.iso"
    # loopback loop $isofile
    # linux (loop)/boot/bzImage --
    # initrd (loop)/boot/tinycore.gz
    #}

    #menuentry "ArchLinux x86_64" {
    # set iso="/iso/archlinux-2014.06.01-dual.iso"
    # loopback loop $iso
    # linux (loop)/arch/boot/x86_64/vmlinuz archisolabel=ARCH_201406 img_dev=/dev/disk/by-label/UNJEB img_loop=$iso earlymodules=loop
    # initrd (loop)/arch/boot/x86_64/archiso.img
    #}
    #menuentry "ArchLinux 32 Bit" {
    # set iso="/iso/archlinux-2014.06.01-dual.iso"
    # loopback loop $iso
    # linux (loop)/arch/boot/i686/vmlinuz archisolabel=ARCH_201406 img_dev=/dev/disk/by-label/UNJEB img_loop=$iso earlymodules=loop
    # initrd (loop)/arch/boot/i686/archiso.img
    #}

    #menuentry "CentOS 6 x86_64 minimal" {
    # set iso="/iso/CentOS-6.5-x86_64-minimal.iso"
    # loopback loop $iso
    # linux (loop)/isolinux/vmlinuz noeject inst.stage2=hd:LABEL=UNJEB:/$iso
    # initrd (loop)/isolinux/initrd.img
    #}
    #menuentry "CentOS 6 x86_64 minimal with basic video driver" {
    # set iso="/iso/CentOS-6.5-x86_64-minimal.iso"
    # loopback loop $iso
    # linux (loop)/isolinux/vmlinuz noeject inst.stage2=hd:LABEL=UNJEB:/$iso xdriver=vesa nomodset askmethod
    # initrd (loop)/isolinux/initrd.img
    #}

    #menuentry "Xbuntu 14.04 Beta - 64bit" {
    # set iso="/iso/xubuntu-14.04-beta1-desktop-amd64.iso"
    # loopback loop $iso
    # linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$iso noprompt noeject splash --
    # initrd (loop)/casper/initrd.lz
    #}

    #menuentry "Boot Finnix 109 (64-bit)" {
    # set iso="/iso/finnix-109.iso"
    # loopback loop $iso
    # linux (loop)/boot/x86/linux64 findiso=$iso vga=791 nomodeset quiet --
    # initrd (loop)/boot/x86/initrd.xz
    #}
    #menuentry "Boot Finnix 109 (64-bit, text mode)" {
    # set iso="/iso/finnix-109.iso"
    # loopback loop $iso
    # linux /boot/x86/linux64 findiso=$iso vga=normal nomodeset quiet --
    # initrd /boot/x86/initrd.xz
    #}

    #menuentry "Boot Finnix 109 (32-bit)" {
    # set iso="/iso/finnix-109.iso"
    # loopback loop $iso
    # linux /boot/x86/linux findiso=$iso vga=791 nomodeset quiet --
    # initrd /boot/x86/initrd.xz
    #}
    #menuentry "Boot Finnix 109 (32-bit, text mode)" {
    # set iso="/iso/finnix-109.iso"
    # loopback loop $iso
    # linux /boot/x86/linux findiso=${iso_path} vga=normal nomodeset quiet --
    # initrd /boot/x86/initrd.xz
    #}

    #menuentry "TAILS - The Amnesic Incognito Live System" {
    # set iso="/iso/tails-i386-0.17.2.iso"
    # loopback loop $iso
    # linux (loop)/live/vmlinuz boot=live config live-media=removable nopersistent noprompt quiet timezone=Europe/Stockholm block.events_dfl_poll_msecs=1000 splash nox11autologin module=Tails findiso=$iso quiet_
    # initrd (loop)/live/initrd.img
    #}

    #menuentry "GRML - the sysadmins best friend" {
    # set iso="/iso/grml64-full_2013.02.iso"
    # loopback loop $iso
    # set root=(loop)
    # configfile /boot/grub/loopback.cfg
    #}

    #menuentry "Debian 7.0 Wheezy AMD64 Installer (netinst, firmware)" {
    # set iso="/iso/debian-7.0.0-amd64-firmware-netinst.iso"
    # loopback loop $iso
    # linux (loop)/install.amd/vmlinuz
    # initrd (loop)/install.amd/initrd.gz
    #}

    #menuentry "Debian 7.0 Wheezy AMD64 Live system (GNOME, firmware/non-free)" {
    # set iso="/iso/debian-live-7.0.0-amd64-gnome-desktop+nonfree.iso"
    # loopback loop $iso
    # linux (loop)/live/vmlinuz boot=live
    # initrd (loop)/live/initrd.img
    #}

    menuentry "Damn Small Linux" {
    # Maybe try this instead later: https://gist.github.com/oxplot/2041319
    linux16 /boot/bootdistro/damnsmall/isolinux/linux24 knoppix_dir=damnsmall ramdisk_size=100000 lang=en apm=power-off nomce noapic quiet BOOT_IMAGE=knoppix
    initrd16 /boot/bootdistro/damnsmall/isolinux/minirt24.gz
    }
    }

    #menuentry "win7" {
    # loopback loop /win7.iso
    # chainloader (loop)
    #}

    submenu 'Utils' {
    menuentry "Memtest 86+" {
    set isofile="$toolPath/memtest86+-5.01.iso"
    linux16 $isofile
    }

    menuentry "SpinRite" {
    set isofile="$toolPath/SpinRite.img"
    set gfxpayload=text
    linux16 /boot/memdisk raw
    initrd16 $isofile
    }

    menuentry "gparted-live-0.22.0-2-i586" {
    set isofile="$toolPath/gparted-live-0.22.0-2-i586.iso"
    # set gfxpayload=text
    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
    }

    #menuentry "Parted Magic" {
    # set isofile="$isopath/pmagic.iso"
    # loopback loop $isofile
    # linux (loop)/pmagic/bzImage iso_filename=$isofile edd=off load_ramdisk=1 prompt_ramdisk=0 rw gfxpayload=800x600x16 loglevel=9 max_loop=256 vmalloc=384MiB keymap=dvorak
    # initrd (loop)/pmagic/initrd.img
    #}

    menuentry "SystemRescueCd" {
    set isofile="$toolPath/systemrescuecd.iso"
    loopback loop $isofile
    linux (loop)/isolinux/rescuecd isoloop=$isofile setkmap=us docache dostartx
    # Or linux (loop)/isolinux/rescue32
    # Or linux (loop)/isolinux/rescue64
    initrd (loop)/isolinux/initram.igz
    }

    menuentry "CloneZilla" {
    set isofile="$toolPath/clonezilla-live-2.4.2-10-amd64.iso"
    loopback loop $isofile
    linux (loop)/live/vmlinuz boot=live live-config union=aufs nolocales noprompt gfxpayload=800x600x16 ip=frommedia findiso=$isofile
    initrd (loop)/live/initrd.img
    }

    #menuentry "Ophcrack No Tables" {
    # set isofile="$isopath/ophcrack-notables.iso"
    # set gfxpayload=text
    # loopback loop $isofile
    # linux (loop)/boot/bzImage root=/dev/null rw lang=en_US kmap=dvorak autologin iso-scan/filename=$isofile
    # initrd (loop)/boot/rootfs.gz
    #}

    #menuentry "Ophcrack Vista/7 Tables" {
    # set isofile="$isopath/ophcrack-vistatables.iso"
    # set gfxpayload=text
    # loopback loop $isofile
    # linux (loop)/boot/bzImage root=/dev/null rw lang=en_US kmap=dvorak autologin iso-scan/filename=$isofile
    # initrd (loop)/boot/rootfs.gz
    #}

    #menuentry "DBAN ISO" {
    # set isofile="$toolPath/dban.iso"
    # loopback loop $isofile
    # linux (loop)/DBAN.BZI nuke="dwipe" iso-scan/filename=$isofile silent --
    #}
    }

    menuentry "System shutdown" {
    echo "System shutting down..."
    halt
    }

    menuentry "System restart" {
    echo "System rebooting..."
    reboot
    }