OpenSolaris

Printable Version Enter a New Search
Bug ID 6651384
Synopsis fdisk off-by-one starting cylinder issue
State 5-Cause Known (Bug is root caused)
Category:Subcategory utility:fdisk
Keywords sxde
Responsible Engineer Shidokht Yadegari
Reported Against
Duplicate Of
Introduced In
Commit to Fix
Fixed In
Release Fixed
Related Bugs 6643566
Submit Date 16-January-2008
Last Update Date 13-February-2008
Description
I have an x86 laptop with a disk containing 7284 cylinders.  The disk has three consecutive NTFS partitions, all managed by Windows XP.  The three partitions span cyls 0-4078 with no gaps.  The problem is that fdisk does accept cyl 4079 as the starting cylinder for a new partition.  It will, however, accept cyl 4080.

I discovered this problem through running the SXDE installer.  The installer (correctly) specified cylinder 4079, but since fdisk did not accept it, the installer failed.
fdisk -W output is as follows:

Id   Act   Bhead   Bsect   Bcyl   Ehead   Esect   Ecyl   Rsect       Numsect
7    0     1       1       0      254     63      1023   63          24579387
7    0     254     63      1023   254     63      1023   24579450    20478150
7    0     254     63      1023   254     63      1023   45057600    20472480

This means:
partition2 : (24579450 + 20478150) /16065 = 2804.70588235294117647058
partition 3: (45057600 + 20472480) /16065 = 4079.05882352941176470588

partition 3 is expanding into cylinder 4079. If the failure is due to fdisk,
that should be why fdisk does not allow 4079 as starting cylinder. partition 3
has bit in cylinder 4079.  4256044 is a related bug about cylinder alignment
enforcement in fdisk.

When I run fdisk manually, it reports that the last cylinder is 4078.  Looks like there is a rounding error somewhere in fdisk if partition 3 really ends at 4079.something .  fdisk should report the last cylinder to be 4079.
Work Around
When running fdisk, skip one cylinder and specify a starting cylinder which is one greater than should be necessary.

Or, if running the installer, set everything up and start the install.
After the installer fails, quit it and check the install_log for the starting cylinder of the new Solaris partition.  Add one to it and run fdisk manually to set up the new Solaris partition.  Then restart the installer, skip the partitioning, and do the install.
Comments
N/A