我在一台装有 LUKS 加密驱动器的 Ubuntu 16.04 计算机上尝试安装旧的 Ubuntu 16.04 LUKS 加密驱动器。当我在 Nautilus 中打开驱动器时,输入正确的密码后,出现以下弹出错误
无法访问“127 GB 加密” 操作取消
sudo fdisk -l
执行完后输出相关内容sudo cryptsetup luksOpen /dev/sdb3 my_encrypted_volume
:
Disk /dev/sdb: 119.2 GiB, 128035676160 bytes, 250069680 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 33553920 bytes
Disklabel type: gpt
Disk identifier: 1D78C9DC-B51C-4729-8D7D-BB2B7C207511
Device Start End Sectors Size Type
/dev/sdb1 2048 1050623 1048576 512M EFI System
/dev/sdb2 1050624 1550335 499712 244M Linux filesystem
/dev/sdb3 1550336 250068991 248518656 118.5G Linux filesystem
Disk /dev/mapper/my_encrypted_volume: 118.5 GiB, 127239454720 bytes, 248514560 sectors
我尝试过很多答案从命令行挂载加密卷?没有成功。
如果我接受答案
(这个)
udisksctl unlock -b /dev/sdb5
udisksctl mount -b /dev/mapper/ubuntu-root
我得到了类似Object /org/freedesktop/UDisks2/block_devices/dm_2d3 is not a mountable filesystem.
如果我回答得票最高的答案
(这个)
sudo cryptsetup luksOpen /dev/sdb3 my_encrypted_volume
sudo mkdir /media/my_device
sudo mount /dev/mapper/my_encrypted_volume /media/my_device
我明白了mount: unknown filesystem type 'LVM2_member'
答案1
滚动浏览相关问题之一我找到了一个可行的答案。
sudo cryptsetup luksOpen /dev/sdb3 my_encrypted_volume
sudo vgimportclone /dev/mapper/my_encrypted_volume
后者输出了一堆可怕的东西,WARNING
直到
Volume group "ubuntu-vg" successfully renamed to "ubuntu-vg1"
Notifying lvmetad about changes since it was disabled temporarily.
(This resolves any WARNING message about restarting lvmetad that appears above.)
Reading all physical volumes. This may take a while...
Found volume group "ubuntu-vg" using metadata type lvm2
Found volume group "ubuntu-vg1" using metadata type lvm2
然后我跑了sudo vgchange -ay
(可能没有必要),然后跑了
sudo mount /dev/ubuntu-vg1/root /media/my_device/
瞧!驱动器出现在 Nautilus 中
答案2
运行以下命令,因为驱动器可能由于多次输入错误密码或其他原因而被停用。
sudo vgchange -ay
您应该获得类似以下的输出:
root@nc:~# vgchange -ay
2 logical volume(s) in volume group "pny-vg" now active
3 logical volume(s) in volume group "nc-vg" now active