我的交换分区既未挂载也未处于活动状态。我的系统确实找到/识别了交换分区,但仅此而已
我的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/sda2 during installation
UUID=13d93751-743e-49f4-9cd4-681aeaa2ba30 / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/sda1 during installation
UUID=8CB4-46F0 /boot/efi vfat umask=0077 0 1
# /home was on /dev/sda4 during installation
# swap was on /dev/sda3 during installation
#UUID=5b41eeb7-0447-491e-b0ce-8f3d35280ea2 none swap sw 0 0
/dev/mapper/cryptswap1 none swap sw 0 0
#PARTUUID=778e6277-6364-11e3-9faa-0c54a54d3e5a
/media/ntfs -ntfs-3g ntfs defaults,umask=222 0 0
我已将最后一个 UUID 手动插入到 fstab 中以访问外部 NTFS 磁盘。这可能是问题所在吗?
根据要求这是我的crypttab
:
cryptswap1 UUID=5b41eeb7-0447-491e-b0ce-8f3d35280ea2 /dev/urandom swap,offset=1024,cipher=aes-xts-plain64
这是我的lsblk -f
NAME FSTYPE LABEL UUID MOUNTPOINT
sr0
sda
├─sda4 ext4 0d497413-33f4-4147-83e1-158673893393 /home
├─sda2 ext4 13d93751-743e-49f4-9cd4-681aeaa2ba30 /
├─sda3 swap 5b41eeb7-0447-491e-b0ce-8f3d35280ea2
│ └─cryptswap1 swap 4cd2e69a-b27e-41e1-9250-3d2e65ebbf11 [SWAP]
└─sda1 vfat 8CB4-46F0 /boot/efi
该命令sudo swapon -a
根本没有给我任何输出!
命令ls -lA /dev/mapper
显示
control
cryptswap1
命令swapon
显示
NAME TYPE SIZE USED PRIO
/dev/dm-0 partition 3,9G 0B -1
输出systemctl status [email protected]
● [email protected] - Cryptography Setup for cryptswap1
Loaded: loaded (/etc/crypttab; bad; vendor preset: enabled)
Active: active (exited) since Sa 2016-12-24 10:37:43 CET; 36min ago
Docs: man:crypttab(5)
man:systemd-cryptsetup-generator(8)
man:[email protected](8)
Process: 919 ExecStartPost=/sbin/mkswap /dev/mapper/cryptswap1 (code=exited, status=0/SUCCESS)
Process: 702 ExecStart=/lib/systemd/systemd-cryptsetup attach cryptswap1 /dev/disk/by-uuid/5b41eeb7-0447-491e-b0ce-8f3d35280ea2 /dev/urandom swap,offset=1024,cipher=aes-xts-plain64 (code=exited, status=0/SUCCESS)
Main PID: 702 (code=exited, status=0/SUCCESS)
Dez 24 10:37:37 dirksson-SATELLITE-PRO-C50-A-1J1 systemd[1]: Starting Cryptography Setup for cryptswap1...
Dez 24 10:37:38 dirksson-SATELLITE-PRO-C50-A-1J1 systemd-cryptsetup[702]: Set cipher aes, mode xts-plain64, key size 256 bits for device /dev/disk/by-uuid/5b41eeb7-0447-491e-b0ce-8f3d35280ea2.
Dez 24 10:37:43 dirksson-SATELLITE-PRO-C50-A-1J1 mkswap[919]: Setting up swapspace version 1, size = 3,9 GiB (4163366912 bytes)
Dez 24 10:37:43 dirksson-SATELLITE-PRO-C50-A-1J1 mkswap[919]: no label, UUID=eb58cf21-d0aa-41c2-bd86-a81466328f93
Dez 24 10:37:43 dirksson-SATELLITE-PRO-C50-A-1J1 systemd[1]: Started Cryptography Setup for cryptswap1.
free -h
节目
total used free shared buff/cache available
Mem: 3,7G 975M 1,7G 108M 1,0G 2,4G
Swap: 3,9G 0B 3,9G
swapon -h
显示没有 cryptswap 条目
/dev/sda3 partition 4066300 0 -2