4

Going through MBR/GPT I'm a bit confused on the transition from MBR (2^32) to GPT (2^64).

If you breakdown the history from CHS-to-LBA addressing:

  • CHS (24Bits) - 8GB Limit (1979 - Introduced with "fixed-block-architecture")
  • CHS (28Bits) - 128GB Limit (1994 - EIDE/ATA2)
  • LBA (22Bits) - 2GB Limit (1986 - IDE)
  • LBA (28Bits) - 128GB Limit (1994 - ATA-1)
  • LBA (48Bits) - 144PB Limit (2002 - ATA-6)

----Here is a breakdown of the ATA history---


Wikipedia (LBA):

whereas the size of entries in on-disk and in-memory data structures holding the address is typically 32 or 64 bits.

This is based off of the processor (32/64)....

So whats stopping an MBR from addressing (2^64)?

9

While there is nothing limiting the computer from logically addressing all 264 addresses, the limitation happens due to the implementation of MBR-style partition headers. In the standard DOS-style MBR commonly implemented in most IBM-compatible computers, each 16-byte partition entry only has room for a 4-byte (32-bit) LBA sector address.

Because this only allows one to address at most 232 sectors, and given each sector is 512 bytes, the maximum possible range that can be accessed for any MBR-style partition is 232 x 512 bytes, which equals 2048 GiB, or 2 TiB. Using a drive with a larger sector size (e.g. 4096-bytes) will extend the maximum range to 16 TiB, but this requires a computer and operating system compatible with larger sector sizes other than the standard 512-byte sector.


This is also briefly discussed in the Wikipedia article for logical block addressing:

The current 48-bit LBA scheme, introduced in 2003 with the ATA-6 standard, allows addressing up to 128 PiB. [...] However, the common DOS style Master Boot Record (MBR) partition table only supports disk partitions up to 2 TiB in size. For larger partitions this needs to be replaced by another scheme, for instance the GUID Partition Table (GPT) which has the same 64-bit limit as the current INT 13h Extensions.

Indeed, in GPT-style partitions, there are two 8-byte fields specifying the starting and ending logical block address for that partition, extending the addressable range to 264 sectors. Similar calculations can be performed as above to compute the maximum partition size for a disk by multiplying the sector size (usually 512 or 4096 bytes) by 264.

As a final note, GPT partition tables also differ slightly in their implementation/layout. MBR-style partitions store both the beginning and ending sectors in CHS (3-bytes) format, as well as the beginning sector and size of the partition in LBA format (4-bytes each). GPT does away with this convention, and instead stores two LBA (8-byte) values, representing the beginning and ending sectors, inclusive, for that partition.

2

Backwards compatibility.

A partition entry in the MBR partition table has 4 bytes (32 bits) to store the start of a partition, plus another 4 bytes to store the length of the partition. If you change that, then existing software will no longer be able to read the MBR.

If you don't care so much about backwards compatibility, well why stop at just changing that? There are other problems with MBR (limited to 4 primary partitions), so why not just make a new, better standard? Also known as GPT.

  • Always looking out, thanks again 8bit! – Jordan Davis Sep 22 '15 at 17:26
  • "well why stop at just changing that?" - They don't, that is how standards like GPT are created, or new revisions of existing standards. – Ramhound Sep 22 '15 at 17:39
  • @Ramhound Exactly. – 8bittree Sep 22 '15 at 17:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.