Public bug reported:

Description:    Ubuntu Zesty Zapus (development branch)
Release:        17.04
ecryptfs-utils:
  Installato: 111-0ubuntu4
  Candidato:  111-0ubuntu4
  Tabella versione:
 *** 111-0ubuntu4 500
        500 http://it.archive.ubuntu.com/ubuntu zesty/main amd64 Packages
        100 /var/lib/dpkg/status

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-migrate-home
utility, everything works. But as soon as you try to manually setup
encrypyted swap (by running ecryptfs-setup-swap), you get the same
problem as above.

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=1024,cipher=aes-xts-
plain64

(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=1024,cipher=aes-xts-
plain64

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/cryptswap1 none swap sw 0 0

This bug indirectly affects also Ubiquity, since choosing the "encrypt
home folder" makes system hang a lot at boot (and when it finally starts
it has no swap).

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
ProcVersionSignature: Ubuntu 4.10.0-9.11-generic 4.10.0
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-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=it_IT.UTF-8
 SHELL=/bin/bash
SourcePackage: ecryptfs-utils
UpgradeStatus: No upgrade log present (probably fresh install)

** Affects: ecryptfs-utils (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: ubiquity (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug ecryptfs ecryptfs-utils ubiquity zesty

** Also affects: ubiquity (Ubuntu)
   Importance: Undecided
       Status: New

** Description changed:

  Description:  Ubuntu Zesty Zapus (development branch)
  Release:      17.04
  ecryptfs-utils:
-   Installato: 111-0ubuntu4
-   Candidato:  111-0ubuntu4
-   Tabella versione:
-  *** 111-0ubuntu4 500
-         500 http://it.archive.ubuntu.com/ubuntu zesty/main amd64 Packages
-         100 /var/lib/dpkg/status
- 
+   Installato: 111-0ubuntu4
+   Candidato:  111-0ubuntu4
+   Tabella versione:
+  *** 111-0ubuntu4 500
+         500 http://it.archive.ubuntu.com/ubuntu zesty/main amd64 Packages
+         100 /var/lib/dpkg/status
  
  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-migrate-home
  utility, everything works. But as soon as you try to manually setup
  encrypyted swap (by running ecryptfs-setup-swap), you get the same
  problem as above.
  
  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=1024,cipher=aes-xts-
  plain64
  
  (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=1024,cipher=aes-xts-
  plain64
  
  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/cryptswap1 none swap sw 0 0
  
- This bugs indirectly affects also Ubiquity, since choosing the "encrypt
+ This bug indirectly affects also Ubiquity, since choosing the "encrypt
  home folder" makes system hang a lot at boot (and when it finally starts
  it has no swap).
+ 
+ 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
  ProcVersionSignature: Ubuntu 4.10.0-9.11-generic 4.10.0
  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-256color
-  PATH=(custom, no user)
-  XDG_RUNTIME_DIR=<set>
-  LANG=it_IT.UTF-8
-  SHELL=/bin/bash
+  TERM=xterm-256color
+  PATH=(custom, no user)
+  XDG_RUNTIME_DIR=<set>
+  LANG=it_IT.UTF-8
+  SHELL=/bin/bash
  SourcePackage: ecryptfs-utils
  UpgradeStatus: No upgrade log present (probably fresh install)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1670336

Title:
  Ubiquity problem with encrypted home option: system hangs because of
  ecryptfs-setup-swap not working with swapfiles

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ecryptfs-utils/+bug/1670336/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to