我有一个加密容器,其中包含一个没有分区表的可安装 EXT2 文件系统。如何使用 cryptsetup 挂载该文件?我的尝试失败,并显示“VFS:无法找到 ext4 文件系统”...
答案1
要使用纯模式打开并挂载加密容器:
sudo cryptsetup plainOpen Container DecryptedContainter
sudo mount /dev/mapper/DecryptedContainer /mnt
完成后,卸载并关闭容器:
sudo umount /mnt
sudo cryptsetup plainClose DecryptedContainer
使用适当的名称Container
和DecryptedContainer
,并使用正确的安装点代替/mnt
。
从man cryptsetup
:
The following are valid plain device type actions:
open --type plain <device> <name>
create <name> <device> (OBSOLETE syntax)
Opens (creates a mapping with) <name> backed by device <device>.
<options> can be [--hash, --cipher, --verify-passphrase, --key-
file, --keyfile-offset, --key-size, --offset, --skip, --size,
--readonly, --shared, --allow-discards]
Example: 'cryptsetup open --type plain /dev/sda10 e1' maps the
raw encrypted device /dev/sda10 to the mapped (decrypted) device
/dev/mapper/e1, which can then be mounted, fsck-ed or have a
filesystem created on it.