I have a network boot setup using kexec and initramdisks... The setup is perfectly able to boot grub4dos however I really dont get the ramdisk stuff right. It is described in the section "Direct transition to DOS/Win9x from within Linux" of the README (http://code.google.c...ME_GRUB4DOS.txt)
According to the readme the following command should work:
kexec -l grub.exe --initrd=WIN98.IMG --command-line="--config-file=map (rd) (hd0); map --hook; chainloader (hd0)+1; rootnoverify (hd0)"
I divided the process into several steps...
1. a running Linux 2. execute kexec -l grub4dos.exe --initrd=Disk.IMG 3. kexec -e
in Grub commandline execute:
4a. map (rd) (fd0)or
4b. map (rd)+1 (fd0)or both of them with (hd0)
after a map --hook I should be able to have access to the files in the RD but I allways get only:
In case of 4a:
Error 65: RD_BASE must be sector-aligned and non-zero for mapping at a fixed location
In case of 4b:
Error 28: Selected item cannot fit into memory
The programm versions I'm using:
Linux kernel 3.0.8 Kexec-Tools 2.0.1 grub4dos-0.4.5c-2012-02-01.7z
I think actually it should work if the stuff from the README is correct. However I never get to the point where I can actually see the content of the Initramdisk that was loaded by kexec.
I tried several different Images. One simply a file containing a filesystem(fat32) and the files (without any compression) another being a cpio initramdisk like the linux-kernel uses and last I downloaded a file similar to the DOS.IMG but neither of them showed any desired result.
One thing to remark though if I use 4b. map (rd)+2 (fd0) I only get warnings but I can hook the rd in with map --hook. I cannot access any files though (Error 17: Cannot mount selected partition)
The Thing I actually want to do is: I have a setting which can manage and boot kernels using kexec but I want to use exactly this setting to boot arbitrary systems. I have given up to make it work on any System wich is why I do all the stuff in a virtual machine.
In this setting kernels and initrds are provided via network.
My goal is that you can use grub4dos as kernel and put a payload into a ramdisk and load this payload using grub4dos.
An example of such a payload would be memtestx86+.
What are the Requirements for a Ramdisk and how do I use it from Kexec in Grub4Dos?
Maybe I have to set the boundaries? - But which ones? where does Kexec load the initrd to?