fdisk Force sector 63 boundary

Most modern disk drives need a partition to be aligned on sector 2048 to avoid writes overlapping two sectors, but for a long time the sector 63 was used by the fdisk utility and distro's installers by default.

This can cause severe performance issues on modern disks. Often they will try to cover up for it in firmware, which means the issue will be still there, but the pain will be just low enough to not really find out whats wrong.

The best solution is to use either GPT/EFI partitions or switch to using LVM since partitions have been an outdated concept for many years now.

On modern distros like Ubuntu the fdisk utility is patched to default to 2048 sectors. But you need to use sector 63?

In fact it does not even allow doing it wrong anymore:

Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4, default 1): 1 
First sector (2048-2930277167, default 2048): 63
Value out of range.
First sector (2048-2930277167, default 2048): q
First sector (2048-2930277167, default 2048): 
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-2930277167, default 2930277167): 
Using default value 2930277167

Command (m for help): q

But what if you need to do just this, i.e. to replace a disk on an old raid?

You can give an extra argument to tell fdisk you need the old DOS-style disk block addressing now for a fdisk session!

root@egal:~# fdisk -c=dos -u=cylinders /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xae91bf39.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (with command 'c').
WARNING: cylinders as display units are deprecated. Use command 'u' to
         change units to sectors.

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4, default 1): 
Using default value 1
First cylinder (1-182401, default 1): 
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-182401, default 182401): 
Using default value 182401

Command (m for help): u
Changing display/entry units to sectors

Command (m for help): p

Disk /dev/sdb: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders, total 2930277168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xae91bf39

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1              63  2930272064  1465136001   83  Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

Quite a few warning messages. Someone needed to be on the safe side?