Monday, 8 April 2013

GRUB2 ISO Boot

A new feature in Grub 2 is the ability to boot raw ISO files. And, it is surprisingly simple.

Before continuing with this tutorial, please backup your files. I do not accept any liability for damage to systems.

  1. Download an ISO image of your favorite distribution (I'm using Ubuntu 12.10, others may need different configuration). 64 bit requires a different configuration.
  2. Move the ISO image to to the /boot section of your system. (This requires root privileges, so use: sudo mv).
  3. Using root, edit /boot/grub/grub.cfg. Change the isofile variable and paste the following below the line: ### END /etc/grub.d/10_linux_proxy ###:

menuentry "Ubuntu ISO"{
        set isofile="/boot/ubuntu-12.10-desktop-i386.iso"
        loopback loop (hd1,5)$isofile
        linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile noprompt noeject
        initrd (loop)/casper/initrd.lz
}

 Thats it. Save, exit and reboot. Choose Ubuntu ISO in the grub menu. If you run into any problems, use a live CD to mount the grub partition and edit it by hand.

No comments :

Post a Comment

Please be responsible with comments. Any comments made on posts over 14 days will be moderated before appearing on the site.