Skip to content

Instantly share code, notes, and snippets.

@zcot
Created June 28, 2020 02:54
Show Gist options
  • Save zcot/b50c0ff547b7c221d1a99cd89d259262 to your computer and use it in GitHub Desktop.
Save zcot/b50c0ff547b7c221d1a99cd89d259262 to your computer and use it in GitHub Desktop.
.iso boot from grub menu, written in /etc/grub.d/40_custom
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry 'Mint 20 .iso' {
set isofile='/home/zcot/Downloads/linuxmint-20-xfce-64bit-beta.iso'
loopback loop (hd0,1)$isofile
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=${isofile} quiet splash
initrd (loop)/casper/initrd.lz
}
menuentry 'Mint LMDE4 .iso' {
insmod ext2
set isofile='/home/zcot/Downloads/lmde-4-cinnamon-64bit.iso'
set initrdfile='/home/zcot/Downloads/lmde-4-cinnamon-64bit.iso/live/initrd.lz'
set root=(hd0,1)$isofile
loopback loop (hd0,1)$isofile
linux (loop)/live/vmlinuz findiso=$isofile boot=live live-config live-media-path=/live quiet splash --
initrd (loop)/live/initrd.lz
}
menuentry 'Ubuntu 20 .iso' {
set isofile='/home/zcot/Downloads/ubuntu-20.04-desktop-amd64.iso'
loopback loop (hd0,1)$isofile
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=${isofile} quiet splash
initrd (loop)/casper/initrd
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment