[ale] PSA: Pay attention to your sector alignment

JD jdp at algoloma.com
Tue Sep 23 16:06:42 EDT 2014


I stopped using fdisk a few years ago - use parted instead. It handles the
alignment correctly by default and handles GPT disks.

I understand that fdisk is/has been updated and by 2018, it may be safe to use
it by default again ... active distros should be all there by that point. ;)

gdisk has some issues - or did.  Something about force migrating MBR to GPT?  I
don't recall - just that fixparts http://www.rodsbooks.com/fixparts/ is the tool
to clean it up.  Or is that the tool that causes it?  I can't remember.

On 09/23/2014 11:56 AM, Ted W wrote:
> When resizing a partition using fdisk, it's important to take note of the
> starting position of the original partition before creating the new partition.
> Apparently fdisk, by default, uses track-alignment starting at position 63 where
> as newer partitioning tools (e.g. parted) aligns to the 1MiB boundry, starting
> at 2048. If you wish to still use fdisk to resize a partition starting at 2048
> you can use `fdisk -u -c /dev/sdX` to ignore MsDOS compatibility and default to
> 2048 as the starting position.
> 
> I just spent 5 hours last night fearing I had somehow munged my /srv partition
> while resizing the disk because the new partition table had the wrong starting
> point thanks to fdisk. Once I shifted the start point to 2048, all was fine. One
> more lesson well learned.
> 



More information about the Ale mailing list