Ubuntu17.04-Failed to activate (encrypted) Swap Partition
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
systemd (Ubuntu) |
Fix Released
|
High
|
Dimitri John Ledkov | ||
Zesty |
Fix Released
|
High
|
Dimitri John Ledkov |
Bug Description
---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-
[DEPEND] Dependency failed for Encrypted Volumes.
Starting Raise network interfaces...
---Logs---
root@tuleta4u-
? systemd-
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)
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/
Jan 02 01:58:14 tuleta4u-lp7 systemd[1]: systemd-
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-
Jan 02 01:58:14 tuleta4u-lp7 systemd[1]: systemd-
root@tuleta4u-
Job for systemd-
See "systemctl status systemd-
root@tuleta4u-
-- The start-up result is done.
Jan 02 03:17:01 tuleta4u-lp7 CRON[3955]: pam_unix(
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(
Jan 02 03:37:57 tuleta4u-lp7 systemd[1]: Starting Cryptography Setup for sda2_cr
-- Subject: Unit systemd-
-- Defined-By: systemd
-- Support: http://
--
-- Unit systemd-
Jan 02 03:37:57 tuleta4u-lp7 systemd-
Jan 02 03:37:57 tuleta4u-lp7 mkswap[3962]: mkswap: error: /dev/mapper/
Jan 02 03:37:57 tuleta4u-lp7 systemd[1]: systemd-
Jan 02 03:37:57 tuleta4u-lp7 systemd[1]: Failed to start Cryptography Setup for
-- Subject: Unit systemd-
-- Defined-By: systemd
-- Support: http://
--
-- Unit systemd-
--
-- The result is failed.
Jan 02 03:37:57 tuleta4u-lp7 systemd[1]: systemd-
Jan 02 03:37:57 tuleta4u-lp7 systemd[1]: systemd-
root@tuleta4u-
# /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-
root@tuleta4u-
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:/
== 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/
-- Subject: Unit dev-mapper-
-- Unit dev-mapper-
Feb 27 18:03:02 ubuntu systemd[1]: Starting Cryptography Setup for sda3_crypt...
-- Subject: Unit systemd-
-- Unit systemd-
Feb 27 18:03:02 ubuntu systemd-
Feb 27 18:03:02 ubuntu mkswap[2430]: mkswap: /dev/mapper/
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-
Feb 27 18:03:02 ubuntu systemd[1]: Started Cryptography Setup for sda3_crypt.
-- Subject: Unit systemd-
-- Unit systemd-
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/
-- Subject: Unit dev-mapper-
-- Unit dev-mapper-
Feb 27 18:03:02 ubuntu kernel: Adding 7252928k swap on /dev/mapper/
Feb 27 18:03:02 ubuntu systemd[1]: Activated swap /dev/mapper/
-- Subject: Unit dev-mapper-
-- Unit dev-mapper-
-- Subject: Unit swap.target has finished start-up
-- Unit swap.target has finished starting up.
Changed in debian-installer (Ubuntu): | |
assignee: | Taco Screen team (taco-screen-team) → Dimitri John Ledkov (xnox) |
affects: | debian-installer (Ubuntu) → systemd (Ubuntu) |
Changed in systemd (Ubuntu): | |
importance: | Undecided → High |
milestone: | none → ubuntu-17.03 |
status: | New → Confirmed |
Changed in systemd (Ubuntu Zesty): | |
status: | Confirmed → In Progress |
Changed in systemd (Ubuntu Zesty): | |
status: | In Progress → Fix Committed |
Changed in systemd (Ubuntu Zesty): | |
status: | Fix Committed → Fix Released |
Default Comment by Bridge