Click to See Complete Forum and Search --> : Adding NTFS Support


Xpl0iT
02-03-2001, 07:28 PM
I currently run Storms (Debian) and also Boot Win2k. I need help finding out how to compile NTFS support into the kernel. I looked over the NHF and etc and no luck. I tried mounting it and etc and it said NTFS was not supported. Please help me and I'm very new.

Must read mp3s partition...

Whipping Boy
02-03-2001, 07:38 PM
When you do "make menuconfig", under "Filesystems" be sure you enable NTFS support (I believe it's read-only with the current kernel version)

spickus
02-03-2001, 08:21 PM
If you don't care to recompile try
insmod ntfs

The King Ant
02-03-2001, 08:23 PM
Yeah, you'll have to either recompile your whole kernel (there's an NHF and a howto and linuxdoc.org) or compile just the module.

I'm pretty sure there is a write option for NTFS, but it is dangerous, and you must have "Prompt for Development Stuff" enabled.

Ryeker
02-03-2001, 10:31 PM
Watch out. I don't know if Linux's NTFS code is compatible with Windows 2k's NTFS version 5. I don't even think Windows NT can read Windows 2000's NTFS partitions. Read-only would be advised.

Xpl0iT
02-05-2001, 07:10 PM
Thanks, the module is loaded and the partitions I want to be able to read are in /etc/fstab but I can only open them while I'm root. When I'm a user and look at them in KDE's filemanager the folders have locks on them and it won't let me open or list them. The 2 partition are /dev/hda1 and /dev/hda2 and in /mnt the dir's are "win" and "media"

Here are the 2 lines I have in /etc/fstab:


/dev/hda1 /mnt/win auto user, defaults 0 0
/dev/hda2 /mnt/media auto user, defaults 0 0

The King Ant
02-06-2001, 02:52 AM
You might try changing the permissions of the device itself (/dev/hda1 and /dev/hda2).

As root, something like:
chmod a+rwx /dev/hda1
chmod a+rwx /dev/hda2

This will give everyone read, write, and execute permissions to those drives. It's a bit insecure, but you should be okay on a home system.

Another way to do this is to create a group, say "win_user," add people that you want to be able to access the drive to this group, and then make the group ownership of the device "win_user."
So...
/usr/sbin/groupadd win_user
add the user to the group somehow, I usually just edit the /etc/groups file
chmod o-rwx /dev/hda1
chgrp win_user /dev/hda1

Then log out and back in, and the user than you added to the win_user group should be able to access the windows drive.

Mårten Olsson
02-06-2001, 07:57 AM
Can also set the permissions as options in fstab....

One of the posts said that you could compile just the specific module that intressts you.
Is there some how-to on this or other documentation, and do I still need to have the whole kernelsources on the disk???

The King Ant
02-06-2001, 12:39 PM
Yes, you need the whole kernel source. There might be another way to do it, but for me, I just do the same things I do for a normal kernel compile, only skip the "make bzImage" step. So, "make xconfig," choose module for whatever you want to compile as a module. Save and exit, make dep, make modules, make modules install (or you could just copy that 1 module over from wherever it is).

bdg1983
02-06-2001, 01:48 PM
Ummm, all these people talking about compiling a new kernel, and this is not the easiest thing to be doing for a newbie. Ill help you set it up in about 3 or 4 easy steps.

1. Go to this site( http://www.informatik.hu-berlin.de/~loewis/ntfs/ ) and download the ntfs kernel module source. Then you need to compile it as root, just check the INSTALL file included for the exact commands to run. I think you might need at least the kernel headers installed, or possibly the kernel source. After you have done this it should be in /lib/modules/2.X.X/fs depending on what kernel you are currently running.

2. Edit you /etc/fstab file as root and add the following line

/dev/hdxX /mnt/winnt ntfs ro,noauto,users 0 0

This will allow only read access to ensure you dont damage the data, will NOT mount it on boot, and will allow users to mount it. If you dont want users to mount it then remove the users part.

3.Add the line ntfs to some boot file to load at boot time. For redhat and others try /etc/modules.conf, or /etc/conf.modules (i think) and for slackware, uncomment the ntfs line that you will find in /etc/rc.d/rc.modules in the file system section. Alternatively you can simply add a line to a rc.local file. Such a line would be something like insmod ntfs or modprobe ntfs.

4. Time to test that your module is working and that you can mount your nt partition.

su
insmod ntfs

(should report that it is using the module)

mount /dev/hdxX

(where /dev/hdxX is the NT file system partition you specified in /etc/fstab)

cd /mnt/winnt

ls

And then you should see all of the files in your win partition.


Hope this all helps.

Oh yeah, and if you should get a module not found error when you insmod the ntfs module as i did, it might be because the install script put it somewhere odd. To remedy this you should do the following:

updatedb
locate ntfs.o
/will/report/some/path
mv /path/reported/above/ntfs.o /lib/modules/2.x.x/fs

where 2.x.x is you current kernel number.