# how to mount windows partition(ntfs)?

## vito_huang

i am new to gentoo, just installed it a day ago, because i dual boot with windows xp, and all my songs are in windows xp's ntfs partition. and i want to mount it so xmms can play the songs. i have search for the forum for instaling ntfs , but not much information tell how to make it working, so can anyone point me some direction on how to mount ntfs partition.

by the way, i am using genkernel all the configure kernel when i install it. and i have try to emerge ntfsprogs, but after finish emerge i can't find some of the tools( after emgerge ntfsprogs, i try to use ntfsmount command, but it said command not found, where doesn ntfsprogs and it's tools installed to????). here is my thought cause i have check filesystems under /proc(cat /proc/filesystems) and there is no ntfs in there, so i think i will need a ntfs driver for kernel first , but i don't know how to find it?( i have look at linux-ntfs.org but the driver for kenerl is for 2.4 kernel and other things are mostly for redhat).

----------

## voytas

```
mount -t ntfs /dev/hdXY /mnt/DIR
```

replace XY adn DIR with proper values  :Smile: 

----------

## vito_huang

thanx voytas for answering my quesitons.

there is some things that i don't understand, why when i check /proc/filesystems and there is no ntfs in there, but after i mount it i can see ntfs is there?  and i have emerge ntfsprogs, why i can't use and tools like ntfsmount etc? one last question, i thought it need ntfs kernel driver  to be able to mount ntfs (gentoo come with ntfs support?) , is this means when you do genkernel all, it will compile ntfs modules ?

----------

## nadi

 *Quote:*   

> why when i check /proc/filesystems and there is no ntfs in there, but after i mount it i can see ntfs is there? 

 

you can automount the NTFS partition with the correct values in the /etc/fstab file (check the gentoo documentation)

Nadi

----------

## ashtrash

I have question a bit according to this. 

I've configured automount for windows-ntfs in fstab, but it always have permission 400 even though i use defaults. I tried to use rw,auto, user,nls=utf, but it still doesn't allow me to read/open or execute it as a common user (still 400). Of course i have in-kernel support for ntfs, ntfs-rw. 

So at the moment the windows part looks like that:

```
/dev/hda1       /mnt/windows    ntfs    rw,auto,user,nls=utf8   0 0
```

comparing to very well working usb device:

```
/dev/sda1       /mnt/usb        auto    rw,noauto,user,exec,sync        0 0
```

what am I doing wrong?

----------

## vito_huang

if you want common user to be able to use ntfs, then i think you should set the umask to the value of you want. for example i have:

/dev/sda1    /mnt/windows   ntfs    user,umask=000      0 0

add more options to fourth colume of your desire.

hope this help

----------

## voytas

 *ashtrash wrote:*   

> Of course i have in-kernel support for ntfs, ntfs-rw. 

 first of all NEVER use ntfs-rw in linux  :Exclamation: 

it'll probably damage ntfs partition

vito_huang:

you need kernel module called ntfs

if U don't see ntfs in /proc/filesystems do

```
modprobe ntfs
```

and look again if still no, you'll have to compile ntfs kernel module  :Smile: 

you can use an fstab entry like mine:

```
/dev/hda2  /mnt/ntfs  ntfs dmask=007,fmask=317,ro  0 0
```

for more info

```
man mount
```

----------

## ashtrash

Masks don't change anything...

Actually reading ntfs works - but only under root, so support works fine. I can force 755 permissions under root, but:

1. It must be done with -r (it takes time)

2. It doesn't work on all files.

So there must be something that doesn't allow fstab to change permissions of hda1... But what?   :Confused: 

----------

## voytas

 *ashtrash wrote:*   

> Masks don't change anything...
> 
> Actually reading ntfs works - but only under root, so support works fine. I can force 755 permissions under root, but:
> 
> 1. It must be done with -r (it takes time)
> ...

 reading is fine, just don't try writing... 

for writing look for captive (in portage)

I told you to read man mount: *Quote:*   

> Mount options for ntfs 
> 
> iocharset=name 
> 
> Character set to use when returning file names. Unlike VFAT, NTFS suppresses names that contain unconvertible characters. Deprecated. 
> ...

 uid and gid is what you want

----------

## ashtrash

Thought manual was 4 vito_huang.

Anyway it doesn't help...

----------

## voytas

 *ashtrash wrote:*   

> Thought manual was 4 vito_huang.
> 
> Anyway it doesn't help...

 so you still have a problem  :Question: 

tell me exactly what it is...

----------

## ashtrash

I have windows automatically mouted in fstab, but it mounts without any permissions. I thougth it is 400 but as I see in Properties for /mnt/windows in kde I see it is 000. on chmod i get this msg:

```
chmod 644 /mnt/windows/

chmod: changing permissions of `windows/': Read-only file system
```

That's strange, because i have enabled rw in kernel (which of course from now I won't try to use). After this chmod nothing changes... weird, because some time ago it was changing permissions (but also only for reading).

At the moment my fstab windows line looks like that:

```
/dev/hda1   /mnt/windows   ntfs   ro,auto,user,nls=utf8,gid=410,umask=0555   0 0
```

Where 410 is id of group windows to which my user belong. I'm totally confused now with all these attributes. Theoretically defaults should enable reading for me but it doesn't. It's also said, that option user is required, but adding it doesn't help. Neither does umask=755 nor gid=410. What more can I do?   :Confused: 

----------

## voytas

 *ashtrash wrote:*   

> 
> 
> ```
> chmod 644 /mnt/windows/
> 
> ...

 that will never work, forget it *ashtrash wrote:*   

> At the moment my fstab windows line looks like that:
> 
> ```
> /dev/hda1   /mnt/windows   ntfs   ro,auto,user,nls=utf8,gid=410,umask=0555   0 0
> ```
> ...

 user is not needed, but you can experiment with umask, try different values, some time ago i had sam proble and found a sollution by experimenting with umask...

----------

## ashtrash

 :Laughing: 

Don't understand why it is as it is... but to have permissions like 555 for ntfs partition U have to set umask to 222. Funny  :Very Happy: 

voytas: Thanks for advice to test umask values.

----------

