How Partition Tables Work
What is a Partition Table
A partition table is a table at the very start of the disk that points to the location of partitions in the disk, which hold filesystems.
There are many types of partition tables, the most common are "msdos" and "GPT".
msdos partition table is the older legacy partition table that's used on BIOS PC's.
It's located in the MBR (Master Boot Record) which is at the very start of the disk.
The partition table is specifically from the 446byte to the 509 byte.
Some limitations of the msdos partition table is that it can only have 4 primary partitions.
However, with the use of extended and logical partitions, it can have more partitions.
It's a way to go about this limitation by using an extended partition instead of a primary one, and that can point to several logical partitions.
There always has to be at least 1 primary partition.
Another limitation is that msdos partition table can only refer to a partition of maximum 2TB in size.
GPT partition table is newer and it was made for UEFI PC's.
On Windows, GPT can only be used with UEFI, however on Linux GPT and legacy BIOS can be used together.
GPT partition table is not limited to a partition of maximum 2TB in size.
Also, GPT can have by default up to 128 primary partitions.
It's important to understand that partition tables are only like an address book. The filesystems are located in the disk, and partition tables only have entries of where they're located. If a partition table is deleted, the data and filesystems are still there, we just don't have the location of them anymore. Still it's very easy to recover where the locations are using software such as testdisk.