cryptsetup.target的依赖项作业失败。有关详细信息,请参见'journalctl -xe'

我正在尝试在20.04安装后对交换文件进行加密(我成功进行了家庭目录加密)。我创建了一个交换文件,带有UUID,这是我的

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=3b76b7a1-8e02-439b-982f-39f8954c4e6e /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/sda1 during installation
UUID=FEFC-8940  /boot/efi       vfat    umask=0077      0       1
UUID=684f3c6e-907a-4a35-95b4-7b6cde21440b none swap sw 0 0

crypttab(开始之前):

# <target name> <source device>     <key file>  <options>

/ dev / mapper只是控制

blkid:

dev/sda3: UUID="3b76b7a1-8e02-439b-982f-39f8954c4e6e" TYPE="ext4" PARTUUID="6a8896ab-92bb-4bd7-a405-7650cca8d9e6"
/dev/loop0: TYPE="squashfs"
/dev/loop1: TYPE="squashfs"
/dev/loop2: TYPE="squashfs"
/dev/loop3: TYPE="squashfs"
/dev/loop4: TYPE="squashfs"
/dev/loop5: TYPE="squashfs"
/dev/loop6: TYPE="squashfs"
/dev/loop7: TYPE="squashfs"
/dev/sda1: UUID="FEFC-8940" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="305bb9b1-cde6-4fa5-9702-491a4dcd71f4"
/dev/loop8: TYPE="squashfs"
/dev/loop9: TYPE="squashfs"
/swapfile: UUID="684f3c6e-907a-4a35-95b4-7b6cde21440b" TYPE="swap"

运行以下命令:

sudo swapoff -a
sudo /etc/init.d/cryptdisks start 
sudo swapon -a
sudo swapon -s

输出:

/swapfile                               file        16777212    0   -2

/ dev / mapper仍然只是控制。现在让我们加密:sudo ecryptfs-setup-swap!

输出:

WARNING:
An encrypted swap is required to help ensure that encrypted files are not leaked to disk in an unencrypted format.

HOWEVER, THE SWAP ENCRYPTION CONFIGURATION PRODUCED BY THIS PROGRAM WILL BREAK HIBERNATE/RESUME ON THIS SYSTEM!

NOTE: Your suspend/resume capabilities will not be affected.

Do you want to proceed with encrypting your swap? [y/N]: y

INFO: Setting up swap: [/swapfile]
WARNING: Commented out your unencrypted swap from /etc/fstab
A dependency job for cryptsetup.target failed. See 'journalctl -xe' for details.

--- journalctl -xe日志---

https://pastebin.com/yqJZ9tQj