![如何让 Ubuntu 12.04 识别加密交换分区以便我可以休眠?](https://linux22.com/image/820154/%E5%A6%82%E4%BD%95%E8%AE%A9%20Ubuntu%2012.04%20%E8%AF%86%E5%88%AB%E5%8A%A0%E5%AF%86%E4%BA%A4%E6%8D%A2%E5%88%86%E5%8C%BA%E4%BB%A5%E4%BE%BF%E6%88%91%E5%8F%AF%E4%BB%A5%E4%BC%91%E7%9C%A0%EF%BC%9F.png)
我刚刚安装了 Ubuntu 12.04,并使用 gparted 擦除并扩大了我的交换分区。当我重新启动时,gparted 说交换的文件分区未知。Gparted 不允许我将文件分区更改为“linux-swap”。它允许我将其更改为 NTFS,但当我重新启动时,它又变回了“未知”。提前感谢您的帮助。
输出自sudo swapon -s
:
Filename Type Size Used Priority
/dev/mapper/cryptswap1 partition 9025532 0 -1
输出自sudo fdisk -l
:
Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x9d63ac84
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 2459647 1228800 7 HPFS/NTFS/exFAT
/dev/sda2 2459648 197836472 97688412+ 7 HPFS/NTFS/exFAT
/dev/sda3 466890752 488395119 10752184 7 HPFS/NTFS/exFAT
/dev/sda4 197836798 466890751 134526977 5 Extended
/dev/sda5 197836800 448837631 125500416 83 Linux
/dev/sda6 448839680 466890751 9025536 82 Linux swap / Solaris
Partition table entries are not in disk order
Disk /dev/mapper/cryptswap1: 9242 MB, 9242148864 bytes
255 heads, 63 sectors/track, 1123 cylinders, total 18051072 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x951b7f53
Disk /dev/mapper/cryptswap1 doesn't contain a valid partition table
答案1
由于“cryptswap1”,您似乎正在使用加密交换。挂起时会生成一个随机访问密钥,以便在恢复时访问加密交换。有时这个随机密钥会在系统中丢失。我建议创建一个密码短语,您需要在恢复时手动输入该密码短语。这将逐步向您展示如何创建加密交换分区并设置其密码短语。