HowTo: Mount Windows Partition in Linux

May 10, 2005
Windows uses the NTFS file system. This guide explains how to mount your Windows partition in Linux.

What is NTFS ?


NTFS (New Technology File System) is the primary file system used in Microsoft's Windows 7, Windows Vista, Windows XP, Windows 2000 and Windows NT operating systems. The Windows Server line of operating systems also primarily use NTFS.

NTFS supersedes the FAT file system as the preferred file system for Microsoft’s Windows operating systems. [Source : Wikipedia.org]

NTFS supports a number of features such as -

  • Journaling via NTFS Log.
  • Hard and soft links for directories and files.
  • On disk file compression
  • Support for sparce files
  • On the fly encryption of files and folders - via Encrypting File System (EFS)
  • Shadow Copy
  • Disk quotas
  • Directory junctions - similar to volume mount points.
  • And more ...

NTFS in Linux


Linux supports NTFS. In Linux, the ability to read and write to NTFS is provided by the NTFS-3G driver. It is included in most Linux distributions.

Alternately, you can also buy a commercial NTFS driver for Linux such as -

  • Paragon NTFS&HFS - A commercial NTFS driver for Linux from Paragon Software that offers additional utilities and promises high performance.
  • Tuxera NTFS - This is another commercial offering from Tuxera who also develops the Free NTFS-3G driver.

NTFS-3G


NTFS-3G is an open source cross-platform implementation of the Microsoft Windows NTFS file system with read-write support. NTFS-3G often uses the FUSE file system interface, so it can run unmodified on many different operating systems.

NTFS-3G works on Linux, FreeBSD, NetBSD, OpenSolaris, BeOS, QNX, WinCE, Nucleus, VxWorks, Haiku, MorphOS, Minix, and Mac OS X.

Website : tuxera.com/community/ntfs-3g-download/

Mounting a Windows partition in Linux


You can mount a Windows partition (NTFS) in Linux as follows.

  1. Find out which is your Windows partition.
  2. Create a separate directory where you want to mount the Windows partition.
  3. Mount the partition at the directory created in the previous step.

The three steps are further explained below.

All the commands need to be run as root user or using SUDO.


Find out your Windows partition.

To find your Windows partition, run the following fdisk command.

# fdisk -l

It will list all the partitions in your machine. Note down which partition is formatted as NTFS. This is your Windows partition. For this example, lets assume the Windows partition is /dev/sda1 - Yours may be different.

Create a directory to mount the Windows partition

# mkdir /mnt/windows

Usual locations where you want to mount Windows partitions are /mnt and /media directories. You can choose one of the two.

Mount the Windows partition

Lastly, mount the Windows partition in the directory (/mnt/windows) we created in the last step.

# mount -t ntfs -o nls=utf8 umask=0222 /dev/sda1 /mnt/windows

Now your Windows partition is mounted and you have read and write access to all the data in your Windows partition in Linux.

0 comments: