On Fri, 29 Oct 2021 17:16:01 -0700 (PDT)
Post by ***@gmail.comhttps://en.wikipedia.org/wiki/Master_boot_record
that the first 512 bytes of the hard disk doesn't store
the sector size. So when you need to get to the first
partition, you have the LBA number, but you don't know
how many bytes you need to seek to.
According to an article by Seagate linked to by Wikipedia (link below),
LBAs are always 512 bytes. (Is this correct? IDK ...) Apparently,
LBAs are always 512 bytes even for the 4KB block devices. (I guess
this could be true for 4KB block devices if using LBA48.)
"Each 512-byte sector is assigned a unique LBA, from zero (0) to the
number required based on the size of the disk."
Also, according to the same article, OSes and partioning software are
either 4K aware or they aren't. I.e., for 4K aware OS and partitioning
software, LBA 0 should be aligned to 0th byte offset or the 1st 512
block of the 0th 4KB block ("aligned"), instead of the 2nd, 3rd, 4th,
5th, 6th, 7th, or 8th 512 block of the 0th 4KB block ("unaligned"). If
the OS and partition software is 4K aware, then the partioning software
also aligns the partition start to a 4KB boundary. Apparently,
alignment of partitions to non-4K boundaries is to be avoided. If a
partion is unaligned on a 4K device, then it must be re-aligned using
special tools, or deleted and recreated with proper 4K alignment.
There is a table for Windows OSes as to whether or not they're 4K
aware. The article also lists at which kernel version Linux is 4K
aware thereafter.
https://www.seagate.com/tech-insights/advanced-format-4k-sector-hard-drives-master-ti/
In other words, or AIUI, LBAs work as we expect, reading or writing
only 512 byte blocks for both 512 byte or 4KB block devices. And, so,
if the image is 512 byte block based, everything is fine. And, if the
image is 4KB block, the partitioning software should've aligned the
partition start to a 4KB boundary. If the image is 4KB block, and the
partition is unaligned, someone must fix the partition start on the 4KB
device to be 4K aligned, and remake the image.
--
Democrats are trying to tax billionaires but repeal the SALT cap which
benefits the rich, at the same time.