Bug 630340 - cfdisk cannot read default installer partitioning
Summary: cfdisk cannot read default installer partitioning
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: util-linux-ng
Version: 14
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Karel Zak
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-09-04 21:18 UTC by Steve Tyler
Modified: 2010-10-18 05:47 UTC (History)
1 user (show)

Fixed In Version: util-linux-ng-2.18-4.3.fc14
Clone Of:
Environment:
Last Closed: 2010-10-18 05:47:07 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Steve Tyler 2010-09-04 21:18:02 UTC
Description of problem:
After installing F14-Alpha with the default full-disk partitioning, cfdisk reports:

FATAL ERROR: Bad primary partition 1: Partition ends in the final partial cylinder

fdisk reports the partitioning without complaint.

Version-Release number of selected component (if applicable):
util-linux-ng-2.18-4.fc14.x86_64
F14-Alpha net installer CD

How reproducible:
I believe this is an "always".

Steps to Reproduce:
Although I have seen the cfdisk error on disks, this method uses a VM image file.
1. Create an 8G VM disk image file:
$ qemu-img create f14-alpha.img 8G
2. Install F14-Alpha to it after choosing the full-disk partition option.
3. After installation reboot the VM and run:
# cfdisk -P s /dev/sda
  
Actual results:
[root@fir log]# cfdisk -P s /dev/sda
FATAL ERROR: Bad primary partition 1: Partition ends in the final partial cylinder

Expected results:
cfdisk displays the partitions.

Additional info:

[root@fir tmp]# fdisk -lu /dev/sda

Disk /dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders, total 16777216 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: 0x0003a31f

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     1026047      512000   83  Linux
/dev/sda2         1026048    16777215     7875584   8e  Linux LVM
[root@fir tmp]# 

The VM image file is exactly 8589934592 bytes.

When I attempted to use cfdisk on a disk that it could not read, the only option to get cfdisk working was to repartition using "cfdisk -z /dev/sdX" and let cfdisk figure where the last sector should be. Unfortunately, this wastes sectors at the end of the disk. The installer partitioning uses those last sectors.

Comment 1 Karel Zak 2010-09-06 11:51:30 UTC
The problem is that some parts of cfdisk are still based on CHS partitioning. For example the size of the device is expected as a multiple of the cylinder size. 

I have fixed the problem in upstream repository:
http://git.kernel.org/?p=utils/util-linux-ng/util-linux-ng.git;a=commit;h=73356e0553bd9ac00f556891a4798064c0ee6849

fedora will be updated ASAP (probably next week)

Comment 2 Steve Tyler 2010-09-06 12:06:23 UTC
(In reply to comment #1)
> The problem is that some parts of cfdisk are still based on CHS partitioning.
> For example the size of the device is expected as a multiple of the cylinder
> size. 
> 
> I have fixed the problem in upstream repository:
> http://git.kernel.org/?p=utils/util-linux-ng/util-linux-ng.git;a=commit;h=73356e0553bd9ac00f556891a4798064c0ee6849
> 
> fedora will be updated ASAP (probably next week)

Thanks, Karel!

Comment 3 Fedora Update System 2010-10-07 14:50:16 UTC
util-linux-ng-2.18-4.2.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/util-linux-ng-2.18-4.2.fc14

Comment 4 Fedora Update System 2010-10-07 19:55:28 UTC
util-linux-ng-2.18-4.2.fc14 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update util-linux-ng'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/util-linux-ng-2.18-4.2.fc14

Comment 5 Fedora Update System 2010-10-11 07:16:51 UTC
util-linux-ng-2.18-4.3.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/util-linux-ng-2.18-4.3.fc14

Comment 6 Fedora Update System 2010-10-18 05:46:54 UTC
util-linux-ng-2.18-4.3.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.