With grub2 you can directly boot an (iso9660) ISO using its loopback option. This is great because it provides another nice rescue scenario - for example when using grml
(the Debian based Linux Live-CD for sysadmins). You no longer need to
extract kernel and initrd from the ISO to be able to boot it using the isofrom bootoption. All you need to do is put a plain grml ISO to your harddisk.
I’ve tested it with grml-small 2008.11 and grml-small 2009.05-rc1
using grub2 from Debian/unstable (1.96+20090317-1). In the following
example the ISO file grml-small_2008.11.iso is available in directory grml on device /dev/sda1. You can boot it from the interactive grub shell using:
from the interactive grub shell using:
| Code: |
loopback loop (hd0,1)/grml/grml-small_2008.11.iso linux (loop)/boot/grmlsmall/linux26 isofrom=/dev/sda1/grml/grml-small_2008.11.iso boot=live quiet vga=791 noeject noprompt initrd (loop)/boot/grmlsmall/initrd.gz boot |
So if you are using grub2 already consider adding an entry like the following to your grub config (/boot/grub/grub.cfg):
| Code: |
| menuentry "grml-rescue system from harddisk (ISO = grml-small_2008.11.iso)" {
loopback loop (hd0,1)/grml/grml-small_2008.11.iso
linux (loop)/boot/grmlsmall/linux26 isofrom=/dev/sda1/grml/grml-small_2008.11.iso boot=live quiet vga=791 noeject noprompt
initrd (loop)/boot/grmlsmall/initrd.gz
}
|
This entry gives you the option to boot grml from your harddisk even if you don’t have the possibility to boot via CD/USB/PXE/….
Tip: starting with grml 2009.05(-rc1) you can also use findiso=/path/to/grml.iso instead of isofrom=/dev/sdX/path/to/grml.iso.
findiso is a dynamic version of isofrom as it looks for the specified
ISO file on all disks where it usually looks for the .squashfs file (so
you don’t have to know the device name compared to isofrom=…). The
above configuration using findiso is even easier to set up and would
look like this:
menuentry "grml-rescue system from harddisk (ISO = grml-small_2008.11.iso)" {
loopback loop (hd0,1)/grml/grml-small_2008.11.iso
linux (loop)/boot/grmlsmall/linux26 findiso=/grml/grml-small_2008.11.iso boot=live quiet vga=791 noeject noprompt
initrd (loop)/boot/grmlsmall/initrd.gz
}
Credits to unknown