![在双系统上使用通用分区 - Win10 + Ubuntu20.04 和通用 HOME 文件夹](https://linux22.com/image/926687/%E5%9C%A8%E5%8F%8C%E7%B3%BB%E7%BB%9F%E4%B8%8A%E4%BD%BF%E7%94%A8%E9%80%9A%E7%94%A8%E5%88%86%E5%8C%BA%20-%20Win10%20%2B%20Ubuntu20.04%20%E5%92%8C%E9%80%9A%E7%94%A8%20HOME%20%E6%96%87%E4%BB%B6%E5%A4%B9.png)
我有一台只有一个 SSD 插槽的笔记本电脑,所以空间非常宝贵。我购买了 2TB 的 SSD 并运行双启动 Win10 + Ubuntu 20.04——使用更多的 KDE Plasma 而不是 Gnome。我有两个小分区,每个系统一个,其余的磁盘用于所有共享数据。最初格式化为 NTFS,我无法使其在 Linux 中正常工作,并且被告知 Linux 在 NTFS 上运行不佳,所以我决定使用 ExFat。目的是拥有一个用于文档、图片和音乐的共享文件夹,因为我正在将它们与我的 Qnap NAS 同步,并且为每个系统保留两组这样的文件夹很麻烦。尝试将这些文件夹从 HOME 移动到 ExFat 分区时,我实际上遇到了权限问题。我已经运行sudo mv $HOME/Music/mnt/AFD6-C938/Music
以便可以将文件夹符号链接回来,我得到:mv: failed to preserve ownership for '/mnt/AFD6-C938/Music': Operation not permitted I have read now, that Fat system can not work with permission.
有什么解决方法吗?还有其他方法吗,如何实现我的目标?有人可以帮忙吗?我迷路了...我已经将整个分区的权限设置为 0777,但情况仍然一样...干杯!
# /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/nvme0n1p5 during installation
UUID=a0b9825b-8a77-47b3-9751-e3bda8a20a6b / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/nvme0n1p2 during installation
UUID=0C80-675A /boot/efi vfat umask=0077 0 1
/swapfile none swap sw 0 0
/dev/disk/by-uuid/554EC1F141ADD65B /mnt/554EC1F141ADD65B auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-id/usb-Seagate_BUP_BL_NA7PYSG0-0:0-part2 /mnt/usb-Seagate_BUP_BL_NA7PYSG0-0:0-part2 auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-id/usb-WD_My_Passport_25AF_575838314442374552353856-0:0-part2 /mnt/usb-WD_My_Passport_25AF_575838314442374552353856-0:0-part2 auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-uuid/AFD6-C938 /mnt/AFD6-C938 auto nosuid,nodev,nofail,x-gvfs-show 0 0
答案1
根据您已完成的操作,我将这样做。
将 exfat 分区更改为 NTFS(首先备份所有数据)
用于
blkid
查找所有分区的 UUID,并将规则更改为/etc/fstab
如下所示(这是我的fstab
虚构 UUID)# /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/sda4 during installation UUID=b75cccbc-b593-11ea-8460-474c3ce68281 / ext4 errors=remount-ro 0 1 # /boot/efi was on /dev/sda1 during installation UUID=00DA-76C2 /boot/efi vfat umask=0077 0 1 # /home was on /dev/sdb1 during installation UUID=ba8e2b4c-b593-11ea-9e46-73bf5d306e99 /home ext4 defaults 0 2 # /opt was on /dev/sdb2 during installation UUID=bb971558-b593-11ea-b501-8b6ce84c818b /opt ext4 defaults 0 2 # swap was on /dev/sda3 during installation UUID=bc530f7e-b593-11ea-9af6-f3b4407e7176 none swap sw 0 0 # Access to public volume on Synology NAS 192.168.1.2:/volume1/public /mnt/public nfs _netdev,noauto,x-systemd.automount,rsize=8192,wsize=8192,timeo=14,intr 0 0 # Access to backup volume on Synology NAS 192.168.1.2:/volume1/backup /mnt/backup nfs _netdev,noauto,x-systemd.automount,rsize=8192,wsize=8192,timeo=14,intr 0 0 # Access to work volume on Synology NAS 192.168.1.2:/volume2/work /mnt/work nfs _netdev,noauto,x-systemd.automount,rsize=8192,wsize=8192,timeo=14,intr 0 0 # read-only storage connected to Router USB //192.168.1.1/router-storage /mnt/router cifs guest,vers=1.0 0 0 ### Mount the common NTFS partition read/write for user 1000 read-only for group 1000 UUID=6981987E4DD51192 /mnt/win ntfs-3g defaults,nls=utf8,umask=027,dmask=027,fmask=137,uid=1000,gid=1000,windows_names 0 0
D:
像在 Windows 中一样挂载公共分区。将公用文件夹放在该分区中,并从 Windows 中的用户帐户链接到它们(
C:\Users\...
)。在 Linux 中,您只需照常打开它们即可。QNAP 服务器中 NFS 的访问需要设置为 192.168.1.0/24,但是我不知道 QNAP 中的权限设置。