I didn't manage to get the boot from mounted ISO working (I've done it with many other distros) but booting from mounted squashfs works. On with the show:
Grub needs 3 things: kernel, initial RAM image and root filesystem. I found those in /live directory of the Live CD. Copied them to harddisk (/boot/crunch on /dev/sda2 which is the root partition of my Ubuntu - sda1 is swap) and added the entry to Grub2.
First mount the ISO:
sudo mkdir -p /mnt/iso
sudo mount -o loop /path/to/crunchbang-10-alpha-02-openbox-i686.iso /mnt/iso
Create directory for kernel, initial RAM image and root file system, copy files, unmount ISO:
sudo mkdir -p /boot/crunch
sudo cp -v /mnt/iso/live/vmlinuz /mnt/iso/live/initrd.img /mnt/iso/live/filesystem.squashfs /boot/crunch/
sudo umount /mnt/iso
Create Grub2 entry (In Ubuntu I added this to /etc/grub.d/40_custom):
menuentry "CrunchBang Statler squashfs" {
set root=(hd0,2)
linux /boot/crunch/vmlinuz boot=live live-config live-config.hostname=crunchbang live-config.username=crunchbang live-media-path=/boot/crunch quiet splash
initrd /boot/crunch/initrd.img
}
Update Grub and you're ready to reboot and test:
Last edited by nomalab (2010-10-26 01:41:54)