Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In an MBR's partition table section, every partition has the first absolute sector available in both the CHS and LBA formats. It's relatively straightforward to convert between the two.

When the MBR was originally created, I imagine bits were at a premium.

Does having the sector in both formats for machine consumption have any value?

share|improve this question
    
Without knowing the answer yet, I will tell you a little story. I had an external USB drive which would consistently fail do to detect properly in Mac OS X, as well as in the GParted application, whereas it was detected properly by Windows and Linux. Seeing your question, I suspect the partition originally on the disk may have had either the CHS or MBR record empty. If this was in fact the case, I would say that, yes, it does matter because some software will only use one type of record. I don't have a copy of the old partition table, however, so I can't confirm this hypothesis. –  nitro2k01 Mar 12 '12 at 22:31
    
@nitro2k01 very interesting, thanks for sharing –  jglouie Mar 13 '12 at 13:30
    
I wonder if this is because the maximum CHS value is relatively low –  jglouie Mar 15 '12 at 17:38
    
Ever find out the answer to this? I have a 1TB drive and in the MBR partition table the 3rd partition's last sector is greater than the maximum CHS value and so it's set to 0xFEFFFF. Because of this, the 4th partition's start and end sector CHS values are also 0xFEFFFF. I suspect it is indeed because the CHS value is relatively low since there's no way anything could determine the correct sectors without referencing the LBA. CHS is probably now just a legacy field for the most part. –  Rauffle Oct 10 '13 at 2:44
add comment

1 Answer

up vote 2 down vote accepted

Found the answer here: http://thestarman.pcministry.com/asm/mbr/PartTables.htm

Starting Sector in CHS values (3 bytes). These values pinpoint the location of a partition's first sector, if it's within the first 1024 cylinders of a hard disk. When a sector is beyond that point, the CHS tuples are normally set to their maximum allowed values of 1023, 254, 63; which stand for the 1024th cylinder, 255th head and 63rd sector, due to the fact, cylinder and head counts begin at zero. These values appear on the disk as the three bytes: FE FF FF (in that order).

Starting Sector (4 bytes). LBA (Absolute Sector) value. This value uniquely identifies the first sector of a partition just as Starting CHS values do. But it does so by using a 4-byte Logical Block Address (starts counting from Absolute Sector 0), which means it can locate the beginning of a partition within the first FFFF FFFFh or 4,294,967,296 sectors, for hard disks up to about 2,199,023,255,552 bytes (exactly 2,048 GiB)!

So CHS is pretty much a legacy field and only used if a partition is within the first 1024 cylinders of the disk. Beyond that, the LBA value is needed to determine where the partition is on the disk.

share|improve this answer
    
Thanks! Out of curiosity, why didn't they just use LBA to begin with? Was LBA introduced later, and just used some free/reserved bits in the MBR at a future time? –  jglouie Oct 10 '13 at 9:10
    
[1/2] I'm no expert (24 hours ago I didn't even know what CHS/LBA were) but this is my current understanding based on recent research: CHS originally mapped to a physical location on the disk (the physical Cylinder, Head, and Sector 'locations') when all tracks on a plate had the same number of sectors. When drives started having a varying number of sectors of sectors per track (outer tracks were physically larger than inner ones and could therefore fit more sectors), the CHS value started being translated into a logical address by the Hard Drive's controller. There wasn't much for standards –  Rauffle Oct 10 '13 at 16:57
    
[2/2] so there were differing CHS schemes as things developed. A method for translating these varying schemes was developed but greatly limited the maximum addressable drive space. To increase the addressable space, the 'head' value became virtual (i.e. doesn't actually correspond to a physical drive head). The need for more addressable sectors resulted in LBA. Since there were still various proprietary translation methods, drives & BIOS's that didn't support LBA, etc. CHS was still available but so was LBA. In modern times, CHS is still there for compatibility reasons –  Rauffle Oct 10 '13 at 17:18
    
[3/2] (mainly for booting). CHS, in some cases, also seems to play some a roll in partitioning, though I'm not entirely sure what it does in this sense that LBA can't do. –  Rauffle Oct 10 '13 at 17:20
    
I suspect that modern MBR layout was not around (at least in it's current form) back in the 'wild-west' days of computing. Rather, various companies probably had various boot-sector formats that would only be compatible specific BIOS's. If the drive and BIOS weren't speaking the same 'boot language', you wouldn't be able to use them together. –  Rauffle Oct 10 '13 at 17:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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