Question: First, I am assuming that drives and/or partitions have a linear address from start to finish. This must be the case, or else programs like dd would not be able to function as a copying mechanism.
Is the boot sector pretty much always just address 0 in this array of bytes? I suppose it depends on the filesystem being used on that drive?
Sorry I’m really not knowledgeable about these low-level things, and I want to learn!
Answer: Yes, the boot sector is always in sector 0 for MBR. ?The hard drive is divided into sectors which traditionally are 512 bytes, but 4TB+ drives are starting to use 4096 byte sectors.
You have to read or write an entire sector.
Today LBA, Logical Block Allocation, has a standard progression of sectors from 0 to the capacity of the drive.
Ancient hard drives actually use Cylinders,heads, and sectors. ?Wherein each head held so many sectors and each cylinder held so many heads.
The file system doesn’t start in sector 0 instead the partition table indicated the start of the partition, so file systems play no part in this.
Also GPT has started to replace MBR as MBR has a limit of approx 2.2TB and has a convoluted way of representing more than 4 primary partitions. ?You need logical partitions and each extended partition can contain many logical partitions.
GPT has done away with many of the complexities and updated and simplified things. ?
Here is more details.
https://en.wikipedia.org/wiki/GUID_Partition_Table