You have been subscribed to a public bug: ---Problem Description--- Ubuntu17.04 installation with swap encryption ,Fails to activate Swap Partition.
---uname output--- Linux tuleta4u-lp7 4.9.0-11-generic #12-Ubuntu SMP Mon Dec 12 16:16:45 UTC 2016 ppc64le ppc64le ppc64le GNU/Linux ---boot type--- VDVD installtion ---Steps to reproduce-- 1.Install creating a prep boot, swap and root partition. 2.Encrypt swap partition. 3.Installation completes, and after reboot can see the failed messages for activating swap partition. --Error-- While booting, [ OK ] Started AppArmor initialization. [FAILED] Failed to activate swap Swap Partition. See 'systemctl status dev-sda2.swap' for details. [FAILED] Failed to start Cryptography Setup for sda2_crypt. See 'systemctl status systemd-cryptsetup@sda2_crypt.service' for details. [DEPEND] Dependency failed for Encrypted Volumes. Starting Raise network interfaces... ---Logs--- root@tuleta4u-lp7:~# systemctl status systemd-cryptsetup@sda2_crypt.service ? systemd-cryptsetup@sda2_crypt.service - Cryptography Setup for sda2_crypt Loaded: loaded (/etc/crypttab; generated; vendor preset: enabled) Active: failed (Result: exit-code) since Mon 2017-01-02 01:58:14 EST; 1min 57 Docs: man:crypttab(5) man:systemd-cryptsetup-generator(8) man:systemd-cryptsetup@.service(8) Main PID: 2023 (code=exited, status=0/SUCCESS) Jan 02 01:58:14 tuleta4u-lp7 systemd[1]: Starting Cryptography Setup for sda2_cr Jan 02 01:58:14 tuleta4u-lp7 mkswap[2057]: mkswap: error: /dev/mapper/sda2_crypt Jan 02 01:58:14 tuleta4u-lp7 systemd[1]: systemd-cryptsetup@sda2_crypt.service: Jan 02 01:58:14 tuleta4u-lp7 systemd[1]: Failed to start Cryptography Setup for Jan 02 01:58:14 tuleta4u-lp7 systemd[1]: systemd-cryptsetup@sda2_crypt.service: Jan 02 01:58:14 tuleta4u-lp7 systemd[1]: systemd-cryptsetup@sda2_crypt.service: root@tuleta4u-lp7:~# systemctl start systemd-cryptsetup@sda2_crypt.service Job for systemd-cryptsetup@sda2_crypt.service failed because the control process exited with error code. See "systemctl status systemd-cryptsetup@sda2_crypt.service" and "journalctl -xe" for details. root@tuleta4u-lp7:~# journalctl -xe -- The start-up result is done. Jan 02 03:17:01 tuleta4u-lp7 CRON[3955]: pam_unix(cron:session): session opened Jan 02 03:17:01 tuleta4u-lp7 CRON[3956]: (root) CMD ( cd / && run-parts --repo Jan 02 03:17:01 tuleta4u-lp7 CRON[3955]: pam_unix(cron:session): session closed Jan 02 03:37:57 tuleta4u-lp7 systemd[1]: Starting Cryptography Setup for sda2_cr -- Subject: Unit systemd-cryptsetup@sda2_crypt.service has begun start-up -- Defined-By: systemd -- Support: http://www.ubuntu.com/support -- -- Unit systemd-cryptsetup@sda2_crypt.service has begun starting up. Jan 02 03:37:57 tuleta4u-lp7 systemd-cryptsetup[3960]: Volume sda2_crypt already Jan 02 03:37:57 tuleta4u-lp7 mkswap[3962]: mkswap: error: /dev/mapper/sda2_crypt Jan 02 03:37:57 tuleta4u-lp7 systemd[1]: systemd-cryptsetup@sda2_crypt.service: Jan 02 03:37:57 tuleta4u-lp7 systemd[1]: Failed to start Cryptography Setup for -- Subject: Unit systemd-cryptsetup@sda2_crypt.service has failed -- Defined-By: systemd -- Support: http://www.ubuntu.com/support -- -- Unit systemd-cryptsetup@sda2_crypt.service has failed. -- -- The result is failed. Jan 02 03:37:57 tuleta4u-lp7 systemd[1]: systemd-cryptsetup@sda2_crypt.service: Jan 02 03:37:57 tuleta4u-lp7 systemd[1]: systemd-cryptsetup@sda2_crypt.service: root@tuleta4u-lp7:~# cat /etc/fstab # /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # # <file system> <mount point> <type> <options> <dump> <pass> # / was on /dev/sda3 during installation UUID=44e6ba68-4cbb-4978-8d90-6077796b3715 / xfs defaults 0 0 root@tuleta4u-lp7:~# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 235G 0 disk ??sda1 8:1 0 7M 0 part ??sda2 8:2 0 28G 0 part ? ??sda2_crypt 253:0 0 28G 0 crypt [SWAP] ??sda3 8:3 0 167.7G 0 part / ??sda4 8:4 0 28G 0 part sdb 8:16 0 235G 0 disk sr0 11:0 1 631.3M 0 rom sr1 11:1 1 631.3M 0 rom == Comment: #12 - Hi Canonical, This is the patch (debdiff) for Zesty. The same patch as submitted to systemd upstream on [1]. [1] https://github.com/systemd/systemd/pull/5480 == Comment: #14 - With this patch/test packages, the ordering between cryptsetup service (before) and swap target (after) is ensured. # journalctl -b -x | grep 'crypt\|swap' Feb 27 18:03:00 ubuntu kernel: zswap: loaded using pool lzo/zbud Feb 27 18:03:00 ubuntu kernel: Key type encrypted registered Feb 27 18:03:01 ubuntu kernel: crypto_register_alg 'aes' = 0 Feb 27 18:03:01 ubuntu kernel: crypto_register_alg 'cbc(aes)' = 0 Feb 27 18:03:01 ubuntu kernel: crypto_register_alg 'ctr(aes)' = 0 Feb 27 18:03:01 ubuntu kernel: crypto_register_alg 'xts(aes)' = 0 Feb 27 18:03:01 ubuntu systemd[1]: Found device /dev/mapper/sda3_crypt. -- Subject: Unit dev-mapper-sda3_crypt.device has finished start-up -- Unit dev-mapper-sda3_crypt.device has finished starting up. Feb 27 18:03:02 ubuntu systemd[1]: Starting Cryptography Setup for sda3_crypt... -- Subject: Unit systemd-cryptsetup@sda3_crypt.service has begun start-up -- Unit systemd-cryptsetup@sda3_crypt.service has begun starting up. Feb 27 18:03:02 ubuntu systemd-cryptsetup[2422]: Volume sda3_crypt already active. Feb 27 18:03:02 ubuntu mkswap[2430]: mkswap: /dev/mapper/sda3_crypt: warning: wiping old swap signature. Feb 27 18:03:02 ubuntu mkswap[2430]: Setting up swapspace version 1, size = 6.9 GiB (7426998272 bytes) Feb 27 18:03:02 ubuntu mkswap[2430]: no label, UUID=863f87ca-0228-4b5f-9d01-578d4afcf687 Feb 27 18:03:02 ubuntu systemd[1]: Started Cryptography Setup for sda3_crypt. -- Subject: Unit systemd-cryptsetup@sda3_crypt.service has finished start-up -- Unit systemd-cryptsetup@sda3_crypt.service has finished starting up. Feb 27 18:03:02 ubuntu systemd[1]: Reached target Encrypted Volumes. -- Subject: Unit cryptsetup.target has finished start-up -- Unit cryptsetup.target has finished starting up. Feb 27 18:03:02 ubuntu systemd[1]: Activating swap /dev/mapper/sda3_crypt... -- Subject: Unit dev-mapper-sda3_crypt.swap has begun start-up -- Unit dev-mapper-sda3_crypt.swap has begun starting up. Feb 27 18:03:02 ubuntu kernel: Adding 7252928k swap on /dev/mapper/sda3_crypt. Priority:-1 extents:1 across:7252928k FS Feb 27 18:03:02 ubuntu systemd[1]: Activated swap /dev/mapper/sda3_crypt. -- Subject: Unit dev-mapper-sda3_crypt.swap has finished start-up -- Unit dev-mapper-sda3_crypt.swap has finished starting up. -- Subject: Unit swap.target has finished start-up -- Unit swap.target has finished starting up. ** Affects: systemd (Ubuntu) Importance: High Assignee: Dimitri John Ledkov (xnox) Status: Confirmed ** Tags: architecture-ppc64le bugnameltc-150152 severity-high targetmilestone-inin1704 -- Ubuntu17.04-Failed to activate (encrypted) Swap Partition https://bugs.launchpad.net/bugs/1668535 You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to systemd in Ubuntu. -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp