Skip to content

Instantly share code, notes, and snippets.

@countingpine
Last active April 12, 2018 19:31
Show Gist options
  • Select an option

  • Save countingpine/f265983f8e2cb2df7aac51c29aafc881 to your computer and use it in GitHub Desktop.

Select an option

Save countingpine/f265983f8e2cb2df7aac51c29aafc881 to your computer and use it in GitHub Desktop.
grub menuentries for booting from different ISO files
# To use: adjust as needed, place in /etc/grub.d, make executable, run 'sudo update-grub'
# Ubuntu
# https://help.ubuntu.com/community/Grub2/ISOBoot/Examples
menuentry 'Ubuntu 12.04 (64-bit)' {
set isofile="/iso/ubuntu-12.04-desktop-amd64.iso"
loopback loop (hd0,1)$isofile
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile noprompt noeject keyboard-configuration/layoutcode=gb
initrd (loop)/casper/initrd.lz
}
# OpenSuSE
# https://forums.opensuse.org/showthread.php/484223-How-to-boot-a-openSUSE-DVD-from-hard-disk-with-Grub2
menuentry "openSUSE 12.3 Gnome Live HDD" {
set isofile=/iso/openSUSE-12.3-GNOME-Live-x86_64.iso
loopback loop (hd0,1)$isofile
linux (loop)/boot/x86_64/loader/linux isofrom=/dev/sda1:$isofile
initrd (loop)/boot/x86_64/loader/initrd
}
menuentry "openSUSE 13.2 Gnome Live HDD" {
set isofile=/iso/openSUSE-13.2-GNOME-Live-x86_64.iso
set dev=/dev/sda1
loopback loop (hd0,1)$isofile
linux (loop)/boot/x86_64/loader/linux isofrom=$dev:$isofile isofrom_device=$dev isofrom_system=$isofile
initrd (loop)/boot/x86_64/loader/initrd
}
# Tiny Core
# http://forum.tinycorelinux.net/index.php/topic=13501
# http://forum.tinycorelinux.net/index.php?topic=19391
# (Not particularly recommended?)
menuentry "Tiny Core 8.2.1" {
set isofile="/iso/CorePlus-8.2.1.iso"
loopback loop (hd0,1)$isofile
linux (loop)/boot/vmlinuz kmap=qwerty/uk blacklist=pcspkr iso=/mnt/sda1$isofile cde
initrd (loop)/boot/core.gz
}
# Knoppix
# https://help.ubuntu.com/community/Grub2/ISOBoot/Examples#Knoppix
# (Additional interesting (but unneeded?) troubleshooting in https://unix.stackexchange.com/questions/102529/booting-a-knoppix-iso-from-grub-device-uri-madness?)
# (Some additional settings that I personally needed/wanted)
menuentry "Knoppix 8.1 DVD ISO" {
set isofile="/iso/KNOPPIX_V8.1-2017-09-05-EN.iso"
loopback loop (hd0,1)$isofile
linux (loop)/boot/isolinux/linux bootfrom=/dev/sda1$isofile lang=us keyboard=uk xkeyboard=uk utc tz=Europe/London no3d acpi=off
initrd (loop)/boot/isolinux/minirt.gz
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment