Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 11-21-2002, 10:26 AM   #1
LQ Newbie
Registered: Nov 2002
Posts: 5

Rep: Reputation: 0
Mount ntfs drive (problem with the kernel)

Hello everyone!

Yesterday I instaled the redhat 8.0 in my computer. Everything work fine, excepted when I was mountinf my win xp drive.

When I make "mount -t ntfs /dev/hda1 win"
I get the response that the kernel doesn't have the ntfs type.

Am I doing something wrong in the mount, or is it a problem of the kernel?

Old 11-21-2002, 10:31 AM   #2
LQ Guru
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 245Reputation: 245Reputation: 245
You most likely don't have NTFS support in the kernel by default.

Search this forum, this is covered alot with tons of good information right under your nose. Have any other questions, feel free to ask away.
Old 11-21-2002, 11:03 AM   #3
LQ Newbie
Registered: Nov 2002
Posts: 10

Rep: Reputation: 0
Red Hat: A quick way to enable NTFS Support

This worked great for me. Change the paths to reflect your kernel version.

Red Hat: A quick way to enable NTFS Support (text only version)

Created: June 9, 2002
Modified: June 20, 2002
Author: Jim Hayward
Author E-mail:
Copyright 2002, Jim Hayward. All Rights Reserved.
Distro Specific: Red Hat Linux

Relevant Links:

Title: Red Hat: A quick way to enable NTFS Support
Section: Distribution Specific
Sub-Section: Red Hat Linux

What is NTFS?

NTFS is the filesystem used by Windows NT, Windows 2000, and Windows XP.

Why didn't Red Hat enable NTFS support in their kernels?

Editors note: Anton Altaparmakov, the ntfs maintainer, took offense to my stating that read only support can cause data corruption problems. You can read his e-mail to me here

My prior statement was not in any way meant to be offensive to him, so I have removed the passage he objected too. However, in the past even while using read only support the ntfs module has been known to cause filesystem corruption. Enabling write support for the ntfs module, WILL EAT YOUR DATA!

Why is NTFS support poor under Linux?

Microsoft chooses not to release the information necessary to write a driver to access the NTFS filesystem for operating systems other then Windows. This basically makes writing a driver a case of trial and error.

This may lead you to ask the question, "Then why is Linux support for FAT and FAT32 filesystems any good?". The NTFS filesystem is a lot more complex then FAT and FAT32, thus making it harder to write a driver.

Alternatives to using NTFS support

Create an FAT32 (vfat) partition and store the data you need to access from Linux on it.

Is your system up to date?

I am going to assume you have updated your Red Hat 7.3 install with all of the currently available updates. Kernel version 2.4.18-5 is the latest official kernel available for Red Hat 7.3

Installing the kernel sources.

First check and see what kernel you are running. You must use the kernel source for the same kernel you are running.

[jimh@garfield jimh]$ uname -r

Check to see if you already have the kernel source installed with:

[jimh@garfield jimh]$ rpm -q kernel-source-2.4.18-5

If you don't have the kernel-source installed you will see:

[jimh@garfield jimh]$ rpm -q kernel-source-2.4.18-5
package kernel-source-2.4.18-5 is not installed

If the kernel source is not installed, download the source from your favorite Red Hat mirror site. You will need to be logged in as root to install the kernel source. Install the kernel source with:

rpm -ivh kernel-source-2.4.18-5.i386.rpm

If you are registered with The Red Hat Network you can also use up2date to install the kernel. This will download and then install the kernel-source for you.

up2date kernel-source

Preparing the kernel source

Login as the root user.

Change to the /usr/src/linux-2.4.18-5 directory
[root@garfield root]# cd /usr/src/linux-2.4.18-5

"make mrproper"
[root@garfield linux-2.4]# make mrproper

"make xconfig"
[root@garfield linux-2.4]# make xconfig

Load the default Red Hat kernel config that was used to compile the kernel you have installed.

[root@garfield linux-2.4]# rpm -q --qf '%{ARCH}\n' kernel-2.4.18-5

Click "Load Configuration from file"

Side note: Red Hat did not ship an i586 uniprocessor kernel with 7.3. If you have a uniprocessor i586 system the command above will probably return i386. Use the i386.config if it does.

You can look in /usr/src/linux-2.4.18-5/configs to see what the default kernel configs Red Hat uses to compile their kernels.

[jimh@garfield jimh]$ ll /usr/src/linux-2.4.18-5/configs
total 564
-rw-r--r-- 1 root root 39830 May 2 14:36 kernel-2.4.18-athlon.config
-rw-r--r-- 1 root root 39858 May 2 14:36 kernel-2.4.18-athlon-smp.config
-rw-r--r-- 1 root root 49146 May 2 14:36 kernel-2.4.18-i386-BOOT.config
-rw-r--r-- 1 root root 40020 May 2 14:36 kernel-2.4.18-i386.config
-rw-r--r-- 1 root root 39960 May 2 14:36 kernel-2.4.18-i386-smp.config
-rw-r--r-- 1 root root 39957 May 2 14:36 kernel-2.4.18-i586.config
-rw-r--r-- 1 root root 39897 May 2 14:36 kernel-2.4.18-i586-smp.config
-rw-r--r-- 1 root root 40021 May 2 14:36 kernel-2.4.18-i686-bigmem.config
-rw-r--r-- 1 root root 39968 May 2 14:36 kernel-2.4.18-i686.config
-rw-r--r-- 1 root root 40414 May 2 14:36 kernel-2.4.18-i686-debug.config
-rw-r--r-- 1 root root 39966 May 2 14:36 kernel-2.4.18-i686-smp.config
-rw-r--r-- 1 root root 35944 May 2 14:36 kernel-2.4.18-i686-uml.config
-rw-r--r-- 1 root root 40170 May 2 14:36 kernel-2.4.18-x86_64.config
-rw-r--r-- 1 root root 40170 May 2 14:36 kernel-2.4.18-x86_64-smp.config

In the dialog box type the full path to the config file you want to use.
Example: /usr/src/linux-2.4.18-5/configs/kernel-2.4.18-i686.config

Click "Ok" to load the config and exit the dialog box.

Click "File Systems"
Scroll down and find "NTFS filesystem support (read only)"

Click "m" to build NTFS support as a module.

Click "Main Menu"

Click "Save & Exit"

An informational dialog box will popup telling you to run "make dep"
Click "Ok"

Open the toplevel Makefile in a text editor. This would be /usr/src/linux-2.4.18-5/Makefile
Look at the first four lines in the Makefile.


Remove the word "custom" from the end of the EXTRAVERSION line.
Save the changes and exit

"make dep"
[root@garfield linux-2.4]# make dep

Compile the the ntfs module.

"make modules SUBDIRS=fs/ntfs"
[root@garfield linux-2.4]# make modules SUBDIRS=fs/ntfs

Create a directory for the ntfs module

mkdir /lib/modules/2.4.18-5/kernel/fs/ntfs

Copy the ntfs.o module to the directory you just created.

cp /usr/src/linux-2.4.18-5/fs/ntfs/ntfs.o /lib/modules/2.4.18-5/kernel/fs/ntfs

Set the permissions on the ntfs.o module to make sure they are correct.

chmod 0644 /lib/modules/2.4.18-5/kernel/fs/ntfs/ntfs.o

Update your modules.dep

/sbin/depmod -a

Thats it. You are now ready to use the new ntfs.o module.

Accessing your NTFS partitions

You will have to create a mount point and add an entry to /etc/fstab for the NTFS partitions you want to access.

There are many different options you can use to mount the partition depending upon your needs.

If you have a single user system or don't need to give others access to the partition, you can use this.
Replace "xxx" on uid and gid with your userid and group id.

/dev/hdc2 /mnt/windows ntfs noauto,user,uid=xxx,gid=xxx,umask=007 0 0

You can find out what your userid and groupid is with:

$ cat /etc/passwd | grep username

If you were using the above user, the /etc/fstab entry would be:

/dev/hdc2 /mnt/windows ntfs noauto,user,uid=500,gid=500,umask=007 0 0

Description of the options above.

noauto = Don't mount at boot

user = Allow an ordinary user to mount, but only the user who mounted it can unmount the drive.

uid = sets owner for the partition and the files on it.

gid = sets group for the partition and the files on it.

umask = sets the permissions on the partition.

The above mount options will not be correct for all situations. This is just an example.

For more information you should read the manpage for the "mount" command. This manpage explains the mount options available for the NTFS and other filesystems.

-->Additional Information

The Linux-NTFS Project

All software titles and services are copyrighted by their respective owners.
Old 12-03-2002, 08:10 AM   #4
Registered: Jul 2002
Posts: 33

Rep: Reputation: 15
hi undecipherable

