Problems reading the partition table from a GRUB floppy
Posted: Sun Jan 23, 2011 1:44 pm
I've been using a GRUB floppy image from James Molloy's site http://www.jamesmolloy.co.uk/downloads/floppy.img. I'm working on writing code to identify disks and partitions. I noticed that this floppy had an empty BPB in its boot sector so I'm assuming that this is an MBR and there should be a partition table (can I assume that all disks have an MBR? How do you determine if not?). The problem is that the partition table seems to be nonsense. The first byte in each entry is supposed to be the active byte, and since this is a GRUB floppy one of the partitions must be active, even so...none of the active bytes on this disk image are 0x80 or 0x00. The active bytes are:
Offset Value
0x1BE 0x24
0x1CE 0xF9
0x1DE 0x70
0x1EE 0xD7
So none of those are valid values for this byte. Additionally, the rest of the partition table (sector, cylinder, head numbers) doesn't seem to contain valid values. I would assume this disk is corrupt, but somehow it still boots and when I mount the image on Linux, there are no problems reading the file system. Also, I don't see how a corrupt disk image could be posted on a tutorial. This site describes how a GRUB MBR should look http://mirror.href.com/thestarman/asm/mbr/GRUB.htm which looks fine to me, but the image I'm using doesn't. What am I missing/doing wrong?
Thanks
Offset Value
0x1BE 0x24
0x1CE 0xF9
0x1DE 0x70
0x1EE 0xD7
So none of those are valid values for this byte. Additionally, the rest of the partition table (sector, cylinder, head numbers) doesn't seem to contain valid values. I would assume this disk is corrupt, but somehow it still boots and when I mount the image on Linux, there are no problems reading the file system. Also, I don't see how a corrupt disk image could be posted on a tutorial. This site describes how a GRUB MBR should look http://mirror.href.com/thestarman/asm/mbr/GRUB.htm which looks fine to me, but the image I'm using doesn't. What am I missing/doing wrong?
Thanks