I did a hex dump of the protective MBRs from both disks and it turns out that the real difference between the two is in the area where the head/sector/cylinder (normally called CHS values but that's the order they are stored in the partition table) values of the first sector of a partition are stored. The values clearly don't match on the FreeBSD disk, the LBA information claims start sector 1 and the other values claim start sector 2. These values should be ignored if the BIOS supports LBA addressing but who knows if they are required to match the LBA information by some BIOSes...
I actually saw the same difference in the output of FreeBSD
fdisk(8) but I didn't trust it so looked at the hex dumps to be sure.
The FreeBSD disk has this information for the protective MBR partition:
Code:
head/sector/cylinder of the first sector: 0/2/0
head/sector/cylinder of the last sector: 255/63/1023
LBA of the first sector: 1
LBA sectors in the partition: 33554431
And the Fedora disk has this information:
Code:
head/sector/cylinder of the first sector: 0/1/0
head/sector/cylinder of the last sector: 254/63/1023
LBA of the first sector: 1
LBA sectors in the partition: 16777215
I have no idea why Linux
fdisk claimed 256 heads on the FreeBSD disk, it's probably wrong...
I'm not sure if the geometry that is probed by the kernel is actually stored anywhere on the disk when a partition table is initialized or partitions are created/modified. The FreeBSD
fdisk(8) manual page claims that the geometry is extracted from something called "in-core disklabel", anyone have an idea what that might refer to?
Edit: Considering that LBA addresses start from 0 the FreeBSD
pbmr is actually correct, the sector numbers in the CHS numbers start from 1 so head 0, sector 2, cylinder 0 translates to LBA address 1. The Linux one is incorrect because the CHS numbers claim that the partition starts from LBA 0 but the LBA information claims start sector LBA 1.
All I can say is BIOS sucks..