Sunday 14 June 2015


Boot Ubuntu ISO using GRUB2 without any removable media

NB: Please try at your risk, you may risk loss of data or malfunction of hardware by attempting the following steps. Proceed with caution!

GRUB is giving a facility to boot the iso images stored in your hard-drive(HDD) without the help of boot-able USB of CD/DVD. This becomes handy when the OS is crashed and you have no way to get the image out of your PC to flash it and make it bootable USB/DVD (If you cannot access PC, then how will you take out the data to a pen drive?)

Principle: What we are trying to achieve is to load the contents of the Ubuntu image to the RAM of the computer. Which means you need to have sufficient amount of RAM to hold the content of the entire image (Size depends on the image you are choosing). If your RAM size is not sufficient, it will simply freeze.

>>>ls   #(hd0,msdos0),(hd0,msdos1),,,,
#ls command can be used to see the contents of each partition. Let us say your image is in a logical partition, traverse like
>>>ls (hd0,msdos5)/softwares/linux/ubuntu-14.04.2-desktop-amd64.iso
>>>set isofile="/softwares/linux/ubuntu-14.04.2-desktop-amd64.iso"
>>>loopback loop (hd0,msdos5)$isofile
>>>linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=$isofile noprompt noeject toram --
>>>initrd (loop)/casper/initrd.lz
>>>boot

Now all the contents will be copied to RAM and live session will be booted. You can repair or reinstall now.