我有一个包含 LUKS 加密图像的 img 文件。
我成功挂载了加密分区,但它是以只读方式挂载的
我做的是:
sudo losetup -P /dev/loop0 myimg.img
udisksctl unlock -b /dev/loop0p1
mount /dev/dm-0 /mnt
mount:/dev/dm-0 is write-protected, mounting read-only
我尝试使用以下命令进行挂载:
mount -o remount,rw /dev/dm-0 /mnt
mount: /mnt not mounted or bad option
In some cases useful info is found is syslog - try
dmesg | tail or so.
在 dmesg 中我收到:
EXT$-fs (dm-0): mounted filesystem with ordered data mode. Opts:(null)
或者
mount -o remount,rw /dev/dm-0
mount: cannot remount /dev/dm-0 read-write, is write-protected
我也尝试以 root 身份使用 e2fsck:
e2fsck /dev/dm-0
e2fsck: Operation not permitted while trying to open /dev/dm-0
You must r/w access to the filesystem or be root
那么我如何才能获得该分区的写权限?