Page 1 of 1

[SOLVED] Redundance in partition record

Posted: Mon Jan 18, 2010 4:50 am
by qw
Hi everybody,

In a partition record, the start of a partition is stored twice: once as CHS at offset 1 and once as 32-bits LBA at offset 8. Is this redundance by design, or am I missing something?

Roel

Re: Redundance in partition record

Posted: Mon Jan 18, 2010 5:44 am
by zity
No it is not due to redundancy. The CHS fields are not used anymore because all disks use LBA nowadays, and they are in some cases just set to zero. They only exists to preserve backward compatibility. CHS values max out at 8 GB, so they are not really useful anymore. There's an entry in the wiki about partition tables: http://wiki.osdev.org/Partition_Table

Re: Redundance in partition record

Posted: Mon Jan 18, 2010 6:29 am
by qw
Thanks Zity. I did read the Wiki (and some other pages on the net) but what my question came down to is: can I rely on the LBA to always be correct?

From Partition Table:
  • CHS fields "max out" on a drive that is approximately 8GB in size -- and are therefore useless on almost all current drives.
  • For drives smaller than 8GB, the LBA fields and the CHS fields must "match" when the values are converted into the other format.
  • For drives bigger than 8GB, generally the CHS fields are set to Cylinder = 1023, Head = 254 or 255, Sector = 63 -- which is considered an invalid setting.

Re: Redundance in partition record

Posted: Mon Jan 18, 2010 6:36 am
by thepowersgang
For most drives you can, but if the size is less than 8 GiB, I would probably use the CHS values if the LBA values don't match, just because it may be a pre-LBA disk (although, I doubt there are any pre-LBA disks still around)

Re: Redundance in partition record

Posted: Mon Jan 18, 2010 7:18 am
by qw
Okay, thanks, that answers my question.

Re: Redundance in partition record

Posted: Mon Jan 18, 2010 7:28 am
by Owen
thepowersgang wrote:For most drives you can, but if the size is less than 8 GiB, I would probably use the CHS values if the LBA values don't match, just because it may be a pre-LBA disk (although, I doubt there are any pre-LBA disks still around)
There are, but you're unlikely to come into contact with them. I have a Pre-ATA disk!

Re: [SOLVED] Redundance in partition record

Posted: Mon Jan 18, 2010 5:09 pm
by ~
There are even ATA disks that can only use CHS, I think I have a 12GB laptop disk that always uses CHS versions of FAT filesystems, and some 400 or 800MB disks that use only CHS (also a 4GB laptop disk that supports LBA by default and have never seen it using CHS FAT filesystems).