Vladimir 'phcoder' Serbinenko wrote:
grub4dos checks for ntldr as follows:
- file starts with 0xe9, 0x??, 0x01,
- first sector does not end with bootsector signature 0x55,0xaa,
- file size exceeds 0x30000.
For me it sounds like a heuristic. I would prefer to trust user rather
than introducing heuristics to check file type.

I agree that such a heuristic is not needed. Grub2 uses different commands for different loaders (which is good) and therefore there is no need to auto-detect the loader type.

But a simple health check (like in 'chainloader') would IMO make sense for any load command. For 'ntldr': check that the file size is reasonable and that code starts with a jmp instruction. Allow to override the check with '--force'.

--
Regards,
Christian Franke



_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to