Fix Version/s: None
Operating System: ReactOS
Platform: x86 Hardware
It would be nice if freeldr.sys can be made multiboot compilant again.
This would allow to boot freeldr.sys directly from grub(2) or Syslinux.
The freeldr.sys file doesn't even need to exist on the partition you want to boot (could be handy in rescue operations).
I found 2 references on the web, for making a PE file multiboot compliant:
The second link mentions that the method explained on the first link, is a ugly hack (hard coded values, ...)
The method used by the second link, uses the space in the dos stub at the beginning of the PE file, for storing the needed multiboot fields, but they corrupt the dos stub itself.
I don't think it is necessary to cripple the dos stub.
The multiboot header fields can go after a valid dos stub, without corrupting it. The multiboot header must be 32-bit aligned and be in the first 8kb of the file.
The Multiboot Specification can be found at:
Multiboot header layout:
The multiboot header must be 32-bit aligned and be in the first 8kb of the file.
The multiboot header field starts with a magic number (identifying the header, which must be the hexadecimal value 0x1BADB002).
The Machine state: info the multiboot compliant loader passes when transfering control to the multiboot compliant kernel:
- Gert Hulselmans