ITZone

CHS address and LBA address

“The article is used as a supplementary material for the Linux System Administration Series”.

In addition to the LBA (Logical Block Addressing) method for addressing data blocks on hard drives, the CHS (Cylinder-Head-Sector) addressing method is still an important method of partitioning devices. Storage as hard disk or SSD. Do you want to access the hard drive partitions in a specific and clear style? So it is impossible not to mention CHS .

1. CHS – Cylinder – Head – Sector

CHS is a method of locating hard drives that appear very early. Although addressing with drives with CHS today is not recommended due to modern drive specifications, they are still used by many utilities. Here are some of the terms used:

Of course, the aforementioned ranges do not tell the truth in fact, there is no drive containing 128 disks from it. Today, CHS addresses are mainly used in utilities to help partition disks. As we can see, the values ​​of C and H start at 0, and the value of S starts at 1. The first sector of the drive will be located at 0/0/1 . In theory, each sector is a block of 512 bytes, although the sector with a sector of up to 4096 bytes has appeared since 2010. If each sector is 512 bytes, the maximum volume that the drive carries 7.844 Gigabytes (1024 x 255 x 63 x 512 = 8,422,686,720: eight billion four hundred and twenty two million six hundred eighty six thousand and seven hundred and twenty bytes)

Logical Block Addressing – LBA – Logical Block Addressing – another method used to type in the disk storage unit.

For hard drives larger than 7,844 Gigabytes, CHS seems impotent, but for compatibility reasons (at least for booting the system for example), we still have to resort to it. Modern BIOSes can now switch to LBA mode easily through extensions of interrupt Int13H (an interrupt defined in x86 architectures, which will set up the service to read / write sectors of the hard drive or soft, based on CHS coordinate system – Wikipedia ).

The LBA concept erases the definitions of Cylinders and Head in CHS . The LBA address system sees the drive as a storage entity that holds consecutive blocks . So it can be said that the LBA address system is a linear address system , meaning that the first block will have address 0 ; and the last block will own the highest address, depending on the drive size and the area of ​​the block.

Instead of specifying the location of Cylinder, Head and Sector as in CHS, the disk controller only needs to know the LBA address of a block to access it easily. Using LBA, the drive can access output more blocks only, meaning that its capacity may be larger. Note that the block concept in LBA is equivalent to the sector in CHS.

3. MBR – Master Boot Record

The first sector of a drive has been partitioned. (LBA 0 or CHS 0/0/1 ), it contains:

4. Extended partition table – Extended Partition Table

The partitions are divided into two types, the primary partition and the extended partition . Extended partitions can also be divided into other logical partitions .

Logical partitions are not defined in MPT, their partition table is located in the first sector of the Extended Partition Table (EPT ). Similar to MPT, EPT also has only 4 16byte entries, storing information about up to 4 logical partitions. However, we never use more than 2 entries.

If there are more than two logical partitions, a linked list of EPTs will be created.

ITZone via Kipalog

Share the news now