关于linux的分区,为什么home分区的扇区号分到了之前呢,可以调整吗

关于linux的分区,为什么home分区的扇区号分到了之前呢,可以调整吗,第1张

这个影响不大,主要是/boot一定要在第一个,其他的第几个无关紧要.linux在启动的时候,grub可以找到/boot分区再加载里面的kernel,启动系统..如果/boot不是第一个极易导致grub找不到/boot启动不了..启动的就是一个排序先后问题,无关紧要..

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.


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/yw/8295687.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-15
下一篇 2023-04-15

发表评论

登录后才能评论

评论列表(0条)

保存