Bug 540808

Summary: PartitionException: Can't have overlapping partitions.
Product: [Fedora] Fedora Reporter: info <info>
Component: anacondaAssignee: David Lehman <dlehman>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: kiosso, mnzchs-evry1, Per.t.Sjoholm, vanmeeuwen+fedora, zolko.m
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: anaconda_trace_hash:1f1fa21669671e4dc28caf6acf1a17096ac7018d9cacafed71cc0d3ad82d09ee
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-06-08 16:34:38 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Attached traceback automatically from anaconda.
none
Attached traceback automatically from anaconda.
none
Attached traceback automatically from anaconda.
none
Attached traceback automatically from anaconda. none

Description info@kobaltwit.be 2009-11-24 08:16:51 UTC
The following was filed automatically by anaconda:
anaconda 12.46 exception report
Traceback (most recent call first):
  File "/usr/lib/python2.6/site-packages/parted/disk.py", line 202, in addPartition
    constraint.getPedConstraint())
  File "/usr/lib/python2.6/site-packages/parted/decorators.py", line 30, in localeC
    ret = fn(*args, **kwds)
  File "<string>", line 2, in addPartition
  File "/usr/lib/anaconda/storage/formats/disklabel.py", line 240, in addPartition
    constraint=constraint)
  File "/usr/lib/anaconda/storage/devices.py", line 1158, in create
    self.disk.format.addPartition(self.partedPartition)
  File "/usr/lib/anaconda/storage/deviceaction.py", line 205, in execute
    self.device.create(intf=intf)
  File "/usr/lib/anaconda/storage/devicetree.py", line 708, in processActions
    action.execute(intf=self.intf)
  File "/usr/lib/anaconda/storage/__init__.py", line 275, in doIt
    self.devicetree.processActions()
  File "/usr/lib/anaconda/packages.py", line 110, in turnOnFilesystems
    anaconda.id.storage.doIt()
  File "/usr/lib/anaconda/dispatch.py", line 200, in moveStep
    rc = stepFunc(self.anaconda)
  File "/usr/lib/anaconda/dispatch.py", line 123, in gotoNext
    self.moveStep()
  File "/usr/lib/anaconda/gui.py", line 1195, in nextClicked
    self.anaconda.dispatch.gotoNext()
PartitionException: Can't have overlapping partitions.

Comment 1 info@kobaltwit.be 2009-11-24 08:16:57 UTC
Created attachment 373360 [details]
Attached traceback automatically from anaconda.

Comment 2 info@kobaltwit.be 2009-11-24 08:55:48 UTC
This error happened when trying to install Fedora 12 (x86) on a laptop that still contained two nfts partitions. There are some peculiarities in this setup that may be important for this bug:

* The first ntfs partition is /dev/sda1 (primary partition). This is a Windows XP setup. Nothing special here.
* The second partition is /dev/sda2 (primary partition) and is a Windows recovery partition. This partition however is located at the end of the drive.
* Between these two sits a windows extended partition that occupies all free space. The extended partition used to hold one logical partition, but this one was deleted via the Windows disk management tool. The extended partition remained.

Here's what fdisk says for this drive:

Disk /dev/sda: 80.0 GB, 80026361856 bytes
240 heads, 63 sectors/track, 10337 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes
Disk identifier: 0xca0aca0a

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        4877    36870088+   7  HPFS/NTFS
/dev/sda2            9281       10337     7990920    7  HPFS/NTFS
/dev/sda3            4878        9280    33286680    f  W95 Ext'd (LBA)

Partition table entries are not in disk order

Next, I'll give you all the steps I took to get here:
* Boot from the F12 installation dvd (32bit edition)
* Follow the normal installation steps until the partitioning step
* For partitioning, choose "Use free space" and check "Review partitioning layout"
* I left most of the default layout, but shrunk the root lv to 10Gb, and added a partition for /home using the remaining free space on the volume group.
* Confirm to write changes to disk
* An error pops up, and I'm invited to report it as a bug.

I'm not sure what triggered the bug. I see two obvious candidates:
* The extended partition that's still there, while being empty (shouldn't the boot partition be a primary partition ?)
* The fact that the partition entries are not in disk order.

Comment 3 info@kobaltwit.be 2009-11-24 09:05:02 UTC
I tested some more. It turns out anaconda tripped over the existence of the empty logical partition.

I removed it using fdisk and after that, the next partitioning attempt using anaconda worked fine.

Comment 4 Hans de Goede 2009-11-30 09:28:08 UTC
*** Bug 541009 has been marked as a duplicate of this bug. ***

Comment 5 Antal Zoltán 2010-01-27 18:53:49 UTC
Created attachment 387154 [details]
Attached traceback automatically from anaconda.

Comment 6 Keith Iosso 2010-04-12 12:51:20 UTC
Created attachment 405954 [details]
Attached traceback automatically from anaconda.

Comment 7 Per Sjoholm 2010-05-13 07:39:54 UTC
Created attachment 413665 [details]
Attached traceback automatically from anaconda.

Comment 8 Per Sjoholm 2010-05-13 15:01:42 UTC
Comment on attachment 413665 [details]
Attached traceback automatically from anaconda.

Restarted installation and it worked.
Noted that the partions ended on a not even boundery and I hade free space at the end

Comment 9 David Lehman 2010-06-08 16:34:38 UTC
There were several issues with handling of pre-existing extended partitions, particularly empty ones. They have been addressed as of anaconda-13.39-1.fc13 (for Fedora 13) and anaconda-14.5-1.fc14 (for current rawhide and Fedora 14).