2

When I run fdisk, I get a warning message:

Partition table entries are not in disk order

Here is an example of the command I'm executing and its output:

sudo fdisk -l

[sudo] password for phil: 

Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x6058406e

Device     Boot      Start        End    Sectors   Size Id Type
/dev/sda1               63    1012094    1012032 494.2M 83 Linux
/dev/sda2          1026048 1348251647 1347225600 642.4G  5 Extended
/dev/sda3  *    1348251648 1953523711  605272064 288.6G  7 HPFS/NTFS/exFAT
/dev/sda5       1244766208 1314039807   69273600    33G 83 Linux
/dev/sda6       1314041856 1348251647   34209792  16.3G 82 Linux swap / Solaris
/dev/sda7          1028096 1244764159 1243736064 593.1G 83 Linux

Partition 2 does not start on physical sector boundary.


Partition table entries are not in disk order.

According to my online research, this warning occurs when the partition's sector doesn't start on the "right sector", as it produces speed penalties when writing. One way to identify this issue is supposedly to check if the sector is divisible by 8; if so, the partition is correct.

The output above, except for the first partition, shows that all the partitions have the first sector divisible by 8, i.e. the Extended Partition 2 and its logical partitions.

Am I correct about that? And if so, why am I receiving this warning?

EDIT

I don't have any encripted partition (neither in linux nor in windows).

The version of fdisk is:

sudo fdisk -version
fdisk from util-linux 2.25.2

migrated from stackoverflow.com Aug 6 '17 at 14:13

This question came from our site for professional and enthusiast programmers.

  • That partition map is MBR. I think it's complaining that the partitions aren't aligned which could potentially cause a speed penalty and if it were a boot drive might have other drawbacks since the boot loader is written in the first 2048 bytes of the drive (not the first partition). It probably would want partition 1 to begin at 2048 bytes instead of 63 like it is now. I know it's mentioning partition 2 but if partition 1 is off then I would imagine that would be the main wrench in the works. – Cory T Aug 7 '17 at 1:50
  • You should check your fdisk command version and have a look at kernel.org sources kernel.org/pub/linux/utils/util-linux. Perhaps it uses a different granularity than the minimum I/O size. – Emmanuel Aug 11 '17 at 17:47
0

Actually, the message relates to /dev/sda1. That partition starts at logical sector 63 which is not a physical sector boundary. Physical sector size here is 4096 bytes, that is 8 logical sectors (512 bytes).

Usually, slot N in the partition table matches device /dev/sdxN, but for a reason unknown to me, /dev/sda1 seems to be slot 2 in your partition table. I have found evidence of such a weird behavior here (which is about an encrypted disk). Does your disk show some peculiarities like encryption?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.