Click to See Complete Forum and Search --> : The mounting NTFS mini-HOWTO/NHF


Dun'kalis
08-17-2002, 11:50 PM
Check it out!

This is a very common question, and I think it requires a quick HOWTO. Its quite simple, really. Just follow my directions, and you'll be able to mount an NTFS drive anywhere.

First, we need to see if you can mount NTFS drives. An easy way is to, as root, type:

mount /dev/hda1 /mnt/windows -t ntfs -o,ro

Where the a is whatever device your NTFS is on, and the 1 is the partition. If it responds with an error about the mount point being non-existent, just type:

mkdir /mnt/windows/

If it doesn't mount, saying the filesystem is not supported, you need to recompile the kernel. This is outside of the scope of this discussion, but make sure to turn on the ntfs driver under File systems.

I'm going to assume it mounted. Lets add an fstab entry to make our lives easier. Mine looks like this:

/dev/hda1 /windows ntfs ro,user,noauto,umask=0007,gid=1000 0 0

So what does this all mean? The first entry is the device name, the second the mount point, the third the type, next the options to make it read-only, mountable by users, make sure it doesn't automount, grant read permissions, and the group id for the group who owns the mount point. The last two items, 0 and 0, are dump and pass, and it doesn't matter what they do.

Now, mount it as a user with the command

mount /windows

where /windows is your mount point. Congratulations. Your files in Windows are now at your penguin-loving fingertips!

Now, fly my monkeys!

Chris Richards/Dun'kalis
crichards1500@mindspring.com

I have the HTML file, if anyone wants it. Just ask, and I'll post it here as a .txt file.

EDIT: Typo.

X_console
08-18-2002, 12:48 PM
Good job. You should submit this as a Mini-NHF so it'll be easily accessible in the future. Just email an HTML copy over to newfiles@linuxnewbie.org

Dun'kalis
08-18-2002, 12:58 PM
Grr...Disconnected either before or after I sent it...Oh well, I'll find out later!

Dun'kalis
08-18-2002, 01:16 PM
STUPID MAIL! IT JUST SENT OFF A MESSAGE WITHOUT THE ATTACHMENT! AND EVOLUTION HATES ME!

Yes, I'm angry.

chris_i386
08-18-2002, 01:22 PM
Maybe its just overkill, but for some people it could be
helpful to have the following piece of information added:

The best way to control who is allowed to access mounted
NTFS drives is to create a new group ntfs:
addgroup ntfs
then open /etc/group with a text editor and find
a line concerning ntfs:
ntfs:x:??? where ??? is the group id of ntfs. Enter it into
your /etc/fstab file.
Now you just add everybody who should be able to acces NTFS
drives to your newly created ntfs group:
adduser username ntfs

Sastraxi
08-18-2002, 02:21 PM
Mine worked right off the bat in SuSE 8.0... all I had to do was change the fstab a bit.

But does anyone know WHY they haven't added write support for this? Any news on when the kernel will support NTFS full read/write?

Dun'kalis
08-18-2002, 03:22 PM
The reason they haven't added write support is because MS doesn't release any technical documents on NTFS for free. They have to reverse engineer it.

The Whizzard
08-18-2002, 03:33 PM
And what makes it worse is everytime they come out with a new version of Windows, a new version of NTFS is included.

NT4 = NTFS 4
W2k = NTFS 5
WXP = NTFS 5.1

Most of the current code in the NTFS drivers for linux are for NTFS 4.

X_console
08-18-2002, 09:52 PM
The front page says your NHF is up. :)

Dun'kalis
08-18-2002, 10:34 PM
Yup!

:D

luckysnafu
08-28-2002, 09:51 PM
i tried getting access to my NTFS files that are on my hard drive that contains win2k. i mounted the /mnt/windows and i edited the fstab to the following..

/dev/hda1 /windows ntfs ro,user,noauto,umask=0007,gid=1000 0 0

i can see the windows folder in the /mnt but no files/folders show up when i open it...it shows up empty...did i do something wrong? im pretty new to linux so i probably did something wrong...any ideas?

richjoyce
08-28-2002, 10:42 PM
/dev/hda1 /windows ntfs ro,user,noauto,umask=0007,gid=1000 0 0

you need to edit this line to your needs

/dev/hda1 - which device is your NTFS drive

/windows - the mount point...should be /mnt/windows (or whatever you want)

ntfs - dont change this :)

and just leave the rest too....

The Whizzard
08-29-2002, 01:01 AM
Also, since you have noauto, you must manually mount the partition. mount /mnt/windows should do the trick. If you want it to automaticaly mount at boot, change noauto to auto.

robertb
08-29-2002, 05:31 PM
Sorry if this is a silly question, but is it possible to add NTFS support as a module rather than recompiling the kernel ? My RedHat 7.3 distribution does not appear to have NTFS support by default,

Thank's

richjoyce
08-29-2002, 10:02 PM
i use it as a module, just type in

modprobe ntfs

rybread
09-05-2002, 03:27 PM
i'm going through all these steps but when i add the fstab i get 'permission denied'. i'm using mandrake 8.2.

chris_i386
09-05-2002, 03:29 PM
You need to be root in order to be able to change your fstab.

rybread
09-05-2002, 04:38 PM
i forgot to mention that, i was in root. i got it to rec windows partition in root, but trying to change permissions for users, i get "permission denied" while loged in as root

chris_i386
09-05-2002, 07:13 PM
You tried to change the permissions of the mount directory, didn't you?
That doesn't work with windows drives.
You need to set the permissions for your windows drive in the /etc/fstab file.
Just add umask=0000 to the line mentioning your windows drive.
Then all users are allowed to access this windows drive.
You could also add umask=0007,gid=1000
This way not all users are allowed to access the drive, but only users who are a member of the group #1000.
Maybe just read this thread again, basically it has all been answered before.
Good luck!

nuggetman
09-06-2002, 11:45 PM
Here's what I added to fstab to mount my NTFS drives read only

/dev/hdf1 /mnt/c ntfs umask=000 0 0

chris54
09-08-2002, 09:32 AM
I just wanted to add that in Mandrake 8.2 all I had to do was create a windows directory using

mkdir /etc/windows

then i manually mount my NTFS (Win XP) partition using

mount /dev/hda1 /mnt/windows

it's that easy!