encrypted install fails because unsafe swap (zram) is detected

Bug #1205397 reported by Jonas Zoner on 2013-07-26
58
This bug affects 13 people
Affects Status Importance Assigned to Milestone
ubiquity (Ubuntu)
Medium
Unassigned

Bug Description

Steps to reproduce:
1) start installation
2) choose encrypted
3) click install now
4) installation aborts, since an unsafe swap is detected (image in attachment)

Expected behaviour:
installation starts after clicking install now

ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: ubiquity (not installed)
ProcVersionSignature: Ubuntu 3.10.0-5.15-generic 3.10.2
Uname: Linux 3.10.0-5-generic i686
ApportVersion: 2.11-0ubuntu1
Architecture: i386
Date: Fri Jul 26 17:46:16 2013
InstallCmdLine: file=/cdrom/preseed/lubuntu.seed boot=casper initrd=/casper/initrd.lz quiet splash --
InstallationDate: Installed on 2013-07-26 (0 days ago)
InstallationMedia: Lubuntu 13.10 "Saucy Salamander" - Alpha i386 (20130723.1)
MarkForUpload: True
SourcePackage: ubiquity
UpgradeStatus: No upgrade log present (probably fresh install)

Jonas Zoner (jonaszoner) wrote :
Jonas Zoner (jonaszoner) wrote :

My humble guess is that the zram swap is mistakenly recognised as a swap on harddisk

Jonas Zoner (jonaszoner) wrote :

Workaround:
1) boot via "Try Lubuntu" not "Install Lubuntu"
2) open terminal
3) enter "swapoff --all" press enter
4) start installation

This workaround works only if the unsafe swap error has not been raised since the last reboot.
If that has been the case even with swapoff --all the installer will fail, to circumvent reboot.

Jonas Zoner (jonaszoner) on 2013-07-26
summary: - encrypted install fails because usafe swap detected
+ encrypted install fails because unsafe swap is detected

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

Changed in ubiquity (Ubuntu):
status: New → Confirmed
Paddy Launch (paddylaunch) wrote :

I'm getting the same with Lubuntu 14.04 installing onto a fresh unformatted virtual disk in virtualbox.

Sam Spade (qy-launchpad) wrote :

Same error. It only occurs when I attempt to encrypt my home directory. Unencrypted, the installation goes without an error.

I notice that I have a one MB reserved space at either end of my disk memory. Nothing I do will get rid of these partitions. I assume they are the problem. Gpart doesn't remove them but gives me an error instead. If I insist on trying again, it locks the computer up and I have to do a hard reboot.

My disk was originally an uninstalled new purchase Windows 7. I refuse to use that product for security reasons and am attempting to replace it with Lubuntu 14.04. Looks like Microsoft is reaching out from the grave to make sure their security problems stay with me evey when I don't use their software.

The computer is a refurbished (by Acer) Acer Notebook NX.V7EAA.009;TMP653-M-9889. It does have hardware TMP.

Sam Spade (qy-launchpad) wrote :

I also tried to execute swapoff --all but that didn't work either.

Hi everyone,

I ran into this problem as well, but my fix was:

Boot into Live session

Terminal, enter: "sudo swapoff --all"

Proceed with installation

Remember, it must be run as sudo(super user) to disable swapoff.

Hope this works!

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/1205397

tags: added: iso-testing
Brian Murray (brian-murray) wrote :

I noticed this in syslog:

Jul 26 13:45:39 lubuntu kernel: [ 15.163548] Adding 513168k swap on /dev/zram0. Priority:5 extents:1 across:513168k SSFS

tags: added: trusty
tags: added: utopic
tags: added: lubuntu
summary: - encrypted install fails because unsafe swap is detected
+ encrypted install fails because unsafe swap (zram) is detected
Changed in ubiquity (Ubuntu):
importance: Undecided → Medium
Anonymous (hurr1214) wrote :

(No idea if posting to the right place, hopefully someone, somewhere out there gets some use out of this. It's far too rare for me to go back and actually post solutions to problems I had and fixed..)

I had the same problem, there's definitely something wrong with the installer (I was trying to set up 14.04 with encrypted partitions on different drives, with / on my small SSD and /home /usr /tmp /var and swap on my HDD). But I played around with it, restarted the installer/rebooted a number of times, and here's how you work around it:

It's the ordering. It can't cope with setting swap as an encrypted partition and then creating another partition after that. So, set up all your actual partitions, including your encrypted containers first. I believe it necessary to include an encrypted partition for swap, so make sure to make one of suitable size for it. Don't know if relevant, but I happened to pick all logical partitions and that worked.

Once you have them all set up, THEN, and only then pin them to actual mount points (setting this straight away will result in a crash). I started with swap and then moved on to /home and so on.

Now you have your encrypted partitions, and you don't have to forgo swap with swapoff!

Mike Chelen (mchelen) wrote :

Same bug still exists in 14.10, the workaround from #8 is what I used to complete install.

Joe (joec4204) wrote :

Yes, I ran into this problem again when attempting a install of 14.10 using my (encrypted) 14.04 partitions. Very frustrating since it takes 5+ minutes per iteration after you quit and try something different. The problem seems worse -- I tried at least 5 or 6 different variations before finally being able to complete the install. Even though I would run "sudo swapoff --all" (from the terminal, from a virtual console), I'd still get the error. I tried deleting my existing partitions and creating new partitions.

The problem seems worse (or perhaps it's an additional problem) -- there were several times that I was trying the approach from comment #11 and not setting mount points until the end, but then the problem was that after I created one physical volume for encryption, the installer would hang when I created the second. (One partition for swap, one for /, in addition to the unencrypted /boot partition).

In the end, the solution I came up with was to create a partition for swap but not to use it at all. (I.e., an install with no swap). Now that the install completed, I'll go back and set up that partition to be swap after the fact. This will probably be better anyway -- I'll be able to set it up so that it uses a random key for swap encryption so I only need to type one passphrase to boot. (Which is fine since I never do a hibernate anyway.)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers