Booting live ISO images from Grub2

Here is a listing of my grub.d directory

$ls -l /etc/grub.d/

-rwxr-xr-x 1 root root 3296 2009-12-08 04:38 00_header
-rwxr-xr-x 1 root root 1175 2010-03-27 01:06 05_debian_theme
-rwxr-xr-x 1 root root 3778 2009-12-08 04:38 10_linux
-rw-r--r-- 1 root root 772 2009-10-23 21:41 20_memtest86+
-rwxr-xr-x 1 root root 5467 2009-12-08 04:38 30_os-prober
-rwxr-xr-x 1 root root 533 2010-04-06 11:59 40_custom
-rw-r--r-- 1 root root 483 2009-12-08 04:38 README


Edit 40_custom

sudo vim /etc/grub.d/40_custom

Append the following to the file

menuentry "Kubuntu_10.04_i386.iso"{
loopback loop (hd0,2)/Kubuntu_10.04_i386.iso
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/Kubuntu_10.04_i386.iso noeject noprompt --
initrd (loop)/casper/initrd.lz
}

Save the file and run update-grub

$update-grub

Grub menu will now be updated to show the newly added Kubuntu entry.

Advertisements