NTFS

From Gentoo Wiki
Jump to: navigation, search
This page contains changes which are not marked for translation.


Not to be confused with NFS.


NTFS (New Technology File System) is a proprietary disk filesystem by Microsoft for Windows and Windows-based operating systems.

There are two primary methods to achieve NTFS support when using Linux. The kernel itself includes limited write support for the NTFS filesystem. This can be seen in the native support section below. There is also a FUSE filesystem driver called NTFS-3G that includes better write support. Because of this, most users who need NTFS support opt for the FUSE implementation over the rather limited built-in support.

Installation

Kernel

Native support

KERNEL Enabling built-in NTFS (limited write support)
File systems  --->
    DOS/FAT/NT Filesystems  --->
        <*> NTFS file system support
        <*>   NTFS write support

FUSE support

The following kernel options must be enabled for NTFS read/write capabilities in Linux. To get full write support you need to use sys-fs/ntfs3g package. The kernel implementation offers only limited write support.

KERNEL Enabling NTFS over FUSE using sys-fs/ntfs3g (preferred)
File systems  --->
    <*> FUSE (Filesystem in Userspace) support

USE flags

Because NTFS-3G is a FUSE-based filesystem, it requires user space utilities. It is currently the best implementation of NTFS for Linux and the only FUSE-based implementation available in the main Gentoo repository.

USE flags for sys-fs/ntfs3g Open source read-write NTFS driver that runs under FUSE

acl Add support for Access Control Lists global
debug Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces global
external-fuse Use external FUSE library instead of internal one. Must be disabled for unprivileged mounting to work. local
ntfsdecrypt Build and install the ntfsdecrypt application. local
ntfsprogs Include internal version of ntfsprogs. local
static-libs Build static versions of dynamic libraries as well global
suid Enable setuid root program, with potential security risks global
xattr Add support for extended attributes (filesystem-stored metadata) global

Emerge

After reviewing USE flags and making adjustments as necessary, install the FUSE user space tools in order to manipulate NTFS filesystems:

root #emerge --ask sys-fs/ntfs3g

Usage

Creation

Warning
The mkfs.ntfs command irreversibly destroys the contents of the partition it is told to format. Be sure to select the right partition before running this command!

To create an NTFS filesystem on the /dev/sda1 partition (needs ntfsprogs USE flag):

root #mkfs.ntfs /dev/sdyX

Please replace /dev/sdyX with the actual partition you want to format.

Mount

There are several ways to mount a NTFS filesystem:

See also

  • FAT - File Allocation Table filesystem. Originally created for Microsoft Windows.
  • ext4 - Extended file system version 4.
  • Btrfs - A copy-on-write B-tree filesystem with advanced features.
  • tmpfs - A filesystem that lives in dynamic memory (RAM).

External resources