How to boot ISO image from your hard drive

This guide will shown you how to boot an ISO image file that stored in your hard drive. Booting an ISO on your hard drive is useful for testing new versions of Linux ISO file without using up a CD/DVD or USB Stick. On this case I will boot Ubuntu 13.04 iso directly from hard disk via the Grub2 boot menu. Create a directory named iso in your root folder using this command:

# sudo mkdir /isoimage

Now copy ubuntu 13.04 iso file (ubuntu-13.04-desktop-i386.iso) to directory /isoimage :

# sudo cp -v ~/ISOFILE/ubuntu-13.04-desktop-i386.iso /isoimage

Edit /boot/grub/grub.cfg file with following command:

# sudo nano /etc/grub.d/40_custom

add these lines to Custom GRUB Configuration file (/etc/grub.d/40_custom):

menuentry "Ubuntu 13.04 Live" {
 set root=(hd0,1)
 loopback loop /isoimage/ubuntu-13.04-desktop-i386.iso
 linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/isoimage/ubuntu-13.04-desktop-i386.iso noprompt noeject
 initrd (loop)/casper/initrd.lz
}

After this enter command:

# sudo update-grub
Edit file /etc/grub.d/40_custom

Save your file and exit. Then reboot ubuntu and hold down the Shift key to bring up the Grub boot menu. Select Ubuntu 13.04 Live to boot ubuntu 13.04 iso image from hard drive

Ubuntu Desktop 13.04 Grub

Reference: Grub examples

Exit mobile version