无法使用终端以读写模式挂载 VHD 文件

无法使用终端以读写模式挂载 VHD 文件

我有一个 VHD 文件,正在使用 bash 脚本来挂载,我在 sudo 中运行它:


#!/bin/bash
cd /home/user/Desktop/VMfiles
echo "make sure to unmount the VHD before starting up the vm, as theres a risk of corruption if the file is mounted in both OSes."
sleep .5
chmod ugo+rwx disk-1.vhd
sleep .5
vhdimount -X allow_root disk-1.vhd /mnt/vhd/
sleep .5
mount -vt ntfs-3g -o ro,noload,offset=32256 /mnt/vhd/vhdi1 /media/user/your/folder

该命令只能以只读模式挂载 vhd 文件,如果我尝试切换此命令:


mount -vt ntfs-3g -o ro,noload,offset=32256 /mnt/vhd/vhdi1 /media/user/your/folder

对此,

mount -vt ntfs-3g -o rw,noload,offset=32256 /mnt/vhd/vhdi1 /media/user/your/folder

出现以下错误信息:

ntfs-3g-mount:挂载失败:权限被拒绝
无法同步设备 /dev/loop0:输入/输出错误
无法关闭卷 /dev/loop0:输入/输出错误


这是怎么回事?
如何启用读写模式?
操作系统:Ubuntu 18.04

相关内容