Monday, 18 January 2010

Booting Ubuntu/Linux Mint from ISO

Last time I prepared the USB drive to boot from ISO. That's great, but it's no good if there are no ISOs to boot into.

First off, I set up Ubuntu in GRUB. Fortunately, this was pretty easy to do. Ubuntu supports booting from ISO using the iso-scan kernel parameter. Since Linux Mint is derived from Ubuntu, it also supports this parameter. The following lines in the GRUB2 config will enable booting from a Ubuntu/Linux Mint ISO.

menuentry "Ubuntu 9.10 32bit" {
    loopback loop /ubuntu-9.10-desktop-i386.iso
    linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/ubuntu-9.10-desktop-i386.iso noeject noprompt --
    initrd (loop)/casper/initrd.lz

The loopback line loads the ISO in a way that GRUB can locate the kernel and initrd. The stuff about casper is something used for data persistence (so that the ISO remains read-only). I don't have that enabled yet. This GRUB entry works similarly for Ubuntu (32- & 64-bit), Ubuntu Netbook Remix, and Linux Mint (32- & 64-bit).


sm said...

I'm running a Linux PC with the older GRUB (i.e., not GRUB2). Can I boot the ISO on this machine?

QuLogic said...

I don't think GRUB 0.97 supports reading stuff out of ISOs. You might be able to do it by first extracting the kernel and initrd images and pointing GRUB at those.

vaikz said...

do you have any idea how to boot mint 10 from ISO using grub4dos?