1

I am learning to use fdisk. When I check free space in disk using F command it shows free space starts at sector 2048. But if i try to create new partition using n command It says I can start from sector 34

enter image description here

And if I enter any value less than 2048 and then check free space by F command I get this. 16 EB of freespace!!!

enter image description here

Why is this so?

3
  • 2
    I enter any value less than 2048 and then check free space by F command I get this. 16 EB of freespace Software assumes there is no errors in partition table and do not checks for overflow during substraction. Negative volume size obtained is shown as an extreme unsigned value.
    – Akina
    Aug 3, 2018 at 12:22
  • 1
    It appears you found a bug in fdisk. In version 2.32.1 I can no longer enter starting sectors below 2048.
    – Daniel B
    Aug 3, 2018 at 12:37
  • @DanielB My version is 2.31.1.
    – Arun
    Aug 3, 2018 at 13:36

1 Answer 1

2

The reason for 16EB is because the subtraction of 47-2048 results in a negative number. Apparently a bug that has already been fixed.

The reason is performance. Have heard of hard drives with 4k sectors? They had to be 4k aligned in order to have the correct performance. Other device and manufacturers have discovered there devices didn't get the full performance without different alignments.

A decision was made as a catch-all that 2048 would eliminate most if not all of the performance reducing alignments. Given how cheap storage is no one will miss the loss of 1MB of hard drive.

Originally, a 63 sector gap was left and it was used to fit drive overlays for bios that didn't support the full size of the hard drive. Especially common when computers first got 1-8gb hard drives. However, hard drives now use LBA and the drive overlay non-sense is a thing of the distance past.

Although now we have to switch to GPT with hard drives bigger than approx 2TB since MBR doesn't support that.

3
  • 1
    Why 2048 though? Wouldn't 1 MiB be 1024? Sep 11, 2019 at 2:41
  • 1
    2048 sectors, each sector being 512 bytes, produces 1048576 bytes, or 1 MB.
    – SasQ
    Sep 26, 2020 at 5:29
  • It was done to accommodate all future align needs, with a bunch of headroom to ensure all future needs were met. The number had to be a power of 2 and had to match 512 and 4k alignments.
    – cybernard
    Sep 26, 2020 at 13:59

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