我最近从 Windows 转到了 Ubuntu,我使用我的两个驱动器中的一个来安装 Ubuntu,并将其他驱动器中所有的数据与旧的 Windows 分区一起安装。
现在我需要安装旧驱动器的分区来保存新数据,并且每次需要下载或更改某些内容时,我发现总是安装并更改所需分区的写入/读取权限非常困难。
/dev/sdb1: BLOCK_SIZE="512" UUID="F8FE844CFE84055A" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="053727a6-5dba-4888-93c6-da2a466a8e4d"
/dev/sdb2: UUID="5E75-8826" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="0d13c77a-a67f-4971-a2ec-547af6019abf"
/dev/sdb3: PARTLABEL="Microsoft reserved partition" PARTUUID="61c05d96-6a41-4e3c-9ec8-cad4c4076419"
/dev/sdb4: LABEL="A" BLOCK_SIZE="512" UUID="244457294456FCCC" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="2f42d340-e6b0-4d24-8964-5c2117acff34"
/dev/sdb5: LABEL="B" BLOCK_SIZE="512" UUID="B270646A7064376F" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="5c1e2d61-5025-46ea-b1bb-3dc0573507ba"
/dev/sdb6: LABEL="D" BLOCK_SIZE="512" UUID="0220616220615E23" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="18822c48-5ff7-4daf-a595-63eda7eb76df"
/dev/sdb7: LABEL="20h2" BLOCK_SIZE="512" UUID="14206D4A206D33C0" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="6d6f76b9-8d4f-4cec-90a7-a7539b5b3a68"
/dev/sdb8: BLOCK_SIZE="512" UUID="F8047DF7047DB8E8" TYPE="ntfs" PARTUUID="bf7c341a-dd3f-4bc5-8e73-bac8234f7b9b"
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda2 during installation
UUID=53541401-02f6-44e7-a272-d08775f93209 / ext4 errors=remoun>
# /boot/efi was on /dev/sda1 during installation
UUID=DF3D-1B7E /boot/efi vfat umask=0077 0 1
/swapfile none swap sw >
我fstab
通过添加来编辑文件
/dev/disk/by-uuid/244457294456FCCC /mnt/A ntfs-3g users,uid=1000,dmask=027,fmask=137,rw,x-gvfs-show,utf8 0 0
每次启动时都会挂载该分区,但我仍然需要以读/写模式访问它我添加了行中的 rw,但它不起作用。
答案1
使用以下命令检查所有可用分区:
sudo blkid
每个分区的输出如下:
/dev/sdb8: BLOCK_SIZE="512" UUID="**F8047DF7047DC8E8**" TYPE="*ntfs*" PARTUUID="bf7c341a-dd3f-4bc5-8e73-bac8232f7b9b"
有了这些信息,用户应该打开一个新的终端窗口,并
fstab
使用以下命令编辑文件:sudo nano /etc/fstab
在文件底部,添加 UUID、挂载点和标签、分区类型
defaults
和0 0
,所有内容以制表符分隔:UUID=F8047DF7047DC8E8 /media/Label ntfs defaults 0 0
为了确保没有任何错误,请使用:
mount -a
如果分区有Windows缓存并且出现错误,
ntfsfix
可以使用以下命令:sudo ntfsfix /dev/sdb8