The wikis are now using the new authentication system.
If you did not migrate your account yet, visit https://idp-portal-info.suse.com/

NTFS

Jump to: navigation, search

Susemini.png 本文处于需要翻译的文章的状态,欢迎您积极参与翻译与修订。 翻译人员:ichair,修订人员:无。

Geeko NTFSNew Technology File System 的缩写(意为新技术文件系统)。应用于基于NT内核的Windows® 操作系统中, 例如 Windows®XP®。


在最初的几年,Linux只对NTFS提供只读支持。新近推出的驱动程序实现了稳定的读写访问。 想获取更多信息,请访问:


Warning-root-login.png

操作前请仔细阅读上述网页并确信您已理解每项内容。如果您不确定,请谨慎操作。
Before proceeding, please carefully read details on the above web pages and make sure that you understand everything. If you are not sure please be careful about proceeding.


对NTFS文件系统写入支持的安装

注意: 为了避免对系统造成损害,存在错误的NTFS分区将会以只读方式挂载。
To correct this you should boot Windows® and run file system repair program. Repair is not yet possible from Linux.


openSUSE 10.3

ntfs-3g插件默认安装在openSUSE 10.3中,支持读写。

Modify /etc/fstab to reflect umask=0002

例如
For example

SATA 或 PATA (IDE) 驱动:
#Device    Mountpoint  Filesystem  Parameters
/dev/sda1  /windows/C  ntfs-3g     user,users,gid=users,umask=0002,locale=en_US.UTF-8  0 0
其他选择:
#Device                 Mountpoint  Filesystem  Parameters
/dev/disk/by-label/win  /windows/C  ntfs-3g     user,users,gid=users,umask=0002,locale=en_US.UTF-8  0 0


The ntfs-3g is installed by default and write support is enabled.

Modify /etc/fstab to reflect umask=0002

For example

SATA or PATA (IDE) drive
#Device    Mountpoint  Filesystem  Parameters
/dev/sda1  /windows/C  ntfs-3g     user,users,gid=users,umask=0002,locale=en_US.UTF-8  0 0
Other options
#Device                 Mountpoint  Filesystem  Parameters
/dev/disk/by-label/win  /windows/C  ntfs-3g     user,users,gid=users,umask=0002,locale=en_US.UTF-8  0 0

openSUSE 10.2

如果您只是读取NTFS文件系统上的文件,您不需任何设置,所有SUSE Linux / openSUSENTFS默认启用文件系统只读功能
If you need only to see your files, then you don't need to do anything as NTFS read only access is enabled in all versions of SUSE Linux / openSUSE by default.

需要读/写功能时,添加此安装源
For read/write you should add this repositories:

 zypper sa http://download.opensuse.org/repositories/filesystems/openSUSE_10.2/ Filesystems

您将看到以下信息
You will see following text:

* Adding repository 'Filesystems'
Repository 'Filesystems' successfully added:
Enabled: Yes
Autorefresh: Yes
URL: http://download.opensuse.org/repositories/filesystems/openSUSE_10.2/

使用命令

zypper in -c Filesystems ntfs-3g fuse

安装以下软件包:

 fuse
 ntfs-3g

或到TaST中软件管理进行安装,在搜索框内输入ntfs-3g查找
Install the following packages:

 fuse
 ntfs-3g

with

zypper in -c Filesystems ntfs-3g fuse

or go to YaST Software Management and install from there. To locate ntfs-3g use that as a search term.


挂载NTFS分区 Mounting NTFS Partition

将要挂载的分区写入文件/etc/fstab中,NTFS文件系统将随系统启动自动挂载。挂载前确定挂载点目录(此例是/Windows/C)已经存在。大部分NTFS在第一块硬盘的一部分:

PATA (IDE) 硬盘:
#Device    Mountpoint  Filesystem  Parameters
/dev/hda1  /windows/C  ntfs-3g     user,users,gid=users,umask=0002  0 0

SATA 硬盘:
#Device    Mountpoint  Filesystem  Parameters
/dev/sda1  /windows/C  ntfs-3g     user,users,gid=users,umask=0002  0 0
其他:
#Device                 Mountpoint  Filesystem  Parameters
/dev/disk/by-label/win  /windows/C  ntfs-3g     user,users,gid=users,umask=0002  0 0

