Skip to content

Instantly share code, notes, and snippets.

@agumonkey
Created April 22, 2016 20:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save agumonkey/9e8f515a75716a0bf30115b258144f48 to your computer and use it in GitHub Desktop.
Save agumonkey/9e8f515a75716a0bf30115b258144f48 to your computer and use it in GitHub Desktop.
a grub template to boot an archlinux iso straight from the image using grub2 loopback
menuentry "Archlinux-2015.09.01-dual.iso [x86_64]" --class iso {
set isofile="/archlinux-2015.09.01-dual.iso"
set partition="2"
echo -n 'loop > '
loopback loop (hd0,$partition)/$isofile
echo -n 'kern > '
linux (loop)/arch/boot/x86_64/vmlinuz archisolabel=ARCH_201509 img_dev=/dev/disk/by-uuid/1b8e7605-4a1b-4e8d-a67e-44c5734f0313 img_loop=$isofile earlymodules=loop
# linux (loop)/arch/boot/x86_64/vmlinuz archisolabel=ARCH_201509 img_dev=/dev/disk/by-label/boot img_loop=$isofile earlymodules=loop
echo -n 'init > '
initrd (loop)/arch/boot/x86_64/archiso.img
echo -n 'boot >>> ...'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment