![[mntent]:运行 sudo mount -o 时 /etc/fstab 中的第 15 行错误](https://linux22.com/image/85664/%5Bmntent%5D%EF%BC%9A%E8%BF%90%E8%A1%8C%20sudo%20mount%20-o%20%E6%97%B6%20%2Fetc%2Ffstab%20%E4%B8%AD%E7%9A%84%E7%AC%AC%2015%20%E8%A1%8C%E9%94%99%E8%AF%AF.png)
运行 sudo mount -o rw,remount /mnt/Data 报告上述错误。这是 fstab 文件
# /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/sda7 during installation
UUID=c8fd3429-3454-41df-ae9c-0f98615bc314 / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/sda2 during installation
#UUID=1EF0-739E /boot/efi vfat defaults 0 1
# swap was on /dev/sda10 during installation
UUID=47da3636-057c-4fb5-ab12-383d13d914c6 none swap sw 0 0
#Data
UUID=C06EDC746EDC6526 /mnt/Data ntfs-3g defaults auto umask=7770 0 1
UUID=1EF0-739E /boot/efi vfat defaults 0 1
答案1
/etc/fstab 文件中的每一行包含以下由空格或制表符分隔的字段:
file_system dir type options dump pass
options
必须用逗号分隔
另外,auto
指的是文件系统类型,因此要么使用 auto 而不是 ntfs-3g,要么将其删除。
答案2
15号线是
UUID=C06EDC746EDC6526 /mnt/Data ntfs-3g defaults auto umask=7770 0 1
/etc/fstab 中的不同列(在您的情况下用空格分隔)是:
file_system dir type options dump pass
所以看起来您还需要两列。对于选项,请在默认值或自动之间进行选择,并尝试删除 umask=7770。所以尝试:
UUID=C06EDC746EDC6526 /mnt/Data ntfs-3g defaults 0 1
或者
UUID=C06EDC746EDC6526 /mnt/Data ntfs-3g auto 0 1
如果上面的方法仍然无法解决问题,您可能还需要使用“-”分隔 UID,就像文件中的其他 UID 一样。