注意在保存之前确定参数栏上没有”or“命令。否则即使此分区安装了支持写入的驱动,也只能读取。 另外,您可以使用磁盘标识(ID)(连接符号在/dev/disk/by-id/)或文件系统的UUID(/dev/disk/by-uuid/)指定源磁盘。安标签(by-label)按编号(by-id)/dev/sd*更好,因为当磁盘可能由前后变化时而他们(by-label,by-id)保持不变,也就是说,用/dev/sdc 代替/dev/sda(其中后者依赖注册顺序and/or)。

By adding an entry to file /etc/fstab, the NTFS file system will be mounted automatically at boot. Make sure the mount point directory (in this example /Windows/C) exists beforehand. The most common case is that NTFS is on partition one of first hard disk:

PATA (IDE) drive
#Device    Mountpoint  Filesystem  Parameters
/dev/hda1  /windows/C  ntfs-3g     user,users,gid=users,umask=0002  0 0

SATA drive
#Device    Mountpoint  Filesystem  Parameters
/dev/sda1  /windows/C  ntfs-3g     user,users,gid=users,umask=0002  0 0
Other options
#Device                 Mountpoint  Filesystem  Parameters
/dev/disk/by-label/win  /windows/C  ntfs-3g     user,users,gid=users,umask=0002  0 0

Make sure there is no "ro" command in the parameters before saving, otherwise the partition will be mounted read-only even though the driver has write support.

Alternatively, you can specify the source device using the disk's ID (symlinks in /dev/disk/by-id/) or the filesystem's UUID (/dev/disk/by-uuid/). by-label or by-id are preferred over /dev/sd* nodes because they will remain the same while the disk could show up under, say, /dev/sdc instead of /dev/sda (the latter of which depends on the order they were plugged in and/or recognized).

手动挂载

如果您想手动关注NTFS分区,请使用ntfs-3g命令制定磁盘分区为NTFS。例,挂载一个分区标签为"windows"的只读NTFS分区到/mnt目录下:

ntfs-3g -o ro,gid=users,umask=0002 /dev/disk/by-label/windows /mnt

最后部分也可以使用:

su -c yast2 disk

这跟到YaST--系统--Partitioner设定一样。

想了解完整详尽的利用ntfs-3g和umount命令来挂载和卸载NTFS分区的方法,请阅读它们的说明文档。

If you want to mount an NTFS partition manually, use the ntfs-3g command, specifying the disk partition as NTFS. For example this mounts an NTFS partition read-only which has the label "windows" onto the directory /mnt:

ntfs-3g -o ro,gid=users,umask=0002 /dev/disk/by-label/windows /mnt

This last part can also be done using:

su -c yast2 disk

Which is the same as YaST -- System -- Partitioner

For full details on using the ntfs-3g and umount commands to mount and unmount NTFS partition, read their manuals.

排疑解惑

用ntfs-fuse挂载NTFS比使用ntfs-3g有很大劣势;每个目录至多能创建10个文件。如果您打算将NTFS分区用于更多用途,您应该使用更合适的NTFS驱动,例如ntfs-3g。

如果您在Guru YaST源里找不到ntfs-3g,试试在suser-jengelh里搜索,或直接从ntfs-3g网站下载。安装ntfs-3g前,确定fuse已启动(modprobe fuse),如未启动,在系统设定中加入系统启动:用YaST/System/sysconfig编辑;选择System/Kernel/MODULES_LOADED_ON_BOOT;写入fuse,单击完成按钮。

这步骤是简单易懂的(./configure; make; make install)。挂载选项除了驱动名称,其他非常相似(ntfs-3g instead of ntfs-fuse)。

The ntfs-fuse uses ntfsmount and is vastly inferior compared to ntfs-3g; there is a creation limit of 10 files per directory. If you want to use a ntfs partitions for more serious work, you should consider using a more appropriate ntfs driver such as ntfs-3g.

If you cannot find ntfs-3g package in the Guru YaST repositories, try searching in suser-jengelh, or download the source from ntfs-3g web site. Make sure fuse is loaded (e.g. modprobe fuse) or if it does not load on startup then add it to the system configuration: Use YaST/System/sysconfig editor; choose System/Kernel/MODULES_LOADED_ON_BOOT; write fuse in it and click the Finish button.

The build is straightforward (./configure; make; make install). Mount options are very similar with exception of the driver name (ntfs-3g instead of ntfs-fuse).zh_tw:NTFS