我想在 LUKS 加密文件系统上拥有 32GB 的 SWAP 并启用休眠功能。我的基本交换分区是 1GB,我已将 \xc2\xb4/swapfile\' 设为 31GB。我首先尝试使用此处fallocate解释的命令。我将我的和编辑为:/etc/initramfs-tools/conf.d/resume/etc/default/grub
> cat /etc/initramfs-tools/conf.d/resume \nRESUME=UUID=<uuid> resume_offset=<offset>\nRun Code Online (Sandbox Code Playgroud)\n其中 和 是命令的结果:
\n> sudo findmnt -no UUID -T /swapfile\n> sudo filefrag -v /swapfile | awk \'{ if($1=="0:"){print substr($4, 1, length($4)-2)} }\'\nRun Code Online (Sandbox Code Playgroud)\n我打电话sudo update-grub并sudo update-initramfs -u。它不起作用。
比我尝试使用命令删除旧的/swapfile并创建新的。dd
> sudo dd if=/dev/zero of=/swapfile bs=1024 count=32768k\n33554432+0 records in\n33554432+0 records out\n34359738368 bytes (34 GB, 32 GiB) copied, 69,0213 s, …Run Code Online (Sandbox Code Playgroud)