Boot a live CD iso on your hard drive using GRUB2


Boot an iso on your hard drive using grub2 - March 13, 2018

See -

This post was inspired by a user question a few weeks ago. Following these guides helped me create the following two entries in my custom grub file located at /etc/grub.d/06_custom. You may edit the provided 40_custom file instead if that is more convenient. The entries below are provided as an example.

menuentry "live CD (on /dev/sda6)" {
	set isofile="/Iso/ubuntu-mate-16.04.4-desktop-amd64.iso"
	loopback loop (hd0,6)$isofile
	linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=$isofile quiet splash video=SVIDEO-1:d
	initrd (loop)/casper/initrd.lz

Line 1 is the name you want to display in your grub menu.

Line 2, the path seen between the quotes is on a data partition /dev/sda6, note no “/home/data4” needed.

Line 3, “(hd0,6)” provides the drive location on my sda6.

Line 4, the .efi suffix for vmlinuz is needed with 64 bit isos, quiet splash was added to remove a lot of garbage, and the “video=SVIDEO-1:d” boot parameter was added to accommodate the integrated graphics card on this old laptop.

I also wanted to add an entry for partition magic but it required something more specific. I added a pmagic folder to my boot directory and, following their instructions, entered the following in my custom grub file -

menuentry "Parted Magic" {
	set root=(hd0,7) # 16.04 root on /dev/sda7
	linux /boot/pmagic/bzImage64 root=/dev/sda7 directory=boot edd=on vga=normal # root location
	initrd /boot/pmagic/initrd.img /boot/pmagic/fu.img /boot/pmagic/m64.img

See -

Make sure that your custom grub file is executable. Then after making changes in this file, remember to enter sudo update-grub and reboot to see the changes.

Use Clonezilla from a 2nd drive

Talk about a complicated and long process....

I think I'll stick with my current setup. :slight_smile:


Very useful instructions. Thanks Mdooly.