Most hard drive and partition inspection tools seem to list the items using sectors, head.. etc. From another question I was told that these are virtual because they have to be converted from lba, which causes conversion errors. Are there any unix tools that list a hard drive by logical blocks?
CHS (Cylinder/Head/Sector) was used in the past for this. CHS addresses did (originally) map to actual, physical locations on disk platters.
However, as drives modernized, this C/H/S division stopped making sense. The fixed number of sector per cylinder is not practical at all (cylinders closer to the outer edge of the disk can store more data than those closer to the inner edge), so a different system was needed.
LBA (Logical block addressing) is what is used on (probably all) modern drives. The drive is logically divided into blocks (512 byte or 4k byte sectors mostly), the first block is block 0, the next one block 1, etc.
How the actual physical drive maps those logical sectors to physical areas of its platters is up to the drive. So in this sense, it is a "virtual" address. But it is also perfectly accurate.
- If you have a drive that does use CHS (unlikely), something will have to convert LBA address to CHS, and if the drive geometry information somewhere is wrong, you'll get inaccuracies.
- If you have a modern drive, attempts to use CHS will also lead to problems, since a conversion needs to be done, and CHS doesn't map well with modern drives.
fdisk lists by default is "LBA", using 512 byte sectors (possibly 4k sectors on drives that have that - I don't have one to check). It does list heads/sectors/tracks/cylinder as information but that is the "virtual" measure these days.
cfdisk can print the partition table with C/H/S start/end values if you really want that (use the
Table then enter twice).