Left Menu



Howto Mount a NTFS (Windows) Partition

Most of the Linux Distributions are mounting NTSF Partitions by default. But what happens when the configuration scripts mess something up and you are not able to access your NTFS Partition only with double clicking on it ? We guess that most of the New Users will try just a regular mounting process, but what happens then ? You are getting an error :

NOTE: Always use sudo instead of executing commands as root (Super User):
kickar@linnewbies ~ $ sudo mount /dev/sda2 /mnt/gentoo

Password:
mount: unknown filesystem type 'ntfs'
kickar@linnewbies ~ $

To mount NTFS Partition you need ntfs-3g : ntfs-3g driver is an open source, GPL licensed, third generation Linux NTFS driver which was implemented by the Linux-NTFS project. It provides full read-write access to NTFS, excluding access to encrypted files, writing compressed files, changing file ownership, access right :

The current example is made on customized Gentoo Linux machine but it applies for over 220 other Linux Distributions :

The First thing you need to do is to make Sure you have FUSE enabled in your kernel otherway the compiling will fail: You can Find it Under File Systems --->

<*> Filesystem in Userspace support ? ?
? ? CD-ROM/DVD Filesystems ---> ? ?
? ? DOS/FAT/NT Filesystems ---> ? ?
? ? Pseudo filesystems ---> ? ?
? ? Miscellaneous filesystems --->

Now check for available versions in portage, for blocks or unsatisfied packages and compile it :

kickar@linnewbies ~ $ eix ntfs3g
[U] sys-fs/ntfs3g
Available versions:
1.2531 (~)1.2812 (~)1.2918 (~)1.5012 {debug hal suid}
Installed versions:
1.2531(04:41:56 02/08/09)(-debug -suid)
Homepage: http://www.ntfs-3g.org
Description: Open source read-write NTFS driver that runs under FUSE

kickar@linnewbies ~ $ sudo echo " sys-fs/ntfs3g ~amd64" /etc/portage/package.keywords
bash: /etc/portage/package.keywords: Permission denied
kickar@linnewbies ~ $

For that problem you can use either with sudo su either just su but remember to exit after that!

kickar@linnewbies ~ $ su
Password:
linnewbies kickar # echo " sys-fs/ntfs3g ~amd64" /etc/portage/package.keywords
linnewbies kickar # exit
exit
kickar@linnewbies ~ $ emerge -pv ntfs3g

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild U ]
sys-fs/ntfs3g-2009.3.8 [1.2531] USE="hal%* -debug -suid" 638 kB

Total: 1 package (1 upgrade), Size of downloads: 638 kB

kickar@linnewbies ~ $ sudo emerge ntfs3g
............................................... ( I have cut the compiling output)

kickar@linnewbies ~ $

When we have everything set up and running it is time to find our NTFS partition. We can do that with fdisk :

kickar@linnewbies ~ $ sudo fdisk -l

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.

Password:

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x39cb6c78

Device Boot Start End Blocks Id System
/dev/sda1 15597 15608 96390 83 Linux
/dev/sda2 * 192 15596 123731968 7 HPFS/NTFS
/dev/sda3 15609 15735 1020127+ 82 Linux swap / Solaris
/dev/sda4 15736 30401 117804645 83 Linux

Partition table entries are not in disk order
kickar@linnewbies ~ $

From this output We can see that our NTFS Partition is /dev/sda2. Let's mount it :

kickar@linnewbies ~ $ sudo mount -t ntfs-3g /dev/sda2 /mnt/Windows

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.

Password:
kickar@linnewbies ~ $

If there is no output everything is fine. Now you can access it either with konqueror either from terminal with the command cd /mnt/Windows
And you are all set. Now you have a read-write access to your Windows partition.


|Home | LinuXchange| Updates | Contact Us | About The Project | Unique Visitors| Sponsorship|