It may be much easier than the impression you get from all the detailed explanations on the web. I just did the following on Ubuntu 12.04 to boot FreeDOS .iso for a firmware update
I came across here because I got tired of burning countless bootable ISO 9660 images and thus wanted to use GRUB 2 to bootstrap a FreeDOS one for updating the firmware/microcode of Seagate HDDs. As a complement or alternative to mivk's answer (using memdisk of syslinux), the following was what I had done to leverage the power of GRUB 2:
Install the syslinux-common package (for using memdisk within it; grub-imageboot is a non-essential hooking package)
Press the 'c' key (mnemonic for command) to activate the command prompt of GRUB 2's builtin mini-shell (or, more precisely, the minimal BASH-like shell)
Issue the 3 lines of commands in the GRUB 2's mini-shell:
linux16 (hd0,gpt2)/usr/lib/syslinux/memdisk iso raw
initrd16 (hd0,gpt3)/myUserAccount/download/Barracuda-ALL-GRCC4H.iso
boot
# where Barracuda-ALL-GRCC4H.iso is a FreeDOS-based ISO 9660 image, and
# the mathematical 2-tuples or ordered pairs, (hd0,gpt2) and (hd0,gpt3),
# are GRUB 2's respective device notations for my rootfs partition
# (e.g., /dev/sda2) and home partition (e.g., /dev/sda3).
# NOTE: This procedure also applies to Seagate's SeaTools (based on
# FreeDOS as well); just substitute the file SeaToolsDOS223ALL.iso
# for Barracuda-ALL-GRCC4H.iso.
By manipulating commands directly in the mini-shell, this procedure is more flexible and smipler than most of the aforesaid methods since you do not have to bother to tweak and update those GRUB 2's configurations every time you wanna try a different Linux distro or a BSD-based live CD.
Currently, it is these 4 lines of commands that one can use as a generic pattern in the GRUB 2's mini-shell, i.e., the loopback-linux-initrd-boot sequence plus some argument(s) passed to the given kernel, for example, to bootstrap as many popular Linux ISO images as possible (in this case is with 3 kernel commandline arguments for System Rescue CD):
N.B. The loopback part of the generic pattern is not, strictly speaking, mandatory for Linux, when you intend to install a Linux distro such as a Debian derivative without wasting an optical disc.
My ISO files are stored on sda3 under
/ansi/software_and_config/ISOs/ubuntu/.
In order to change it for your needs
there are 3 elements to change. The
loopback line contains your hard disk
in grub style (hdx,y x=0->sda
x=1->sdb aso) and the path. The third
element to change is in the linux
line. Store this file as “50_ubuntu”
in “/etc/grub.d“, make it executable
with “chmod a+x 50_ubuntu” and
activate the changes with
“ubdate-grub“. After a reboot you
should be able to activate the grub
menu with the shift-key and select the
new entry.
(Note: if someone can use the proper [CODE] formatting, that'd be great. I can't seem to get it to work properly. --tyblu)
This will allow you to boot from an ISO file, but only if the ISO supports it. (All recent Ubuntu releases should, as should a number of other distros).
If you plan on installing from the live ISO, you should put the file on a different partition from the one you will be installing to (since you can't write to the partition that you are running off of). Chances are, the installer will complain anyway. What you have to do is manually edit /etc/mtab and remove the entry that corresponds to the partition with the ISO file.
It may be much easier than the impression you get from all the detailed explanations on the web. I just did the following on Ubuntu 12.04 to boot FreeDOS .iso for a firmware update
Or copy/paste these:
That's it.
Sometimes, you may need 2 more steps to do before running update-grub2:
If you never did it before, you need to edit /etc/default/grub so that you see the grub menu on boot:
For some .iso images, you may need to add this option in /etc/default/grub-imageboot : (I needed it for my FreeDOS .iso)
If you did edit one of these config. files, you need to run
update-grub2
again.Update: Here is the resulting menuentry asked by "dma_k"
This was for a FreeDOS image with some firmware update or such.
I'm assuming you want to add a .iso entry to the GRUB menu and boot it ?
I found this info on Ubuntu Forums
I came across here because I got tired of burning countless bootable ISO 9660 images and thus wanted to use GRUB 2 to bootstrap a FreeDOS one for updating the firmware/microcode of Seagate HDDs. As a complement or alternative to mivk's answer (using
memdisk
of syslinux), the following was what I had done to leverage the power of GRUB 2:memdisk
within it; grub-imageboot is a non-essential hooking package)Information on
memdisk
of syslinux is at http://www.syslinux.org/wiki/index.php/MEMDISKBy manipulating commands directly in the mini-shell, this procedure is more flexible and smipler than most of the aforesaid methods since you do not have to bother to tweak and update those GRUB 2's configurations every time you wanna try a different Linux distro or a BSD-based live CD.
Currently, it is these 4 lines of commands that one can use as a generic pattern in the GRUB 2's mini-shell, i.e., the loopback-linux-initrd-boot sequence plus some argument(s) passed to the given kernel, for example, to bootstrap as many popular Linux ISO images as possible (in this case is with 3 kernel commandline arguments for System Rescue CD):
N.B. The
loopback
part of the generic pattern is not, strictly speaking, mandatory for Linux, when you intend to install a Linux distro such as a Debian derivative without wasting an optical disc.http://ansi.interblc.com/2010/02/06/howto-boot-iso-images-via-grub2-with-ubuntu/
(Note: if someone can use the proper [CODE] formatting, that'd be great. I can't seem to get it to work properly. --tyblu)
As Mark Rooney said, you can find a great guide on the Ubuntu Forums.
This will allow you to boot from an ISO file, but only if the ISO supports it. (All recent Ubuntu releases should, as should a number of other distros).
If you plan on installing from the live ISO, you should put the file on a different partition from the one you will be installing to (since you can't write to the partition that you are running off of). Chances are, the installer will complain anyway. What you have to do is manually edit
/etc/mtab
and remove the entry that corresponds to the partition with the ISO file.To boot from an ISO file on USB disk/stick, probably the most user-friendly way is MultiSystem: http://liveusb.info/dotclear/index.php?pages/install
You just drag-and-drop to have most ISO images included in the boot menu of your LiveUSB disk/stick.