fdisk limits heads to 254 (mostly)
The fdisk utility currently (mostly, see below) limits the number of heads in the CHS table to the range 0-254 rather than 0-255.
Therefore, when an LBA is encountered that cannot be expressed as a CHS value, it sets C/H/S to 1023/254/63 - see Set_Table_CHS_Values()
However, at startup it will set CHS to 1023/255/63 for a disk with no MBR.
libefi uses 1023/255/63 when creating a protective MBR for an EFI-partitioned disk.
Limiting the number of heads to 254 is a workaround for a very old MSDOS bug which is no longer required; the inconsistency between the tools/libraries should be fixed and heads allowed to be set to 255.
Updated by Electric Monk over 1 year ago
- % Done changed from 0 to 100
- Status changed from New to Closed
commit 7e934d3acc051b7ee3ef0d11571fd1225800a607 Author: Andy Fiddaman <email@example.com> Date: 2018-03-30T01:17:56.000Z 9067 Support PMBR customisation with EFI label 9116 fdisk limits heads to 254 (mostly) Reviewed by: Toomas Soome <firstname.lastname@example.org> Reviewed by: Jorge Schrauwen <email@example.com> Reviewed by: Dominik Hassler <firstname.lastname@example.org> Approved by: Robert Mustacchi <email@example.com>