swap partition disappeared during installation

Bug #709363 reported by Brian Murray
76
This bug affects 13 people
Affects Status Importance Assigned to Milestone
partman-basicfilesystems (Ubuntu)
Fix Released
High
Colin Watson
Natty
Won't Fix
High
Evan
Oneiric
Won't Fix
High
Ubuntu Installer Team
Precise
Fix Released
High
Colin Watson

Bug Description

Binary package hint: ubiquity

I noticed that I had no swap mounted, looked in /etc/fstab and see a swap partition but it isn't usable because the partition has no UUID. Reading /var/log/installer/syslog the partition was used at one point in time but then stopped being used.

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: ubiquity (not installed)
ProcVersionSignature: Ubuntu 2.6.37-12.26-generic 2.6.37
Uname: Linux 2.6.37-12-generic x86_64
Architecture: amd64
Date: Fri Jan 28 08:58:46 2011
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release amd64 (20101007)
ProcEnviron:
 LANGUAGE=en_US.UTF-8:en
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 LC_MESSAGES=en_AG.utf8
 SHELL=/bin/bash
SourcePackage: ubiquity

Revision history for this message
Brian Murray (brian-murray) wrote :
Revision history for this message
Brian Murray (brian-murray) wrote :

From UbiquitySyslog:

Nov 17 23:12:14 ubuntu kernel: [ 1055.588158] Adding 1999868k swap on /dev/sda5. Priority:-1 extents:1 across: 1999868k
...
Nov 17 23:23:46 ubuntu kernel: [ 1746.838378] padlock: VIA PadLock not detected.
Nov 17 23:23:46 ubuntu user-setup: WARNING: [/dev/sda5] does not appear to be swap space, skipping.
Nov 17 23:23:46 ubuntu user-setup: WARNING: There were no usable swap devices to be encrypted. Exiting.

tags: added: maverick
removed: natty
Revision history for this message
Brian Murray (brian-murray) wrote :

I searched for the following string in UbiquitySyslog.gz attachments for ubiquity bugs and found these bugs:

"There were no usable swap devices"

LP: #664639 - Xubuntu installer keyboard selection error
        Oct 14 20:01:10 ubuntu user-setup: WARNING: There were no usable swap devices to be encrypted. Exiting.
LP: #653062 - [Maverick] battery level should be shown during installation
        Oct 1 01:59:22 ubuntu user-setup: WARNING: There were no usable swap devices to be encrypted. Exiting.
LP: #653057 - [Maverick] can't connect to wi-fi during installation because keyboard isn't set up yep
        Oct 1 01:59:22 ubuntu user-setup: WARNING: There were no usable swap devices to be encrypted. Exiting.
LP: #650883 - Ubiquity tries to install on the install media by default
        Sep 29 07:22:30 ubuntu user-setup: WARNING: There were no usable swap devices to be encrypted. Exiting.
LP: #634664 - Updates not downloaded during install when selected and internet is available
        Sep 10 03:09:05 ubuntu user-setup: WARNING: There were no usable swap devices to be encrypted. Exiting.
LP: #618716 - [iso testing] Kubuntu daily-build 16.08, can't shutdown live-session
        Aug 16 16:37:39 ubuntu user-setup: WARNING: There were no usable swap devices to be encrypted. Exiting.

Revision history for this message
Brian Murray (brian-murray) wrote :

I also wonder if 42159 is similar.

Revision history for this message
Evan (ev) wrote :

Hi Brian,

Can you please run `sudo BLKID_DEBUG=0xFFFF blkid -p /dev/sda5` and attach the output.

Changed in ubiquity (Ubuntu):
assignee: nobody → Evan Dandrea (ev)
importance: Undecided → High
status: New → Incomplete
Revision history for this message
Brian Murray (brian-murray) wrote :

Here is the requested output.

