Skip to content

Instantly share code, notes, and snippets.

@francoiscolas
Last active September 3, 2022 08:52
Show Gist options
  • Save francoiscolas/5468288 to your computer and use it in GitHub Desktop.
Save francoiscolas/5468288 to your computer and use it in GitHub Desktop.
Boot to ISO from Grub.
#!/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 "Ubuntu ISO" {
set root=(hd0,4)
set iso=/ubuntu.iso
loopback loop $iso
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$iso only-ubiquity
initrd (loop)/casper/initrd
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment