partman should not try to minimize the extended partition

Bug #57780 reported by Collins Richey
4
Affects Status Importance Assigned to Milestone
partman-base (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I tried this twice before I realized what was happening and preallocated partitions for Ubuntu. I used the Kubuntu 6.06.1 LiveCD for installation. My partition setup on hda looks approximately like this prior to starting custom partitioning.

Disk /dev/hda: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot Start End Blocks Id System
/dev/hda1 * 534 5755 41943040+ 7 HPFS/NTFS
/dev/hda2 1 533 4281291 b W95 FAT32
/dev/hda3 5755 5877 982639+ b W95 FAT32
/dev/hda4 5878 24321 148151430 5 Extended
/dev/hda5 5878 9525 29302528+ 83 Linux
/dev/hda6 9536 9769 1959898+ 82 Linux swap /
...
Partition table entries are not in disk order

If I add three partitions (10g for /, 3g for /var, 3g for /home) and mark them for formatting, then continue, the amount of space in partion 4 (the extended partition) gets whacked. After installation is complete I only have something like 60g allocated to the extended partition! So I can't use remaining space on the disk. In order to cure the problem, I have to delete all partitions except 1 & 2, then add partition 3 as primary and partition 4 as extended to get back the free space. I then preallocate the original partitions 5-6 and partitions 7-9 for Ubuntu and rerun the installation. Unfortunately, I don't know at what point in the process (allocation of partitions 7-9, or later during the formatting process) the extra space disappeared from the extended partition.

History. The disk originally consisted only of partitions 1 & 2 (WinXP), but I shrunk partition 1 during an earlier Ubuntu install to make space, so the partition resizing logic is suspect as well, especially since it appears that partition 3 was assigned space overlapping the final cylinder of partition 1!

Revision history for this message
David Balažic (xerces8) wrote :

The debian install time partitioner reduces the size of the extended partition to the minumum possible. That is : On a 60 GB disk, if there are one 10 GB primary partition and two logical partition of size 5 GB and 30 GB , the extended partition will be sized 35 GB. So the unused space (60 - 10 - 35 =) of 15 GB will be outside the extended partition.

This makes adding new partitions with most of the tools (fdisk etc...) very hard, since they can't extend the extended partition, at least not in an easy way.

I would prefer the partitioner to leave existing extended partitions as they are and create new ones to span all the available free space (or ask the user).

Revision history for this message
Paul Dufresne (paulduf) wrote : Re: minimising extended partitions can cause problems for other partitioning tools

Thank you for taking the time to report this bug and helping to make Ubuntu better. You reported this bug a while ago and there hasn't been any activity in it recently. We were wondering is this still an issue for you? Can you try with latest Ubuntu release? Thanks in advance.

Changed in partman-base:
assignee: nobody → dufresnep
status: New → Incomplete
Revision history for this message
David Balažic (xerces8) wrote :

Yes.
It is also very easy to reproduce: do any partitioning with the installer and leave some disk space unpartitioned, then check that the extended partition does not cover all disk space.
(I checked with 7.10 desktop CD)

Revision history for this message
Paul Dufresne (paulduf) wrote :

Thank you.
I am confirming this bug, letting developers to decide what to do with this.

Changed in partman-base:
assignee: dufresnep → nobody
status: Incomplete → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.