Changed in ubiquity (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Evan (ev) wrote :

So that's clearly ended up as not swap. I'm entirely unsure how this has happened though, even after reading through your logs.

Are you by any chance able to reproduce this? If so, can you add a 'set -x' to the top of /lib/partman/lib/base.sh before you get to the partitioning page, and run the installer in debug mode ("Try Ubuntu", then 'ubiquity -d'). Please attach the new logs once you have done this.

Thanks!

Colin Watson (cjwatson)
Changed in ubiquity (Ubuntu Natty):
status: Confirmed → Incomplete
Revision history for this message
Evan (ev) wrote :

I'm moving this to O. I was never able to produce it, and without more verbose logs I can only guess at what might be causing it.

Changed in ubiquity (Ubuntu Natty):
status: Incomplete → Won't Fix
Changed in ubiquity (Ubuntu):
milestone: none → ubuntu-11.10
Changed in ubiquity (Ubuntu Oneiric):
importance: Undecided → High
status: New → Incomplete
Revision history for this message
beam (beam-de) wrote :

same problem here, if there is further debug/output needed i could possibly help.

tags: added: ubiquity-2.4.8
Revision history for this message
Jarno Suni (jarnos) wrote :

I think this happened in Oneiric installation. However, it looks like Oneiric can uses swap anyway; command free shows it. I chose encrypted /home in installation and I guess that is why I have "/dev/mapper/cryptswap1 none swap sw 0 0" in /etc/fstab i.e. swap is encrypted, too. Still I have used the swap partition other installations, and for them swap is gone and the partition is unrecognized. I wonder, if it is safe to format the partition as linux-swap.

Revision history for this message
Jarno Suni (jarnos) wrote :

I installed Natty on separate PC. by alternate installation media: partitioned manually a swap partition, chose encrypted home folder and thus got "/dev/mapper/cryptswap1 none swap sw 0 0" in /etc/fstab. There seems to be no UUID for the partition. Command free shows zeros for swap. See also bug 818648.

tags: added: rls-mgr-o-tracking
Revision history for this message
Kate Stewart (kate.stewart) wrote :

Moving it to confirmed, so it won't expire. Several folks since have indicated willingness to help with debug.

Changed in ubiquity (Ubuntu Oneiric):
status: Incomplete → Confirmed
assignee: nobody → Canonical Foundations Team (canonical-foundations)
Revision history for this message
Steve Langasek (vorlon) wrote :

Evan has previously outlined in comment #7 the steps needed to further debug this. If there are volunteers willing to help debug who are able to reproduce this, they should follow those instructions and attach the resulting logs. Until then this bug is apparently unreproducible with insufficient information to troubleshoot it, so "incomplete" is accurate.

Changed in ubiquity (Ubuntu Oneiric):
status: Confirmed → Incomplete
Colin Watson (cjwatson)
Changed in ubiquity (Ubuntu Oneiric):
assignee: Canonical Foundations Team (canonical-foundations) → Ubuntu Installer Team (ubuntu-installer)
Revision history for this message
alfabravoteam (alfabravoteam) wrote :

In my case, the swap partition appears as not active (in gparted). Yet if it gets set to swapon, it never gets used during activity (even if physical memory gets pretty used up).

The /etc/fstab file shows no UUID for this partition but

  /dev/mapper/cryptswap1 none swap sw 0 0

Also I checked the option "encrypt home folder" during instalation (i did a clean 11.04 installation last night and then did update-manager -d to 11.10). Maybe it's related to that.

Finally, if some extra info is needed to diagnose the problem, please ask and I'll try to help out.

Revision history for this message
alfabravoteam (alfabravoteam) wrote :

Some extra info over here.

I tried the whole process again and I found that, even if I choose not to encrypt home, if I do advanced partitioning, the swap doesn't get active. It's all about the /etc/fstab file, it contains incorrect info because it has no UUID for swap partition. Also, it replicates on Natty installer from scratch.

What I did in order to activate swap was:
* reconfigure the "/etc/fstab" file so it recognizes the location of the swap partition:

 # /dev/sdaX
 UUID=f33563e3-48bc-4ec9-9b8c-a4783ed4109a none swap sw 0 0

Using the existing own /dev or UUID, which I can get with:

 $ blkid

and checking also with:

 $ sudo fdisk -l

Then just issue the command:

 $ swapon -a

And the swap partition shows up in tpo, system monitor and so on. Well... it haven't got used so far but I'll test with some youtube videos and stuff, trying to get it used.

Hope this helps

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

@alfabravoteam: Could you please provide the specific information Evan asked for in comment #7?

Revision history for this message
Steve Langasek (vorlon) wrote :

necessarry debugging information not available to let us fix this for oneiric. if someone provides the information requested in comment #7, we will revisit for 12.04.

Changed in ubiquity (Ubuntu Oneiric):
status: Incomplete → Won't Fix
tags: added: rls-mgr-p-tracking
removed: rls-mgr-o-tracking
Revision history for this message
blackmoth (havokh) wrote :

as requested on #7

debug log during installation

Revision history for this message
blackmoth (havokh) wrote :

as requested on #7

debug log during installation

Revision history for this message
blackmoth (havokh) wrote :

as requested on #7

debug log during installation

Revision history for this message
Charlie Kravetz (cjkgeek) wrote :

We now have a debug log for this issue, as requested in comment #7. Unfortunately, the reporter had difficulty with the internet connection and we the same log three times, as comments #18, #19, and #20. However, perhaps with this debug.log, this issue can be resolved.

Changed in ubiquity (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
blackmoth (havokh) wrote :

syslog after installation

Steve Langasek (vorlon)
Changed in ubiquity (Ubuntu Precise):
status: Incomplete → Confirmed
assignee: nobody → Ubuntu Installer Team (ubuntu-installer)
Steve Langasek (vorlon)
tags: added: rls-p-tracking
Steve Langasek (vorlon)
Changed in ubiquity (Ubuntu Precise):
milestone: none → ubuntu-12.04
Colin Watson (cjwatson)
Changed in ubiquity (Ubuntu Precise):
assignee: Ubuntu Installer Team (ubuntu-installer) → Colin Watson (cjwatson)
Revision history for this message
Colin Watson (cjwatson) wrote :

I'm still trawling through logs. However, it is not entirely clear to me that the situation with encrypted swap (as in comment #18 et al) is the same as the original report, which did not end up with encrypted swap.

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

Specifically, the encrypted swap situation is complicated by ecryptfs-setup-swap apparently scanning for UUID=$uuid entries in /etc/fstab, but not reproducing them in /etc/crypttab.

All the other problems, including Brian's original bug, come down to blkid not recognising a swap partition which the kernel apparently has recognised. I suspect that some part of the swap partition has not been properly initialised. I'm wondering if (a) this might be amd64-specific and (b) whether it might have something to do with using libparted to initialise the swap partition. Since we ought to be moving away from the latter anyway and just using mkswap, it's possible that that might be an easy fix. At this point, that remains a guess, and I'll need to try to reproduce this to make that guess any firmer.

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

Like Evan, I've failed to reproduce this, even with amd64, and even with dding /dev/urandom over the start of the region where the swap partition is going to live first. But maybe I was just unlucky.

My best guess is still that libparted's swap initialisation code might be at fault. I'm going to try dropping that in favour of mkswap. If it recurs, please reopen this bug.

Colin Watson (cjwatson)
affects: ubiquity (Ubuntu Precise) → partman-basicfilesystems (Ubuntu Precise)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package partman-basicfilesystems - 71ubuntu2

---------------
partman-basicfilesystems (71ubuntu2) precise; urgency=low

  * Stop using libparted to format swap partitions. parted 3.0 doesn't
    support this anyway, and I'm guessing that this may be the cause of
    blkid sometimes not recognising the swap partition during installation
    (LP: #709363).
 -- Colin Watson <email address hidden> Thu, 15 Dec 2011 18:00:08 +0000

Changed in partman-basicfilesystems (Ubuntu Precise):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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