Linux Deepin开机自动挂载windows文件系统

本文发布时间: 2019-Mar-22
假设我们有两个 FAT32 分区,分别为 /dev/sda1 和 /dev/sda11,还有一个 NTFS 分区,为 /dev/sda15。该如何设置才能使 Linux Deepin 开机自动挂载这几个分区到指定路径呢?可以修改 /etc/fstab 文件,添加以下几行:/dev/sda1 /fat-c vfat fmask=111,dmask=000,iocharset=utf8 1 0/dev/sda11 /fat-d vfat fmask=111,dmask=000,iocharset=utf8 1 0/dev/sda15 /ntfs-e ntfs fmask=111,utf8 1 0这里分别将两个 FAT32 分区(/dev/sda1 和 /dev/sda11)挂载到了 /fat-c 和 /fat-d 路径下,将单独的 NTFS 分区(/dev/sda15)挂载到了 /ntfs-e 路径下。设置 fmask 及 dmask 的值用于指定缺省时的位掩码,默认给予普通用户对于这几个分区文件的读写和执行权限。添加 iocharset 及 utf8 两个选项可使文件系统上的文件名能够正常转换和显示,避免乱码。至此,即完成 Linux Deepin 启动时对 windows 文件系统(FAT32 和 NTFS)的自动挂载:#crayon-50ab392c82b4b .crayon-plain { font-size: 12px !important; line-height: 16px !important;}$ ls -l /fat-c/total 1560952-rw-rw-rw- 1 root root 0 Jun 22 19:55 AUTOEXEC.BAT-rw-rw-rw- 1 root root 211 Jun 22 19:49 boot.ini-rw-rw-rw- 1 root root 0 Jun 22 19:55 CONFIG.SYSdrwxrwxrwx 7 root root 8192 Jun 22 11:25 Documents and Settings-r--r--r-- 1 root root 0 Jun 22 19:55 IO.SYS-rw-rw-rw- 1 root root 12280 Sep 25 12:01 log.txt-r--r--r-- 1 root root 0 Jun 22 19:55 MSDOS.SYS-r--r--r-- 1 root root 47564 Apr 13 2008 NTDETECT.COM-r--r--r-- 1 root root 250048 Apr 13 2008 ntldr-rw-rw-rw- 1 root root 1598029824 Nov 20 10:45 PAGEFILE.SYSdrwxrwxrwx 54 root root 8192 Jun 22 19:54 Program Filesdrwxrwxrwx 34 root root 16384 Jun 22 22:05 Recycleddrwxrwxrwx 3 root root 8192 Jun 22 20:00 System Volume Informationdrwxrwxrwx 71 root root 16384 Jun 22 11:20 WINDOWS


(以上内容不代表本站观点。)
---------------------------------
本网站以及域名有仲裁协议。
本網站以及域名有仲裁協議。

2024-Mar-04 02:11pm
栏目列表