Run Linux fdisk with sectors as display units 

Joined:
04/07/2009
Posts:
163

March 10, 2011 11:08:45    Last update: March 10, 2011 11:09:18
Looks like for Linux fdisk, cylinders as display units was deprecated, using sectors is the new way.
# fdisk -v
fdisk (util-linux-ng 2.18)

# fdisk -u=cylinders /dev/sda

WARNING: cylinders as display units are deprecated. Use command 'u' to
         change units to sectors.

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

Command (m for help): p

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 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: 0xec75ec75

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63   167172389    83586163+   7  HPFS/NTFS
/dev/sda2       167174144   168198143      512000   83  Linux
/dev/sda3       168198144   625141759   228471808   8e  Linux LVM

Command (m for help): u
Changing display/entry units to cylinders (DEPRECATED!)

Command (m for help): p

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xec75ec75

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1       10406    83586163+   7  HPFS/NTFS
/dev/sda2           10407       10470      512000   83  Linux
/dev/sda3           10470       38914   228471808   8e  Linux LVM

Notice that cylinder numbers actually overlap for the last 2 partitions.
Share |
| Comment  | Tags