I found that it can be done with loopback
as follows
menuentry "Lucid ISO" {
loopback loop (hd0,1)/boot/iso/ubuntu-10.04-desktop-i386.iso
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/boot/iso/ubuntu-10.04-desktop-i386.iso noprompt noeject
initrd (loop)/casper/initrd.lz
}
But it works only with ubuntu or its derivatives. How it should be written if I want to boot other live images like fedora, cent, opensuse etc. ?
Edit: I found some other entries but all of them are probably debian based.
menuentry "Linux Mint 10 Gnome ISO" {
loopback loop /linuxmint10.iso
linux (loop)/casper/vmlinuz file=/cdrom/preseed/mint.seed boot=casper initrd=/casper/initrd.lz iso-scan/filename=/linuxmint10.iso noeject noprompt splash --
initrd (loop)/casper/initrd.lz
}
menuentry "DBAN ISO" {
loopback loop /dban.iso
linux (loop)/DBAN.BZI nuke="dwipe" iso-scan/filename=/dban.iso silent --
}
menuentry "Tinycore ISO" {
loopback loop /tinycore.iso
linux (loop)/boot/bzImage --
initrd (loop)/boot/tinycore.gz
}
menuentry "SystemRescueCd" {
loopback loop /systemrescuecd.iso
linux (loop)/isolinux/rescuecd isoloop=/systemrescuecd.iso setkmap=us docache dostartx
initrd (loop)/isolinux/initram.igz
}
Edit2: How to chainload grub
and syslinux
from grub2
?
Edit3: I want to boot other live images without any removable devices and use grub2
so need menu entries specific to grub2
.
Booting from iso is a feature which must be supported by the distro, and the
iso-scan/filename=
option will not work in Fedora or others. Those might have other kernel options for this feature or the feature may be not supported at all.I have found a method to boot Fedora 16 DVD, here's below.
Booting Fedora 15 DVD iso from grub
It assumes your iso file is at the root of second partition of the internal hard disk.
source: this page
You can search for other distribution in google, since it is not a distro-independent feature.
Note 1: It also worked with Fedora 16, I have just tested it.
Note 2: It seems that the method worked when you place the iso file in a fat or ext4 partition.
Booting grml small iso from grub2
Grml can also be booted from grub2. Note that it uses
findiso
option instead ofiso-scan/filename
option, indicating that Booting from iso is implemented as different options in different distributions.This page has several examples of other distros booting from Grub2.
Booting openSUSE 13.1 Live from iso
Here is the only solution that worked (all others gave me a Failed to find MBR identifier and stopped). In this example the iso is placed at the first disk’s third partition in the directory
/home/username/
.Source is janeppo’s comment.
Fedora 17 Gnome Live Iso
Here is the boot menu grub.cfg entry for Fedora 17. the iso is placed at the first disk's third partition. Also the filename is changed.
Last Note: I think this answer serve as an example. It should not be elaborated more with examples.
Here is which iso files I figured out to boot using
grub2
.I have successfully booted following ISOs
I found that if you want to boot other ISOs like Hiren's Boot CD, etc. you can use
MEMDISK
utility as kernel.Where to Get MEMDISK ?
Download Syslinux from here. Move it to Desktop.
How to make it work ?
Then paste below entries in gedit. You'll need to change
set isofile="/path/to/iso-file.iso"
.Then issue
update-grub
. Reboot and check.My entries in
40_custom
file.All ISOs are kept on
sda6/OS
andMEMDISK
is kept on partition where ubuntu is installed(in root) and renamed tomemdisk4.05
so path to it is/customboot/memdisk4.05
note : fedora didn't work with the other answer given. Still trying to boot fedora :( .
unfortunatly none of these recommendation did not help me. So I have found the way and would love to share with you. To boot centos for example you need: Put iso image in the directory. if your root dir mounted on /dev/sda1, then create dir /iso and put iso there. go to grub console (when menu grub appear press 'c'.)
Choose appropriate device - hd0 means sda. You need to choose one where you iso is located.
And boot it!
What you are asking is off topic here, as it requires knowledge of those other systems to be able to set up grub entries to boot them correctly. Yes it is possible.
However... You will find Multi System a competent tool for having very many different distro ISOs on one large USB drive. I find it works very well indeed but you will have to install it from a PPA:
http://www.pendrivelinux.com/multiboot-create-a-multiboot-usb-from-linux/
I use it so that I can have the Gparted LiveUSB and other tools, as well as Ubuntu ones on one pendrive for InstallFests. As a bonus it allows a custom splash screen for the menu, which I have set to the logo for the Australian LoCo team.
Chris
As stated, Multisystem uses Grub2 to do what you want. Since this off-topic thread is being allowed, or at least tolerated here's the Fedora entry from my Multisystem Grub2:
Note that you can't boot directly from the ISO as it's not supported as it is with Debian based distros. You will need the unpacked files from the ISO available on the hard drive as follows:
You will of course need to change the location of the /fedora/ directory and the UUID of the partition you are booting Fedora off. You should probably also change the mount mode from ro to rw, as well as anything else appropriate, such as the permissions on the squashfs.
You can also probably set up a virtual persistence disk, Although I see no reason why you couldn't mount your normal /home partition. Again, I can only suggest that you install Multidisk and do the config yourself to learn how to do it.
Chris
Seems as though 13.04 requires a different syntax to achieve this. Has anyone successfully booted the ubuntu-13.04-desktop-amd64.iso from a physical disk and would care to share the grub syntax?
EDIT: Answered my own question. Need to rename vmlinuz to mvlinuz.efi and it works.
I find using the loopback of grub2 invaluable for testing out new isos without requiring a usb stick or burning to CD. There are bugs filed against Fedora to make something similar work. Tracking down the current status is a little bit time consuming.
Try using Multisystem, installing the liveCDs you want, and then copying over the files to your / and merging the grub.cfgs! (I'm actually curious to see whether it would work!).