If an existing swap partition is marked to be formatted, it gets "corrupted" and unused in the final installed system, because the LiveCD is using it

Bug #42159 reported by Eduardo Silva on 2006-04-30
18
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubiquity (Ubuntu)
Medium
Unassigned

Bug Description

Just installed Dapper using the LiveCD beta2. I already had a swap partition in my system, and the LiveCD automatically used it.
Because of this, when I chose to format this swap partition during installation, this fails, but the instalation continues.

In the final installed system, the swap partition was "mangled" and couldn't be used.

To fix this, I manually delete and recreate the swap partition.

I've attached my /var/log/installer/syslog file.

Eduardo Silva (jobezone) wrote :

Forgot to mention that my swap partition was /dev/hda5 .

description: updated

This, of course, breaks hibernation too. There are complaints about busy swap partition in the espresso log. In the installed system, swapon -a fails with:
 swapon: /dev/sda6: Invalid argument

Changed in ubiquity:
status: Unconfirmed → Confirmed
Tormod Volden (tormodvolden) wrote :

"sudo mkswap /dev/sda6" fixed the partition without any problems.

Tormod Volden (tormodvolden) wrote :

However, each time I try to hibernate, the resume fails with:
Unable to find swap-space signature

After mkswap and swapon -a and a normal reboot, the swap is fine and in use. But then it gets funny again if I try hibernation.

I am not sure if this is a result of the installation problem, or if it is a completely different problem.

Eduardo Silva (jobezone) wrote :

I also have this hibernation problem. Now I'm thinking if I tried hibernation before noticing that swap wasn't working, or not. Which means I also don't know if it's caused by the installation (and having swap mounted) or not.

Tormod Volden (tormodvolden) wrote :

The hibernation "corrupting" the swap partition is bug #42299.

Eduardo Silva (jobezone) wrote :

Am I the only one having this problem? If so, can I close the bug, as I can't really reinstall the system and confirm that this bug is real (or instead it's bug #42299)?

Alexandre Otto Strube (surak) wrote :

The installation can be borked entirely, if you, for instance, choose to erase a whole disk and there's not enough memory to turn swap off.

I don't know, however, what the solution for this would be - at least in the case of the insufficient memory.

I just installed Gutsy on a former swap partition.
The installer crashed with a warning, that grub did not work. I could not boot the computer from HDD.
Then I installed Gutsy again. Now I used the ext3 partition generated from the installer the first time. Everything works fine.

summary: - If an existing swap partition is marked for formatation, it gets
+ If an existing swap partition is marked to be formatted, it gets
"corrupted" and unused in the final installed system, because the LiveCD
is using it

I just got a report from somebody on askubuntu.com that may be related to this bug.

The problem:
If you check the "Encrypt home folder" box while installing, for some reason Ubiquity uses the first swap it finds as encrypted swap (and therefore has to "format" it). In his case, he was installing to a USB flash drive and it found the swap on his main installation and corrupted it. Every time he would boot his flash drive it would corrupt his main installation's swap.

The solution:
Because an entry was placed in /etc/crypttab, the swap got re-"formatted" (secure wiped) for use with eCryptfs's encrypted swap. Removing the entry solved the problem and he was able to boot his USB without corrupting his swap space.

In his case, he specifically told it not to use swap since he'd be booting from a USB

Phillip Susi (psusi) wrote :

The installer unmounts the swap partition before manipulating the disk, so this works just fine.

Changed in ubiquity (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers