Installation creates a new swap partition

Bug #782507 reported by Ali Shtarbanov
42
This bug affects 9 people
Affects Status Importance Assigned to Milestone
partman-auto (Ubuntu)
Triaged
Medium
Unassigned
Oneiric
Triaged
Medium
Unassigned
Precise
Triaged
Medium
Unassigned
partman-auto-crypto (Ubuntu)
Confirmed
Undecided
Unassigned
Oneiric
Confirmed
Undecided
Unassigned
Precise
Confirmed
Undecided
Unassigned

Bug Description

I installed Ubuntu 11.04 a few days ago. Then, yesterday I reinstalled the same version (11.04). In the installer window, I chose the option to automatically delete the old version and reinstall. Today, I had to reinstall the same version (11.04) again, and just like yesterday, I chose the option of AUTOMATICALLY DELETING existing version and reinstalling 11.04.

Just a few hours ago, however, I noticed in Gparted that I have three (3) swap partitions. The option in the installer to automatically delete existing version and install the new version apparently deletes only the ext4 partition, and then uses that freed space to create an ext4 partition (smaller than the original) & a swap partition. It ignores the fact that a swap partition already exists.

Expected Results:
The installer option "delete current version and install this version" should not create a new swap partition if the previous Ubuntu installation alredy had a swap partition. The option should act just as expected. It should keep the partition configuration exactly the same. The ext4 partiiton should have the same exact size as the ext4 parition in the previous installation; and the swap partiiton (if any) from the previous installation should remain unchanged and be used as the swap partition for the new installation.
  A new swap partition should be created if and only if the previous installation did not have a swap partition.

affects: ubuntu → partman-auto (Ubuntu)
Revision history for this message
Chad A Davis (chadadavis) wrote :

This also occurs with the 'Guided - resize' installation option. I installed once with the 'entire disk' option, which creates an extended partition containing the swap partition. The following install resizes the ext4 primary partition, then creates a new ext4 logical partition in the extended partition (makes sense so far), but then also adds another swap partition into the extended partition (leaving two logical swap partitions). Screen shot of partition layout attached.

Each system only uses one swap partition. They should probably share a single swap partition, because it's contents are only persistent during a hibernate, and it's not possible to leave one OS hibernated and boot into another OS.

This is with the oneiric dev branch (ubuntu-alternate-amd64.iso from 2011-07-05)

tags: added: iso-testing
Revision history for this message
Chad A Davis (chadadavis) wrote :
Revision history for this message
Chad A Davis (chadadavis) wrote :
Changed in partman-auto (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Chad A Davis (chadadavis) wrote :

My statement regarding hibernation was wrong. It *is* possible to hibernate one OS while using another and then later resume back into the first OS, as long each uses a separate swap partition. Whether this use case is common enough to justify having a separate swap partition for each OS may be a matter of opinion.

To be clear, the original bug is that when installing over an existing Ubuntu, an extra swap is created without deleting/reusing the original swap, leaving one OS and two swap partitions.

Colin Watson (cjwatson)
Changed in partman-auto (Ubuntu):
status: Confirmed → Triaged
tags: added: oneiric
Revision history for this message
Jochen Fahrner (jofa) wrote :

This bug is also present in earlier releases. I know it from Maverick and Natty.

Revision history for this message
Erick Brunzell (lbsolost) wrote :

This also effects bug 775124 which was more appropriately named in dupe bug 819538 and it's even loosely related to bug 766265.

Ubiquity always wants to create a new swap partition which is problematic in many scenarios. It certainly causes problems with small disc installs.

I need to do more testing but I'll certainly try to follow up on this in Oneiric Beta 1 iso-testing.

Revision history for this message
Colin Watson (cjwatson) wrote :

Erick, thanks, but there's no need to follow up on this in iso-testing - it's a long-standing known problem (ever since d-i was created) and doesn't require any further testing or clarification. We aren't going to fix it by accident, and when we do fix it then we'll close this bug.

I added a $reusemethod specifier to partman-auto a while back, which will probably form the basis for fixing this.

Revision history for this message
Erick Brunzell (lbsolost) wrote :
Changed in partman-auto (Ubuntu Precise):
status: New → Triaged
importance: Undecided → Medium
Damian Manig (ossimania)
Changed in partman-auto (Ubuntu Oneiric):
assignee: nobody → Damian Manig (ossimania)
assignee: Damian Manig (ossimania) → nobody
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in partman-auto-crypto (Ubuntu Oneiric):
status: New → Confirmed
Changed in partman-auto-crypto (Ubuntu):
status: New → 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.