On Thu, 2 Aug 2007 13:21:11 UTC, "Oskar von dem Hagen" <garbage RemoveThis @vondemhagen.de> wrote:
Hi Oskar
<snip>
> Is there information available about the part of GRUB that is in the MBR?
> There is apparently a problem with the numbering of the harddisks. Where
> in the MBR is the information about the harddisk/partition to look for the
> menu?
Sure, check the sources
By coincidence, I did just that a few days ago, since I was
writing GRUB analysis and display code for a disk tool.
The disk-number itself, is a single-byte at offset 0x40 in the MBR,
0x80 is first disk, but it often has the value 0xff, meaning to take
whatever the BIOS value is for 'this' disk.
The physical-sector-number (PSN) for the start of stage-1.5
or stag-2 (depending on situation) is stored as a 4 byte value
(ULONG) at offset 0x44.
There is some other stuff in the same area, but that is relevant for
loading these stages into memory, not the on-disk location.
Regards, JvW
--
Jan van Wijk; Author of DFSee:
http://www.dfsee.com