Monday, December 04, 2006

How to mount your NTFS volume to Linux

This is a handy post for people who have installed linux and WindowsXP side-by-side and want to have interoprability between them.

A linux-ntfs interoperability project has been constituted at http://www.linux-ntfs.org/ .You can get the necessary details from this page.Also the OS forms we are dealing with are Redhat,Ubuntu.

Choose one of the following three options:

1) Linux has an integrated kernel driver. It allows reading of files, and rewriting existing files. It does not support creation of new files or deletion of existing files. It works out of the box in most modern Linux distributions except Redhat/Fedora.The kernel contains the different filesystem supported as modules.By default other legacy filesystems like FAT,DOS etc are supported,but NTFS is not natively supported.

First of all, check your partitions using hardware browser or fdisk utility through command prompt to know exact linux partition number listing

Check mounting using these commands:

# mkdir /mnt/windows
# mount /dev/ (eg: hda5) /mnt/windows -t ntfs -o umask=0002,nls=utf8


If NTFS is not supported, we get error messages.What we have to do is to download approprate NTFS kernel module and install it.We can also issue command for FTP update of kernel module

Open a terminal.Be root user using command

# su -

and issue:

# yum install kmod-ntfs (for uniprocessor)
# yum install kmod-ntfs-smp (for dual core)

Otherwise search for kernel drivers for NTFS in the net and install manually.Once again issue above said commands:

# mkdir /mnt/windows
# mount /dev/hda1 /mnt/windows -t ntfs -o umask=0002,nls=utf8


Add the entry permenantly to fstab file :

/dev/hda1 /mnt/windows ntfs ro,umask=0002,nls=utf8

This is it.Restart the OS for changes.

2) ntfsprogs includes an improved driver, ntfsmount, which provides the same functionality as the kernel driver. Additionally it also supports basic cases of directory, symlink, device and FIFO file creation, deletion and renaming. Note: That doesn't mean it always succeeds, it is still experimental and might just as well refuse to complete an operation in order to prevent corruption. See the ntfsmount page for more details.

3) On 07/14/2006, project member Szabolcs Szakacsits presented a new version of ntfsmount and libntfs, given the project title ntfs-3g. This version has full read/write capabilities, many bug fixes and improved performance. It has already been downloaded over 66,000 times, tested and regularly used by users with satisfaction over the last three months. Despite of that it is still a strong beta, and will upon (in some way or the other) merge also into the linux-ntfs ntfsprogs package.

The beta version of the ntfs-3g driver can be downloaded from http://www.ntfs-3g.org

You can use the abovesaid three methods based on situations.In the first and the normal method, i had elaborated the steps exhaustively.

No comments: