Your GPT Disk Still Starts With an MS-DOS Sector
A GPT disk is required to carry an MS-DOS-format partition sector at LBA 0, and its partitions still begin with DOS-style boot sectors. Two structures, two addresses, and a repair technique that stopped meaning anything when firmware learned to check signatures.
A disk that Windows calls GPT still carries an MS-DOS-format partition sector at the very start, and nothing about that is a mistake or a leftover. The GPT specification requires it, on every disk, including the one in the machine you are reading this on. Four hundred and forty-six bytes into that sector you will also find a partition table with the same four sixteen-byte entries it had in 1983. It says, in the format every DOS tool understands, that the entire disk is occupied by one partition of a type nobody recognises.
That is the design. The confusion it produces is not the reader’s fault, and it is not an abuse of terminology by people who do not know better. Microsoft’s own knowledge base article on the subject explains, in one sentence, that the first sector of a hard disk “is called the master boot record (or sometimes the partition table or master boot block)”. Three different things, one name, straight from the vendor.
Sorting that sentence out is most of this article. The rest is what happened when firmware stopped trusting position and started checking signatures.
Two structures, and the reason they get muddled
The recurring mistake is treating the partition table and the boot sector as the same object at the same address. They are different structures, they live in different places, and they do different jobs.
A partition table describes where the partitions are. On an MBR disk it is the last 66 bytes of the first 512-byte sector: four sixteen-byte entries plus the two-byte signature. On a GPT disk it is a much larger structure with its own header, a CRC32 checksum, a backup copy at the end of the disk, and a sixty-four-bit address for every partition. The GPT is one sector in, at LBA 1, and a table with the signature text EFI PART.
A boot sector is the first sector of a partition, and it is executable code that a filesystem owns. On a FAT volume that is a DOS boot sector: a jump instruction, an eight-byte OEM name, a BIOS Parameter Block describing the volume geometry, some boot code, and 0x55AA at offset 510. On NTFS it is the same idea with different internals, and it is still recognisably a volume boot record in that lineage. This is the thing people mean by “an MS-DOS sector”, and it has to exist on any partition you intend to boot from, GPT or not.
So the answer to the article’s premise is yes, and it is not merely possible. It is mandatory, in both directions. A GPT disk must have a DOS-format partition sector at LBA 0, and its bootable partitions must have DOS-lineage boot sectors of their own.
The bouncer at LBA 0
The UEFI specification is direct about it. Type 0xEE, “i.e., GPT Protective”, is used “to define a fake partition covering the entire disk”, and “for a bootable disk, a Protective MBR must be located at LBA 0 … if it is using the GPT disk layout.”
The spec then restricts the thing to a single entry. The UEFI specification requires the protective MBR partition table to contain one partition record, with the other three records set to zero, and the record carries a boot indicator of 0x00, meaning explicitly not bootable.
The reason is compatibility, and Microsoft’s description is unusually blunt: the protective MBR “exists for backward compatibility with disk management utilities that operate on MBR”. Think about what a DOS-era partition tool does when it is pointed at a disk. It reads LBA 0, tries to interpret the partition table, and if it finds nothing coherent it very reasonably offers to write one for you. That offer is catastrophic on a disk whose real partition table is a GPT structure further in, because the tool has just been invited to overwrite the protective MBR and, in the process, the first sectors of the GPT.
The protective MBR is the answer to that. It presents a single partition of type 0xEE covering the disk. Old tools see a disk that is entirely consumed by something they have no code for, conclude there is no free space and nothing they understand, and back away. It is a bouncer, not a map.
The type byte is chosen so that the tool cannot guess wrong. 0xEE is not a filesystem type. There is nothing to mount and nothing to repair, which is exactly the point: a tool that does not understand GPT is supposed to stop, not proceed.
Two details are worth knowing because they show in hex dumps. The entry’s starting CHS is set to 0x000200, a conventional placeholder rather than a real geometry value, and its end CHS is set to 0xFFFFFF, which the spec specifies for the case where the value cannot be represented. The size field is thirty-two bits, so on a disk larger than what that can express the entry covers the lesser of the disk size or 0xFFFFFFFF sectors, about two tebibytes. Beyond that, the protective entry simply stops describing the disk, and that is fine, because it was never describing the disk for anyone who mattered.
The two tebibyte number is the same limit that dominates MBR-era conversations. A thirty-two-bit LBA with 512-byte sectors tops out at about two tebibytes, or roughly 2.2 decimal terabytes. GPT answers that with sixty-four-bit addressing, and it also answers the four-partition ceiling. Neither improvement required giving up the sector at LBA 0, so it stayed.
Reading it in DOS, and the offset that is not the MBR
DOS was unusually generous about letting you look at the raw disk, and the window into it was DEBUG.EXE. Understanding what you can see there requires one fact about real mode: the BIOS loads the boot sector at physical address 0x7C00, and it arrives with every segment register zeroed. Microsoft’s own MS-DOS source for MSBOOT.ASM states it in the comments:
This sector is placed at physical address 07C00h. The initial registers are set up as follows: CS=DS=ES=SS=0. IP=7C00h, SP=0400H.
Because the segment base is zero, offset and physical address coincide, which is why a DEBUG dump at segment zero reaches any byte of low memory by its physical address. Once the machine is up, the MBR is still sitting in memory at 0x7C00, untouched, and d 0:7C00 shows the first 128 bytes of it. The partition table is at 0x7C00 plus 0x1BE, so d 0:7DBE lands on the four entries.
There is a widely repeated variant of this instruction that asks for d 0:413 to “see the MBR”. It is a real and useful offset, and it is not the MBR. Physical 0x413 is inside the BIOS Data Area, which occupies 0x400 to 0x4FF, and the word at 0040:0013 is the installed memory size in kilobytes, the value INT 12h returns. Multiple independent BIOS data area listings agree on the field, and the address sits directly after the equipment word at 0040:0010. Typing d 0:413 on a 640 KB machine shows 80 02, and somewhere in that neighbourhood is the two-byte equipment word set to 0x0061 for one floppy, an 80×25 colour adapter and one parallel port.
None of which is a boot record. The mistake is an easy one to make, because both addresses are four hexadecimal digits in the same low-memory window and both are famous. The MBR offset that people mean is 7C00.
If you want the bytes as they exist on the disk rather than as they exist in memory, DEBUG can bypass the filesystem entirely. The L command loads raw sectors and takes an address, a drive number, a starting sector and a count:
-l 100 2 0 1
-d 100
Drive 2 is the first fixed disk, sector 0 is LBA 0, and the single sector lands at offset 0x100. Neither command writes anything. The write-side counterpart is a single letter change, w 100 2 0 1, and that is how an entire generation of boot sector viruses installed themselves: no exploit, no privilege escalation, just a documented sector write because DOS had no concept of one.
That era is closed. Modern Windows refuses the same command from user mode with “an application has attempted to directly access the hard disk, which cannot be supported”. The technique is not merely discouraged, it is no longer reachable without going around the operating system.
The undocumented switch
The repair tool of that era was FDISK, and it had a switch that its own help text did not mention. Microsoft’s knowledge base article Q69013 says so in as many words:
Fdisk has an undocumented parameter called /mbr that causes it to write the master boot record to the hard disk without altering the partition table information.
The two halves of that sentence are the entire feature. The switch rewrites the boot code in the first sector and deliberately leaves the sixty-four-byte partition table alone. That is why it was the standard fix for a boot sector virus: it replaced the code that had been infected without touching the map of where anything was, so no data was lost and no partitions had to be recreated. For a period in the late eighties and early nineties it was the first thing anyone tried, and it usually worked.
It was also narrower than its reputation. The article is explicit that the command “only re-writes the MBR on the system drive (DISK-0)”, with no way to name a different disk. Later versions added /CMBR, which takes a drive number, because the original could not.
And “without altering the partition table” describes exactly sixty-four bytes. The rest of the sector belongs to whatever wrote it, so the switch overwrites anything else parked in the 446 bytes of boot code area. Microsoft documents three ways that goes wrong. Disks partitioned with the SpeedStor utility using its /bootall option store geometry information “in an area of the master boot record that MS-DOS does not use”, and the rewrite erases it, “making the disk unusable”. Systems with more than four partitions typically keep the extras in the same region. And a third-party boot manager lives in that space by definition, so rewriting the boot code removes the menu.
The last one deserves a pause, because it is the shape of everything that comes next. A boot manager’s entire function is to be the code that runs first. The feature that makes fdisk /mbr a reliable repair is the same feature that makes it destructive, and what separates the two cases is only whether the boot code currently in the sector is the one you intended. There was no way to check. That is not an oversight in the tool. It is the state of the art at the time.
Then firmware learned to check
Everything above assumes a specific model of trust: whatever occupies the first sector of the disk executes, because it is in the first sector of the disk. The repair technique follows from the model. If authority comes from position, then restoring the correct bytes at that position is the whole fix.
UEFI removes the premise. ArchWiki’s summary is the clearest short version: UEFI “does not launch any boot code from the Master Boot Record (MBR) whether it exists or not, instead booting relies on boot entries in the NVRAM”. The firmware has its own partition table parser and its own filesystem drivers, and the specification mandates support for FAT12, FAT16 and FAT32. Instead of reading a sector and jumping to it, firmware reads a boot entry from NVRAM, locates a partition, mounts the filesystem on it, and loads a .efi file as an application.
That partition is the EFI system partition, “an OS-independent partition formatted as FAT that serves as the storage location for UEFI boot loaders, applications, and drivers executed by the UEFI firmware”, and it is mandatory for UEFI booting. On a modern Windows disk it is the small FAT32 partition near the front, and its own boot sector is, unavoidably, a FAT boot sector of exactly the lineage described earlier. The DOS-shaped structure did not disappear. It moved to a partition that firmware mounts rather than executes.
Secure Boot then adds the part that changes the repair story. Per Microsoft’s documentation, “when the PC starts, the firmware checks the signature of each piece of boot software, including UEFI firmware drivers (also known as Option ROMs), EFI applications, and the operating system”. The NSA’s guidance describes the same mechanism as requiring that “each binary (module, driver, kernel, etc.) used during boot must be validated before execution”, by signature or by a matching trusted hash.
The trust is expressed as key databases in firmware, a chain from the platform key, through the key exchange key, to the signature database, with a revocation list alongside it. The platform key is the root, and the specification’s recommended format is RSA-2048. Practically, the signature database is the list of things allowed to boot, and the revocation database is the list of things that were allowed to boot and no longer are.
The consequence for the technique at the centre of this article is total. fdisk /mbr rewrote boot code that no longer runs, on disks whose firmware may not even consult LBA 0. Even if you did it on a UEFI machine, nothing about the boot path would change, because the 446 bytes are not in the boot path. The equivalent repair has moved to a different layer entirely: replacing a file in a FAT partition, and then satisfying a signature check that a boot sector virus author cannot fake without a private key.
There is one irony worth stating, because it is the neatest thing in the whole arrangement. The only MS-DOS-format structure left on a modern GPT disk, the protective MBR, is one that nothing executes and nothing verifies. It is checked by nobody, because it is in nobody’s boot path; it is there purely to discourage old tools from being helpful. The structure that used to be the most powerful 512 bytes on the machine is now a signpost that firmware ignores, kept in place so that software which should not be running does not try to.
Two other articles sit close to this one. The layout of that first sector is described from the DOS side, including the offset that is often quoted for the MBR and is not it, in Reading a Boot Disk With Strings. And bcachefs is the other half of a storage conversation, covering what happens after the partition table has handed over.
What to take away
Four things, in decreasing order of usefulness.
The partition table and the boot sector are different objects at different addresses. LBA 0 holds the MBR, whose last 66 bytes are the MBR partition table. LBA 1 holds the GPT header. Each partition begins with its own boot sector, and that is a filesystem-owned structure. Naming all three “the MBR” is what Microsoft’s own article does, and untangling it explains most of the confusion.
A GPT disk is required to have an MS-DOS-format partition sector at LBA 0, with a single 0xEE entry covering the disk. It is not a defect, not debris from a conversion, and not something to clean up. Deleting it does not free space. It removes the sign that keeps legacy tools from rewriting your disk.
If you are looking at the MBR in DEBUG, the offset is 0x7C00, because that is where the BIOS put it and it is still there. Physical 0x413 is the memory size reported by INT 12h. The two addresses live in the same low-memory window, which is why they get swapped, and only one of them is a boot record.
And the era that made fdisk /mbr meaningful is over, for a reason that is more interesting than nostalgia. The remedy worked because authority came from position, so restoring the right bytes at the right address was the fix. Firmware that verifies signatures replaces that with authority from identity, which is why no equivalent single-sector command exists on a UEFI system, and why the class of malware that motivated the switch largely ceased to be a category.
Sources: Microsoft Knowledge Base article Q69013, “FDISK /MBR rewrites the Master Boot Record”, archived copy. UEFI Specification 2.10, section 5, GUID Partition Table Disk Layout and section 3, Boot Manager. UEFI Specification 2.9, section 32, Secure Boot and Driver Signing. Microsoft, Secure boot. NSA, UEFI Secure Boot Customization, March 2023. Microsoft, MS-DOS 4.0 source, MSBOOT.ASM. ArchWiki, Arch boot process and EFI system partition. Yale CS mirror of the BIOS data area listing and The Tech Help Manual, ROM-BIOS variables. The Starman’s Realm, An MS-DEBUG Tutorial and Notes on FDISK. OS/2 Museum, DOS boot sector, BPB, and the media descriptor byte. Wikipedia, Volume boot record and Partition type.
Comments are reviewed before they appear. Yours will be published once it has been approved.