Ubiquity problem with encrypted home option: system hangs because of ecryptfs-setup-swap not working with swapfiles
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
eCryptfs |
Triaged
|
High
|
Tyler Hicks | ||
ecryptfs-utils (Ubuntu) |
Fix Released
|
Critical
|
Mathieu Trudel-Lapierre | ||
Zesty |
Confirmed
|
Undecided
|
Unassigned | ||
Artful |
Fix Released
|
Critical
|
Mathieu Trudel-Lapierre | ||
ubiquity (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Description: Ubuntu Zesty Zapus (development branch)
Release: 17.04
ecryptfs-utils:
Installato: 111-0ubuntu4
Candidato: 111-0ubuntu4
Tabella versione:
*** 111-0ubuntu4 500
500 http://
100 /var/lib/
Ubuntu 17.04 uses swapfiles by default.
If you select the "encrypt home folder" option when creating the main user during Ubuntu 17.04 beta1 installation (which makes Ubiquity run also the ecryptfs-setup-swap command), after installation the system hangs a lot during boot, because it fails to activate swap (output of "systemctl status swapfile.swap" says "failed to activate swap /swapfile").
If you install Ubuntu 17.04 beta1 without selecting "encrypt home folder", and only after installation you run the ecryptfs-
In particular, you get the following error when running ecryptfs-
INFO: Setting up swap: [/swapfile]
device node not found
WARNING: Commented out your unencrypted swap from /etc/fstab
swapon: cannot open /dev/mapper/
This is due to an ecryptfs-utils bug.
In particular, ecryptfs-setup-swap puts in /etc/crypttab a line like this:
cryptswap1 UID=XXXXXXXX /dev/urandom swap,offset=
(like there were a swap partition with UID=XXXXXXXX) while with a swapfile it should put the following line:
cryptswap1 /swapfile /dev/urandom swap,offset=
If you manually change that line and reboot, you get rid of the problem - before rebooting, check also that your /etc/fstab file ends with:
#/swapfile none swap sw 0 0
/dev/mapper/
This bug indirectly affects also Ubiquity, because when you choose the "encrypt home folder" option during installation, ubiquity runs also ecryptfs-
I tried both with Ubuntu Budgie and with Ubuntu Gnome, the problem is the same.
ProblemType: Bug
DistroRelease: Ubuntu 17.04
Package: ecryptfs-utils 111-0ubuntu4
ProcVersionSign
Uname: Linux 4.10.0-9-generic x86_64
ApportVersion: 2.20.4-0ubuntu2
Architecture: amd64
CurrentDesktop: GNOME
Date: Mon Mar 6 12:47:39 2017
EcryptfsInUse: Yes
InstallationDate: Installed on 2017-03-05 (0 days ago)
InstallationMedia: Ubuntu-GNOME 17.04 "Zesty Zapus" - Alpha amd64 (20170219)
ProcEnviron:
TERM=xterm-
PATH=(custom, no user)
XDG_RUNTIME_
LANG=it_IT.UTF-8
SHELL=/bin/bash
SourcePackage: ecryptfs-utils
UpgradeStatus: No upgrade log present (probably fresh install)
Related branches
- eCryptfs: Pending requested
-
Diff: 60 lines (+15/-6)2 files modifieddebian/changelog (+6/-2)
src/utils/ecryptfs-setup-swap (+9/-4)
description: | updated |
Changed in ubiquity (Ubuntu Zesty): | |
status: | New → Triaged |
importance: | Undecided → High |
milestone: | none → ubuntu-17.03 |
Changed in ecryptfs-utils (Ubuntu Zesty): | |
assignee: | nobody → rahmadani (rahmadani) |
Changed in ecryptfs-utils (Ubuntu Zesty): | |
assignee: | rahmadani (rahmadani) → nobody |
tags: | added: rls-aa-incoming |
Changed in ubiquity (Ubuntu): | |
milestone: | ubuntu-17.03 → ubuntu-17.10 |
importance: | High → Critical |
affects: | ecryptfs-utils (Ubuntu) → cryptsetup (Ubuntu) |
Changed in ubiquity (Ubuntu Zesty): | |
milestone: | ubuntu-17.03 → zesty-updates |
Changed in ubiquity (Ubuntu Zesty): | |
assignee: | Dimitri John Ledkov (xnox) → nobody |
Changed in ubiquity (Ubuntu): | |
assignee: | Dimitri John Ledkov (xnox) → nobody |
assignee: | nobody → Iain Lane (laney) |
Changed in ubiquity (Ubuntu): | |
assignee: | Iain Lane (laney) → Mathieu Trudel-Lapierre (cyphermox) |
Changed in ecryptfs-utils (Ubuntu): | |
status: | New → In Progress |
assignee: | nobody → Mathieu Trudel-Lapierre (cyphermox) |
importance: | Undecided → Critical |
Changed in ubiquity (Ubuntu Artful): | |
status: | Triaged → Fix Released |
no longer affects: | ubiquity (Ubuntu) |
no longer affects: | cryptsetup (Ubuntu) |
Changed in ubiquity (Ubuntu Zesty): | |
status: | Triaged → Invalid |
Changed in ubiquity (Ubuntu Artful): | |
status: | Fix Released → Invalid |
no longer affects: | ubiquity (Ubuntu Zesty) |
no longer affects: | ubiquity (Ubuntu Artful) |
no longer affects: | cryptsetup (Ubuntu Artful) |
no longer affects: | cryptsetup (Ubuntu Zesty) |
I patched ecryptfs-setup-swap and now it works. d/cryptdisks restart" does nothing (see http:// bazaar. launchpad. net/~ubuntu- branches/ ubuntu/ vivid/cryptsetu p/vivid/ view/head: /debian/ cryptdisks. init ), the right command is "systemctl restart cryptsetup.target"
The first modification is to avoid to run udevadm on a file (you get a "device node not found" error, harmless but annoying)
The second modification is to put filename instead of UUID in /etc/crypttab if you have a swap file and not a swap partition.
The third modification is to actually restart cryptdisk, since "/etc/init.