Large Disk mini-HOWTO: Translation and Disk Managers

Rate this post

prev-8635255 next-7312941 toc-5459255

Nobody is interested in what the `real’ geometry of a disk is. Indeed, the number of sectors per track often is variable – there are more sectors per track close to the outer rim of the disk – so there is no `real’ number of sectors per track. For the user it is best to regard a disk as just a linear array of sectors numbered 0, 1, …, and leave it to the controller to find out where a given sector lives on the disk.

This linear numbering is known as LBA. The linear address belonging to (c,h,s) for a disk with geometry (C,H,S) is c*H*S + h*S + (s-1). All SCSI controllers speak LBA, and some IDE controllers do.

If the BIOS converts the 24-bit (c,h,s) to LBA and feeds that to a controller that understands LBA, then again 7.875 GB is addressable. Not enough for all disks, but still an improvement. Note that here CHS, as used by the BIOS, no longer has any relation to `reality’.

Something similar works when the controller doesn’t speak LBA but the BIOS knows about translation. (In the setup this is often indicated as `Large’.) Now the BIOS will present a geometry (C’,H’,S’) to the operating system, and use (C,H,S) while talking to the disk controller. Usually S = S’, C’ = C/N and H’ = H*N, where N is the smallest power of two that will ensure C’

Lire aussi...  Books On The Screen