Personal tools
You are here: Home Team Members Scott Glaser AKA Sonar_Guy Setting Up NTFS Read/Write Support

Setting Up NTFS Read/Write Support

by scott_glaser last modified Mar 20, 2009 09:56 AM expired
— filed under:

Many people request to know how to mount an NTFS partition in windows. It is actually rather easy if you use the kmod-ntfs or kernel-module-ntfs depending on your Fedora release provided by RPMFusion. This module has been recently update to include read-write access. This is a little different from Captive NTFS as you can only edit files that currently exist on the NTFS partition. What this means is that you can now run your favourite editor on an existing file, e.g. vim /ntfs/somefile.txt works fine and you can save your changes. Also things like running OpenOffice work to edit existing MS Office documents as long as OpenOffice does not need to create temporary files in the same directory as the document. Still not supported features are creation/deletion of files/directories and mmap based writes to sparse regions of files. (The mmap support has not been modified since the last release, only the file write support was rewritten.)

Applicable to Fedora Versions

  • Fedora Core 5+

Requirements

  1. You must have a windows partition accessible from your current Fedora Installation (not from a remote box).
  2. Your yum configuration should be configured per this HOWTO or using another howto that sets up the RPMFusion repository.
  3. Understand that this provides a modified Read Write access, as detailed in the introduction.

Doing the work

  1. Open a Terminal.

  2. Enter the following: (Please read the note below the box before executing):

    su -c 'yum install kmod-ntfs ntfs-kmod-common'

    (NOTE: This installs the NTFS Module for a standard kernel. There are 5 versions available for i386 kmod-ntfs kmod-ntfs-kdump kmod-ntfs-smp kmod-ntfs-xen0 kmod-ntfs-xenU).

  3. Once the kernel module is installed you need to create a mount point by entering the following.

    su -c 'mkdir /mnt/windows'
  4. Now you need to locate your windows partition, do this with the following command.

    su -c '/sbin/fdisk -l'
  5. That command should return something similar to the following.

     Device        Boot     Start        End        Blocks        Id   System

    /dev/hda1 * 1 3824 30716248+ 7 HPFS/NTFS
    /dev/hda2 3825 3837 104422+ 83 Linux
    /dev/hda3 3838 7296 27784417+ 8e Linux LVM
  6. Now an entry is needed in the files system table, to do so enter the following.

    su -c 'nano /etc/fstab'
  7. Now in text editor make and entry similar to the follwing as the last line of the file.

    /dev/hda1   /mnt/windows ntfs    defaults,fmask=0222,dmask=0222   0 0

    If your partition identifier is not "/dev/hda1" substitute the correct characters. (For example it might be "/dev/sda1" if you have a SATA /SCSI drive.) Once the new line is added press ctrl+o, at the File Name to Write: /etc/fstab prompt; press enter, this will save the file. Then press ctrl+x to exit the editor.

  8. Now you need to mount your new partitions.

    su -c 'mount -a'
  9. At the prompt enter your root password and press enter.

  10. Close the terminal.

  11. Your Windows partition should now be available in Nautilus under "/mnt/windows".

Troubleshooting

How to test

Use Nautilus and browse your newly mounted Windows directory.

Common problems and fixes

  • If the filesystem has been mounted already, fstab will need to be re-read and the drive re-mounted. The principle is that the fstab is only read when the drive is being mounted thus any changes to the fstab on an already mounted drive will result in the changes happening on the next mount and/or on reboot. To unmount an already incorrectly mounted drive at /mnt/windows do the following:
    (please unmount the correct location)
    umount /mnt/windows

    Assuming you have correctly set everything up, you may return to step 8.

More Information

Disclaimer

We test this stuff on our own machines, really we do. But you may run into problems, if you do, come to #fedora on freenode.net

Added Reading

Document Actions
Log in


Forgot your password?
New user?