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
[SOLVED] Redundance in partition record
[SOLVED] Redundance in partition record
Last edited by qw on Mon Jan 18, 2010 7:18 am, edited 1 time in total.
Re: Redundance in partition record
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
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:
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.
- thepowersgang
- Member
- Posts: 734
- Joined: Tue Dec 25, 2007 6:03 am
- Libera.chat IRC: thePowersGang
- Location: Perth, Western Australia
- Contact:
Re: Redundance in partition record
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)
Kernel Development, It's the brain surgery of programming.
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
Re: Redundance in partition record
Okay, thanks, that answers my question.
- Owen
- Member
- Posts: 1700
- Joined: Fri Jun 13, 2008 3:21 pm
- Location: Cambridge, United Kingdom
- Contact:
Re: Redundance in partition record
There are, but you're unlikely to come into contact with them. I have a Pre-ATA disk!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)
Re: [SOLVED] Redundance in partition record
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).
YouTube:
http://youtube.com/@AltComp126
My x86 OS/software:
https://sourceforge.net/projects/api-simple-completa/
Donate to get more food/programming resources/computers:
https://www.paypal.com/donate/?hosted_b ... QS2YTW3V64
http://youtube.com/@AltComp126
My x86 OS/software:
https://sourceforge.net/projects/api-simple-completa/
Donate to get more food/programming resources/computers:
https://www.paypal.com/donate/?hosted_b ... QS2YTW3V64