How to boot ISO files with GRUB
2010-11-06 15:45:00
2010-11-06 15:24:43
Autor: Sony Santos
https://gigawiki.com/sony/how-to-boot-iso-files-with-grub
Permalink: https://gigawiki.com/899
categ = artigos; idioma = inglês
Hello!

I was looking through internet for how to boot ISO files from a boot loader, and I'd like that boot loader was GRUB.

But I saw in some forums that GRUB doesn't do that directly, unless by extracting the contents and/or copying the file to an empty partition.

However, I found that Grub4DOS boots some ISO files (and it works on DOS, Windows and Linux, not only the named DOS), and Grub2 can do it also.

Here an example of menu.lst Grub4DOS config file to boot an ISO image:
title Puppy Linux 5.1.1 (Lucid Puppy)
  find --set-root /linux/puppy.iso
  map /linux/puppy.iso (0xff) || map --mem /linux/puppy.iso (0xff)
  map --hook
  chainloader (0xff)

Here an example of grub.cfg Grub2 config file to boot an ISO image:
menuentry "Ubuntu 10.04" {
  set isofile="/boot/iso/ubuntu-10.04-desktop-i386.iso"
  loopback loop (hd0,1)$isofile
  linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile noprompt noeject
  initrd (loop)/casper/initrd.lz
}

References:
Grub4DOS Guide
Grub 2 Guide

Hope you enjoy! 
blog comments powered by Disqus