partman should not try to minimize the extended partition
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!
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).