为什么Linux的fdisk分区时First Sector是63或2048?

To understand why not 1, I need to describe some PC history. A long time ago, when the PC was first provided with hard drives, the first block on the drive was used by the Master Boot Record. Thats still true today, the first partition always began on Cylinder 0, Head 1, Sector 0, under the Cylinder/Head/Sector addressing scheme, whic is all there was than. 

To add to the interest, hard drives actually had differing numbers of sectors per track then and you had to describe the real geometry of the drive to the BIOS. There was no auto dectect or Logical Block Addressing as used today. The Cylinder/Head/Sector addressing scheme broke permently when hard drives reached 4Gb but its legacy lives on. 
The largest numbers that fit in the CHS addressing scheme is 255 heads and 63 sectors per track. Hence until recently, the first partition always started at sector 63. Thats head 1, sector 0.  

//CHS方式寻址时,扇区号是从1开始的。但是实际的物理扇区是从0开始的,对于LBA寻址方式来说扇区号也是从0开始。这里出现的secotr 0是指物理扇区号。


Over the years, boot loaders have used some of the 'unallocated' space between the MBR and the start of the first partition. 

With the death of the legacy BIOS (ok, its not quite dead yet) and its replacement with EFI BIOS, a special boot partitionis needed to allow EFI systems to boot in EFI mode. 
Starting the first partition at sector 2048 leaves 1Mb for the EFI boot code. Modern partitioning tools do this anyway and fdisk has been updated to follow suit.

You can force some tools to give you back most of this 1Mb but its usually a bad idea. 

Your 2Tb drive will use 4k physical sectors. Its very important that you create partitions that are aligned on 4kb boundaries or your read/write speeds will be very poor. That is, partition starts must be a multiple of eight sectors. Notice that 63 is not a multiple of 8 but that 2048 is. 

As you really need to leave some space for grub, you should not start your first partition before sector 64. If you know how big grub is, you can make that smaller but its not worth the effort.

你可能感兴趣的:(Linux)