as per your advice i did the same thing but this not work.
after giving a command "sbin/depmod -a" as root, it gives me an error "Unresolved symbol in module ntfs.o"

along with an ntfs drive i have fat drive also.

on my 40 gb of hdd i have 1 ntfs 1 fat32 and 2 ext3 partitions how can i access both the partitions from my linux

Thanks if you can help me

Old 12-03-2002, 08:52 AM   #5
LQ Newbie
Registered: Nov 2002
Posts: 10

Rep: Reputation: 0
Things to check/clarification points:

Make sure you run that "make mrproper" in the toplevel kernel directory first. This will clean out any old crap that might be tripping you up.

Second, make sure you've got the right kernel version. There may be several kernels on your system if you've done some upgrading -- And, subsequently, you may have to reperform these steps everytime you upgrade your kernel.

You can get the running version by typing: "uname -a" at the command line. Using this output, make sure you're in the proper /src directory and loading the proper configuration file within "make xconfig". The paths given in the HOWTO assume a certain kernel version which won't be applicable to you.

After you've set up and saved the configuration, don't forget to go into /usr/src/linux-2.4.18-5/Makefile and remove "custom" after the kernel version, before you try to make. Failing to do this may make the module look like it's for a different kernel than the one you're running.*

* Subsequently, I think I've actually had to add "smp" here to get it to compile correctly for my dual athlon system, but this may have been because I screwed up one of the earlier steps. If you are on an smp rig, I would suggest doing this as well. And also when you get to the copy stage, make sure you copy it into the smp-flavored modules directory.

Finally, make sure that you're copying the proper ntfs.o to the proper modules directory. This can be very confusing if you've several kernels lying around.

If none of that works, I'd check out any forums and/or mailing lists associated with, which is the source of this info.
Old 12-03-2002, 01:24 PM   #6
Registered: Aug 2002
Posts: 17,228

Rep: Reputation: 2217Reputation: 2217Reputation: 2217Reputation: 2217Reputation: 2217Reputation: 2217Reputation: 2217Reputation: 2217Reputation: 2217Reputation: 2217Reputation: 2217
Here is how to add NTFS support for RH 8.0
Old 12-04-2002, 12:20 PM   #7
Senior Member
Registered: Feb 2002
Location: Shanghai, CHINA
Distribution: RH 5.0,5.1 6.0,6.1 7.0,7.1,7.2,7.3.,8.0,9.0, RH Enterprise, Fedora C1, C2
Posts: 1,216

Rep: Reputation: 45
jesus christ, long damn threads!

okay, it's simple guys. First, you need to re-compile your kernel...get 2.4.20 since it just came out, and enable NTFS file system support in the kernel. Compile it, install it, and then boot it.


Next, .you need to mount the NTFS into /mnt/win

not just win

which means you need to make a folder with mkdir

in the /mnt folder called win

these are, in fact, the correct steps.

Last edited by zLinuxz; 12-04-2002 at 12:22 PM.
Old 12-05-2002, 05:40 AM   #8
LQ Newbie
Registered: Nov 2002
Posts: 5

Original Poster
Rep: Reputation: 0
First off all... Thanks to you all for quick replies.

I didn't have the time to experiment any off the solutions above, but for what I have read, the best think is to re-compile the kernel. My problem is that I don't have any ideia from where to begin! I think (and correct if I'm wrong) that the post from undecipherable is how to compile... But I would love if you told me a link to help/tutorial about compiling kernels.
Old 12-06-2002, 08:09 PM   #9
Senior Member
Registered: Feb 2002
Location: Shanghai, CHINA
Distribution: RH 5.0,5.1 6.0,6.1 7.0,7.1,7.2,7.3.,8.0,9.0, RH Enterprise, Fedora C1, C2
Posts: 1,216

Rep: Reputation: 45
here ya go, good luck.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
mount: unknown filesystem type 'ntfs' when trying to mount windows drive... DiZASTiX Linux - Hardware 12 09-28-2008 07:29 PM
How To Mount An NTFS Hard Drive TheHateCrew Linux - Hardware 4 09-14-2004 09:11 AM
How do I mount an NTFS drive? esv5454 Linux - Hardware 4 10-07-2003 08:25 PM
Cant mount NTFS Hard drive monkeymartin Linux - General 5 08-10-2003 09:35 PM
mount ym NTFS Drive kbhadsten Linux - General 2 09-11-2002 01:24 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:42 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration