Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Logical block addressing
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==CHS conversion== {| class="wikitable floatright" style="margin-left: 1.5em;" |+ LBA and CHS equivalence with 16 heads per cylinder |- ! LBA value !! CHS tuple |- | style="text-align: right; padding-right: 0.5em;"| 0 | style="text-align: center" | 0, 0, 1 |- | style="text-align: right; padding-right: 0.5em;"| 1 | style="text-align: center" | 0, 0, 2 |- | style="text-align: right; padding-right: 0.5em;"| 2 | style="text-align: center" | 0, 0, 3 |- | style="text-align: right; padding-right: 0.5em;"| 62 | style="text-align: center" | 0, 0, 63 |- | style="text-align: right; padding-right: 0.5em;"| 63 | style="text-align: center" | 0, 1, 1 |- | style="text-align: right; padding-right: 0.5em;"| 945 | style="text-align: center" | 0, 15, 1 |- | style="text-align: right; padding-right: 0.5em;"| 1007 | style="text-align: center" | 0, 15, 63 |- | style="text-align: right; padding-right: 0.5em;"| 1008 | style="text-align: center" | 1, 0, 1 |- | style="text-align: right; padding-right: 0.5em;"| 1070 | style="text-align: center" | 1, 0, 63 |- | style="text-align: right; padding-right: 0.5em;"| 1071 | style="text-align: center" | 1, 1, 1 |- | style="text-align: right; padding-right: 0.5em;"| 1133 | style="text-align: center" | 1, 1, 63 |- | style="text-align: right; padding-right: 0.5em;"| 1134 | style="text-align: center" | 1, 2, 1 |- | style="text-align: right; padding-right: 0.5em;"| 2015 | style="text-align: center" | 1, 15, 63 |- | style="text-align: right; padding-right: 0.5em;"| 2016 | style="text-align: center" | 2, 0, 1 |- | style="text-align: right; padding-right: 0.5em;"| 16,127 | style="text-align: center" | 15, 15, 63 |- | style="text-align: right; padding-right: 0.5em;"| 16,128 | style="text-align: center" | 16, 0, 1 |- | style="text-align: right; padding-right: 0.5em;"| 32,255 | style="text-align: center" | 31, 15, 63 |- | style="text-align: right; padding-right: 0.5em;"| 32,256 | style="text-align: center" | 32, 0, 1 |- | style="text-align: right; padding-right: 0.5em;"| 16,450,559 | style="text-align: center" | 16319, 15, 63 |- | style="text-align: right; padding-right: 0.5em;"| 16,514,063 | style="text-align: center" | 16382, 15, 63 |} In the LBA addressing scheme, sectors are numbered as integer indexes; when mapped to CHS ([[cylinder-head-sector]]) [[tuple]]s, LBA numbering starts with the first cylinder, first head, and track's first sector. Once the track is exhausted, numbering continues to the second head, while staying inside the first cylinder. Once all heads inside the first cylinder are exhausted, numbering continues from the second cylinder, etc. Thus, the lower the LBA value is, the closer the physical sector is to the hard drive's first (that is, outermost<ref>{{cite web | url = http://www.active-undelete.com/hdd_basic.htm | title = Hard Disk Drive Basics | access-date = 2015-02-10 | website = active-undelete.com | quote = Track numbers start at 0, and track 0 is the outermost track of the disk. The highest numbered track is next to the spindle. }}</ref>) cylinder. CHS tuples can be mapped to LBA address with the following formula:<ref>{{cite web | url = http://www.tldp.org/HOWTO/Large-Disk-HOWTO-3.html | title = Large Disk HOWTO, Section 3. Disk Access | date = 2004-11-08 | access-date = 2015-02-10 | website = tldp.org }}</ref><ref>{{cite web | url = http://pcrepairclass.tripod.com/cgi-bin/datarec1/chstolba.html | title = The CHS to LBA Conversion Formulas | access-date = 2014-08-26 | website = pcrepairclass.tripod.com }}</ref> : ''LBA'' = (''C'' Γ ''HPC'' + ''H'') Γ ''SPT'' + (S β 1) where * ''C'', ''H'' and ''S'' are the cylinder number, the head number, and the sector number * ''LBA'' is the logical block address * ''HPC'' is the maximum number of heads per cylinder (reported by disk drive, typically 16 for 28-bit LBA) * ''SPT'' is the maximum number of sectors per track (reported by disk drive, typically 63 for 28-bit LBA) LBA addresses can be mapped to CHS tuples with the following formula ("mod" is the [[modulo operation]], i.e. the [[remainder]], and "Γ·" is [[integer division]], i.e. the [[quotient]] of the division where any fractional part is discarded): : ''C'' = ''LBA'' Γ· (''HPC'' Γ ''SPT'') : ''H'' = (''LBA'' Γ· ''SPT'') mod ''HPC'' : ''S'' = (''LBA'' mod ''SPT'') + 1 According to the ATA specifications, "If the content of words (61:60) is greater than or equal to 16,514,064, then the content of word 1 [the number of logical cylinders] shall be equal to 16,383."<ref name="Working Draft of ATA/ATAPI-5"/>{{rp|20|q=Section 6.2.1 - Definitions and value ranges of IDENTIFY DEVICE words}} Therefore, for LBA 16450559, an ATA drive may actually respond with the CHS ''tuple'' (16319, 15, 63), and the number of cylinders in this scheme must be much larger than 1024 allowed by INT 13h.{{Efn|Though CHS addressing definitely uses the mathematical concept of ''[[tuple]]'', it may also be considered an example of the general scheme called [[mixed radix]] by viewing its cylinders, heads and sectors as having different numerical bases; e.g., cylinders counting from 0 to 1023, heads from 0 to 254 and sectors from 1 to 63.}} ===Operating system dependencies=== {{Unreferenced section|date=June 2024}} Operating systems that are sensitive to BIOS-reported drive geometry include [[Solaris (operating system)|Solaris]], [[DOS]] and Windows NT family, where [[NTLDR]] ([[Windows NT|NT]], [[Windows 2000|2000]], [[Windows XP|XP]], [[Windows Server 2003|Server 2003]]) or [[Windows Boot Manager|BOOTMGR]] ([[Windows Vista|Vista]], [[Windows Server 2008|Server 2008]], [[Windows 7]] and [[Windows Server 2008 R2|Server 2008 R2]]) use [[Master boot record]] which addresses the disk using CHS; [[x86-64]] and [[Itanium]] versions of Windows can partition the drive with [[GUID Partition Table]] which uses LBA addressing. Some operating systems do not require any translation because they do not use geometry reported by BIOS in their [[boot loader]]s. Among these operating systems are [[BSD]], [[Linux]], [[macOS]], [[OS/2]] and [[ReactOS]].
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)