NTFS
From openSUSE
Contents |
Support for NTFS in Linux was, for a few years, read only. Recently were introduced drivers that can enable stable read-write access. For more information, please read:
- http://www.ntfs-3g.org The NTFS-3G stable read/write driver project page.
- http://www.ntfs-3g.org/support.html#questions Questions & Answers
- http://www.linux-ntfs.org/ The Linux NTFS project webpage.
| 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. |
Installation of NTFS write support
| Note: To prevent damage to file system, the NTFS partition that has errors will be always mounted as read only. To correct this you should boot Windows® and run file system repair program. Repair is not yet possible from Linux. |
openSUSE 10.3
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
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/
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.
Mounting NTFS Partition
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).
Manual mount
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.
When things don't go smoothly
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).
External HD hotplug bug in openSUSE 11.0
When plugging-in your external hard-drive formatted in NTFS you may get a recurring error saying:
"mount: wrong fs type, bad option, bad superblock on /dev/sdb1, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so"
making it impossible to mount it to the regular KDE user-space. Also, if you try to configure it with the NTFS-3G config GUI it simply creates an entry in fstab, which is useless given the fact we're dealing with a removable hard drive here. NTFS-3G will in fact mount the HD, but you'll be unable to remove it safely without rebooting. A possible solution to this is to mount it manually as root user:
mount /your/device/path /your/device/mountpoint
Another work-around to this issue is to create a symbolic link in /sbin:
cd /sbin sudo ln -s mount.ntfs-3g mount.ntfs
this way the removable media will be hotplugged directly to KDE user-space. If for any reason you need to get back to the old behavior, simply remove the symlink.
NOTE: this seems to happen only in KDE 3.5 ; not in GNOME or KDE 4

