Actions
Bug #9116
closedfdisk limits heads to 254 (mostly)
Start date:
2018-02-15
Due date:
% Done:
100%
Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:
Description
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 4 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
git commit 7e934d3acc051b7ee3ef0d11571fd1225800a607
commit 7e934d3acc051b7ee3ef0d11571fd1225800a607 Author: Andy Fiddaman <omnios@citrus-it.co.uk> 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 <tsoome@me.com> Reviewed by: Jorge Schrauwen <sjorge@blackdot.be> Reviewed by: Dominik Hassler <hadfl@omniosce.org> Approved by: Robert Mustacchi <rm@joyent.com>
Actions