Ubuntu – Using a bootable live cd disk image mounted on the hard drive

grub2isolive-cdmount

I want to mount the contents of a boot-able CD image, like Ubuntu rescue remix, to a partition of the hard drive.

So I can have an entry in Grub to boot to the contents of that disk, http://www.linuxquestions.org/questions/linux-general-1/boot-iso-image-from-hard-disk-294744/ , details a similar process used for a Knoppix CD. Is there a way to do this for Ubuntu disks.

Best Answer

While I rather doubt it's possible to mount the contents of something to a partition, there is an ubuntuforums.org thread that explains how to boot ISO images with Grub2.

http://ubuntuforums.org/showthread.php?t=1549847

Basically, you edit /etc/grub.d/40_custom by copying/pasting one of the examples provided in post #1 (version name/ISO may be out of date), modify the entry according to your ISO location and partition layout, and then run update-grub .

Here is an example of the entry (for version 14.04):

menuentry 'ISO Trusty ' {
isofile=ubuntu-14.04.1-desktop-amd64.iso
loopback loop (hd0,1)/iso/$isofile
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/iso/$isofile noprompt noeject
initrd (loop)/casper/initrd.lz
}