Thank you both very much for your extensive replies! I have succeeded chainloading boot loader from iso image using grub4dos (grub1-based) by using the following grub4dos commands:
map (hd0,0)/myimage.iso (0xff) || map --mem (hd0,0)/myimage.iso (0xff)
map --hook
root (0xff)
chainloader (0xff)
map (0xff) (hd0)
And I get grub2 from iso and all the beautiful menus etc. When I go to grub2 command line I can see 4 disk devices using ls command:
(hd0) (hd1) (hd127) (fd0)
And ls / gives me a file list of the files inside myimage.iso, and so ls (hd127)/ does. It means grub 2 sees my virtual CD (though I did expect virtual CD to be (hd0) due to map (0xff) (hd0)).
OK, then I select some item from my beautiful menu to start, and Linuex starts loading. But loading fails because Linux cannot find image.squashfs file (which is really presents inside iso). Specifically the messages are:
CODE
Determining looptype…
!!Invalid loop location: /image.squashfs
!!Please export LOOP with a valid location, or reboot and pass proper loop=…
!!kernel command line
As I can see in the earlies messages, Linux doesn't see my virtual CD, because it found /dev/sda1, /dev/sda2 (which seems to be 2 partitions of my HDD), /dev/sr0 (seems to be real DVD drive) and /dev/sdb1 (seems to be USB flash stick which I'm trying to boot from).
OK, I read manual and edited grub.cfg inside iso image to direct grub2 to make virtual drive from iso image, too, using the following loopback command:
insmod fat
insmod iso9660
loopback loop (hd0,0)/rescue.iso
linux /boot/rescue root=/dev/ram0 init=/linuxrc looptype=squashfs loop=/image.squashfs cdroot initrd=rescue.igz noapic kav_lang=${kav_lang} quiet
initrd /boot/rescue.igz
But the loopback command fails with message:
error: no such partition
I tried insmod ntfs (because my HDD is NTFS-formatted) and after that I tried (hd0,1) ... (hd0,5) and (hd1,0) ... (hd1,5), but result was the same. I tried running 'partition' command but it said unknown filesystem (fs) or something like that.
So now in case of trying to boot from iso directly I'm stuck with problem: why grub2 doesn't see partitions of my HDD and USB stick (which is FAT32 formatted).
Now, if try to go another way and install grub2 on the USB disk itself, I can't understand how to install g2hdr.bin and g2ldr.mbr to USB disk's MBR. As far as I understand grubinst utility which latest version available to me is of January 2008 contains grub(1,2) boot sectors inside it and uses these old ones. So the second questing is: How can I direct grubinst or another utility to use external g2hdr.bin/g2ldr.mbr and install the to USB disk's MBR?..
Will be thankful for any ideas and comments...