primary extended and logical partition | xxd -l 512 /dev/sda

What is a Partition?

Many drives come with a single partition already set up, but all storage devices are just treated as a mass of unallocated, free space when they contain no partitions. To actually set up a file system and save any files to the drive, the drive needs a partition.
The partition can contain all of the storage space on the drive or just some of it. On many storage devices, a single partition will often take up the entire drive.
Partitions are necessary because you can’t just start writing files to a blank drive. You must first create at least one container with a file system. We call this container a partition. You can have one partition that contains all the storage space on the drive or divide the space into twenty different partitions. Either way, you need at least one partition on the drive.


Primary, Extended, and Logical Partitions

When partitioning, you’ll need to be aware of the difference between primary, extended, and logical partitions. A disk with a traditional partition table can only have up to four partitions. Extended and logical partitions are a way to get around this limitation.
Each disk can have up to four primary partitions or three primary partitions and an extended partition. If you need four partitions or less, you can just create them as primary partitions.

However, let’s say you want six partitions on a single drive. You’d have to create three primary partitions as well as an extended partition. The extended partition effectively functions as a container that allows you to create a larger amount of logical partitions. So, if you needed six partitions, you’d create three primary partitions, an extended partition, and then three logical partitions inside the extended partition. You could also just create a single primary partition, an extended partition, and five logical partitions — you just can’t have more than four primary partitions at a time.



00001a0: b40e cd10 ac3c 0075 f4c3 0000 0000 0000  .....<.u........
00001b0: 0000 0000 0000 0000 1d88 0a00 0000 8020  ...............
00001c0: 2100 83aa 2882 0008 0000 0000 2000 00aa  !...(....... ...
00001d0: 2982 8efe ffff 0008 2000 00f8 df04 0000  )....... .......
00001e0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00001f0: 0000 0000 0000 0000 0000 0000 0000 55aa  ..............U.

83aa - boot partition
8efe - linux LVM partition

Comments

Popular posts from this blog

HAproxy logging

teamcity Automatic Agent Start under Linux

NFS mount add in fstab _netdev instead of default | firewall-cmd --list-all