Feb 13, 2009

How to mount a NTFS partition on Debian

Sometimes, we need to used a Windows OS in another partition or disk, but, what happen when you want to share those files which are in the Windows partition?.  In the past, the most common file system architecture for Windows OS was FAT32 but right now everything has change and the most common file system for Windows OS is NTFS. This file system was the standard of Windows NT, introduced by 1993, and it's still used for Windows XP/Vista/7.
Let's mount a NTFS partition of Windows Vista (could be any Windows OS using NTFS) in our Debian GNU/Linux Lenny as only read.
First, make a new folder which will contain your Windows files:
$ mkdir /home/your_user/windows

Then, as root, check the partition name that you want to mount:
# fdisk -l | grep NTFS
/dev/sda2   *           7       19129   153600000    7  HPFS/NTFS

In my case, the partition is sda2.  Now, as root, mount the partition in the new folder, with only read permission for user UID=1000:
# mount -t ntfs /dev/sda2 /home/your_user/windows/ -o uid=1000
(You got to check the UID for your user and be sure which is your UID before make the last command).

It's done, you will see in /home/your_user/windows/ everything that is in your Windows partition.

Jose A. Viana

No comments:

Post a Comment