swap not activated after choosing 'use whole disk' with encrypted home

Bug #986806 reported by Redmar on 2012-04-22
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
ubiquity (Ubuntu)
High
Unassigned

Bug Description

I already had 12.04 installed on this pc, so for partitioning I choose "remove and reinstall Ubuntu 12.04".
I choose to install with encrypted home, which means the swap also got encrypted. Installation went fine, but afterwards ubuntu did not recognise the swap partition.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: ubiquity (not installed)
ProcVersionSignature: Ubuntu 3.2.0-23.36-generic-pae 3.2.14
Uname: Linux 3.2.0-23-generic-pae i686
ApportVersion: 2.0.1-0ubuntu5
Architecture: i386
Date: Sun Apr 22 11:54:55 2012
EcryptfsInUse: Yes
InstallCmdLine: noprompt cdrom-detect/try-usb=true persistent file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.lz quiet splash -- apt-setup/restricted=false apt-setup/multiverse=false debian-installer/language=nl keyboard-configuration/layoutcode?=us keyboard-configuration/variantcode?=intl
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Beta i386 (20120421)
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 LANG=nl_NL.UTF-8
 SHELL=/bin/bash
SourcePackage: ubiquity
UpgradeStatus: No upgrade log present (probably fresh install)

Redmar (redmar) wrote :
Redmar (redmar) wrote :

test@test-Pavilion-ze8500-DX712E:~$ sudo sfdisk -l

Schijf /dev/sda: 4864 cilinders, 255 koppen, 63 sectoren/spoor
Waarschuwing: uitgebreide partitie begint niet op een cilindergrens.
DOS en Linux zullen de inhoud verschillend interpreteren.
Eenheid = cilinders van 8225280 bytes, blokken van 1024 bytes, tellend vanaf 0

   Apparaat Opst Begin Einde #cils #blokken ID Systeem
/dev/sda1 * 0+ 4806- 4807- 38610944 83 Linux
/dev/sda2 4807+ 4863- 57- 456705 5 uitgebreid
/dev/sda3 0 - 0 0 0 leeg
/dev/sda4 0 - 0 0 0 leeg
/dev/sda5 4807+ 4863- 57- 456704 82 Linux wisselgeheugen

Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/986806

tags: added: iso-testing
Changed in ubiquity (Ubuntu):
assignee: nobody → Stéphane Graber (stgraber)
Pete Graner (pgraner) on 2012-04-23
Changed in ubiquity (Ubuntu):
importance: Undecided → High
Stéphane Graber (stgraber) wrote :

So I just tried to reproduce this bug but couldn't.

I installed Ubuntu 12.04 desktop i386 in English and selected encrypted home, checked post-install that the swap was encrypted and active. Then I did another Ubuntu 12.04 desktop i386 in English with encrypted home on top of it and still had encrypted swap enabled post-install.

Were you indeed replacing an existing 12.04 install or was it an 11.10 install you replaced?

Also, can you reproduce this somewhat reliably or was it just a one-time thing? If you can reproduce it, can you attach /var/log/installer/syslog from the first and second install please?

Thanks

Stéphane Graber (stgraber) wrote :

Actually, I just found a clue that low-memory might be the cause as you're installing with < 512MB of RAM. Doing another test install here.

Stéphane Graber (stgraber) wrote :

Right, so installing with 480MB gives me a similar log as yours but I still get an encrypted swap. Now doing another install on top of it to see if that triggers it.

Stéphane Graber (stgraber) wrote :

Second install finished, still have an encrypted swap post-reboot, so it doesn't seem to be as easy to reproduce as it sounds.

Unless we can get a clear reproducer, we'll consider this a random issue and not a release critical bug requiring immediate investigation and fixing.

If someone can reproduce this, please attach /var/log/installer/syslog, /etc/fstab, /etc/crypttab, /var/log/syslog and a tarball of /var/log/upstart from both installs, that should help understand precisely what's going on here.

Changed in ubiquity (Ubuntu):
status: New → Incomplete
Redmar (redmar) wrote :

I can reproduce this issue, I've taken the following steps to obtain the requested log files.
1) Wipe the whole drive of the laptop
2) Wipe the bootable usb and put the image on it using usb-creator-gtk (don't allocated any room to store files)
3) Boot the laptop from the usb, and press any key during initial booting to go to the menu
4) Select language "Nederlands", press F6 and choose "Alleen vrije software" (free software only).
5) Choose "Try ubuntu without installing". Double click the install button once the desktop is loaded
6) Choose "Erase and use full disk" in the partitioning window
7) Select "Encrypt my home dir" when settin up the account
8) Reboot the system, swap is not activated. See the attached logfiles

pelm (pelle-ekh) wrote :

This affects me too. After installing a fresh installation of 12.04 (yesterday daily ISO) with encrypted home (which is causing the swap being encrypted too) this randomly happens. When i checked yesterday the swap was activated but today it wasn't. My RAM is 2GB and the swap is about 3,7 GB.

Stéphane Graber (stgraber) wrote :

Redmar: Does it magically fix itself after a few reboots for you?

The files you attached show that everything has been configured properly by ubiquity, though there may be some kind of race at boot time.

Can you also attach the output of "sudo parted -l" and /var/log/boot.log?

Stéphane Graber (stgraber) wrote :

Also, what happens if you run "sudo swapon /dev/mapper/cryptswap1"?

Redmar (redmar) wrote :

I have rebooted 8 times now, and every time there is no swap. /dev/mapper/ only containts 'control' after each boot.

test@test-Pavilion-ze8500-DX712E:~$ sudo parted -l
Model: ATA ST94011A (scsi)
Schijf /dev/sda: 40,0GB
Sectorgrootte (logisch/fysiek): 512B/512B
Partitietabel: msdos

Nummer Begin Einde Grootte Type Bestandssysteem Vlaggen
 1 1049kB 39,5GB 39,5GB primary ext4 opstart
 2 39,5GB 40,0GB 468MB extended
 5 39,5GB 40,0GB 468MB logical

################################################################
test@test-Pavilion-ze8500-DX712E:~$ cat /var/log/boot.log
'fsck' uit util-linux 2.20.1
/dev/sda1: schoon, 155134/2416640 bestanden, 764326/9652736 blokken
modem-manager[489]: <info> ModemManager (version 0.5.2.0) starting...

Onderhoudsshell oproepen (translation: calling maintenance shell)

pelm (pelle-ekh) wrote :

This is very annoying, knowing that it's tomorrow gold release comes out. I have rebooted or started the computer four times and for one of them the swap has being activated. The other not. I know that my version (21/4 daily ISO) is beta but it's nearly finished. How can i activate swap without disable cryptswap? Trying to enable swap with the command sudo swapon /dev/mapper/cryptswap1 can't be done because the file /dev/mapper/cryptswap1 doesn't exist if the swap hasn't been activated at first. Attach some logs. Hope it can be fixed. :)

pelm (pelle-ekh) wrote :
pelm (pelle-ekh) wrote :

I've booted the computer two more times and no swap. I haven't changed anything. I'm thinking of disable the encrypted swap if i can't find any solution. But that's not a good solution either. So what can i do?

Harry Skelton (skelton-harry) wrote :

My swap is not on either. /dev/mapper/cryptswap1 missing.
Tried to swapon /dev/sda5 (the swap partition) and it failed too.
Running out of memory on my 1GB Pentium 4 HT. Need this fixed please.

pelm (pelle-ekh) wrote :

I deactivated my encrypted swap. I was in need of the swap like you. This is very annoying.
http://www.logilab.org/blogentry/29155

pelm (pelle-ekh) wrote :

This is an annoying yet proceeding problem on my 12.04 system. Swap activated at random time. Reinstalled my system for other things some time ago, selected encrypted home when i installed, the swap gets activated most boots but today again it isn't active. It's very annoying. So now i'm going to deactivate the encrypted swap again. ):

Redmar (redmar) on 2012-07-24
summary: - swap not activated after choosing 'use whole disk'
+ swap not activated after choosing 'use whole disk' with encrypted home

As Stéphane, I couldn't reproduce this.

With 'use entire disk' and encrypted home, on boot I sometimes have the message:
"""
'cryptswap1' is not ready yet or not present
Continue to wait; or Press S to skip mounting or M for manual recovery
"""

If I wait a few seconds, boot continues and swap is activated. I verified upon login that /dev/mapper/cryptswap1 exists and 'free' shows the swap area.

Redmar (redmar) wrote :

Is there anything I can do to help fix this? Are there any other log files you need?

One more strange thing: during the install the pc sees the usb drive I use to install as /dev/sda, so I have to install the system and grub to /dev/sdb. Could this be related to the problem?

Redmar (redmar) wrote :

Here is the hardware profile of the system where this bug occurs: https://launchpad.net/+hwdb/+fingerprint/b845c366ea09c60efa3a45c1b5b21525

Akhila (akhilahegde) wrote :

I tried reproducing the bug with Quantal running on VirtualBox with disk space 10.7GB .
jibel's words echo exactly what I experienced.
While rebooting it said,

"The disk drive for /dev/mapper/cryptswap1 not ready yet or not present.
Continue to wait or Press S to skip mounting or M for manual recovery."

Within a minute system rebboted without any error.
On booting, like you suggested, I executed "free -m"
The result is:

swan@swan-VirtualBox:~$ free -m
             total used free shared buffers cached
Mem: 1003 620 382 0 24 338
-/+ buffers/cache: 257 745
Swap: 1021 0 1021

Though, "sudo sfdisk -l" produced an error:
swan@swan-VirtualBox:~$ sudo sfdisk -l
[sudo] password for swan:

Disk /dev/sda: 1305 cylinders, 255 heads, 63 sectors/track
Warning: extended partition does not start at a cylinder boundary.
DOS and Linux will interpret the contents differently.
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start End #cyls #blocks Id System
/dev/sda1 * 0+ 1174- 1175- 9436160 83 Linux
/dev/sda2 1175+ 1305- 131- 1046529 5 Extended
/dev/sda3 0 - 0 0 0 Empty
/dev/sda4 0 - 0 0 0 Empty
/dev/sda5 1175+ 1305- 131- 1046528 82 Linux swap / Solaris

Disk /dev/mapper/cryptswap1: 130 cylinders, 255 heads, 63 sectors/track

sfdisk: ERROR: sector 0 does not have an msdos signature
 /dev/mapper/cryptswap1: unrecognized partition table type
No partitions found

Honestly, I didn't understand that.

tres86dx (tres86dx-ubuntu) wrote :

the same with 14.04

Changed in ubiquity (Ubuntu):
assignee: Stéphane Graber (stgraber) → nobody
Launchpad Janitor (janitor) wrote :

[Expired for ubiquity (Ubuntu) because there has been no activity for 60 days.]

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

Other bug subscribers