Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Debian This forum is for the discussion of Debian Linux.


  Search this Thread
Old 11-07-2005, 06:27 PM   #1
LQ Newbie
Registered: Nov 2005
Location: Birmingham, UK
Distribution: Kubuntu 10.04 x64
Posts: 25

Rep: Reputation: 15
Question recompile kernel to read ntfs partition


I'm fairly new to linux and have just installed debian on my primary partition, however would like to access file on my ntfs secondary partition. I have WINE installed but understand that I need to recompile the kernel with the apropriate source module. So far I have downloaded the 'linux-2.4.26-ntfs-2.1.6b.patch' and have extracted it in my home folder. Also have downloaded kernel-source using apt-get and also installed kdb debug program incs I run into problems. However my knowledge of linux is limited and feel I'm in a bit over my head from here so would appreciate if someone could tell me where to go from here or point me in the right direction.

Thanks in advance,

Scotty b
Old 11-07-2005, 06:53 PM   #2
Registered: Apr 2004
Location: Europe:Salzburg Austria USA:Orlando,Florida;
Distribution: Debian
Posts: 643

Rep: Reputation: 32
if you installed the stock debian sarge kernel.all you need to do is mount the ntfs partition...

at root at the following to /etc/fstab

 /dev/Y/mnt/X ntfs users,owner,ro,umask=000 0 0
of course you must make to appropriate changes for you system as well as create a directory ffor this partition with mkdir

Last edited by utanja; 11-07-2005 at 06:55 PM.
Old 11-08-2005, 07:08 AM   #3
LQ Newbie
Registered: Nov 2005
Location: Birmingham, UK
Distribution: Kubuntu 10.04 x64
Posts: 25

Original Poster
Rep: Reputation: 15
Hmm Ok still need some help though, need things described in detail, still a bit shadey.

Now I've accessed the fstab in /etc/
and added the code above at the end of the doc, and created a new dir called 'ntfs' in /mnt/

What does that code actually do?
What do I have to do now?

Sorry but my knowledge is fairly limited.
Cheers for your patience.
Old 11-08-2005, 12:15 PM   #4
Registered: Dec 2004
Location: IN, USA
Distribution: debian etch
Posts: 402

Rep: Reputation: 30
Just to clarify, you need to change Y to the device name of your ntfs partition (ie. hdb1 or something like that) and you need to change X to the name of the directory that you created for mounting the partition. This is just telling the computer where you want to mount the windows partition and with what options. In the case of ntfs it will be read only. There is limited support for ntfs write, but you may have to recompile the kernel for this and it can be dangerous (may cause problems with your ntfs partition).

Then you just mount it
mount /mnt/X
cd /mnt/X
Also note that both windows and linux can read/write to fat partitions, so this may be another option for you. But if everything is already set up with ntfs, it could be hard to add a fat partition now.
Old 11-08-2005, 12:47 PM   #5
Registered: Apr 2004
Location: Stockholm, Sweden
Distribution: Debian 'sid'
Posts: 250

Rep: Reputation: 30
The kernels provided by Debian have read-only NTFS support present through the ntfs module.

As for the configuration in /etc/fstab regarding the mounting, the fields on the line are separated by whitespace (spaces, tabs) and have the following meaning:
The first field is the device name of the partition containing the NTFS filesystem you want to mount
The second field is the mount point - where you want it to be mounted.
The third field is what kind of filesystem it is that you want to mount, in this case NTFS which is specified as ntfs.
The fourth field is various mount options that can be specified.
The fifth parameter has to do with backups of ext2 filesystems. Just leave it at zero.
The sixth parameter has to do with order of filesystem checking. For these kinds of partitions it is common to leave it as a zero as well.

The mount point directories must exist prior to mounting.

The entries in /etc/fstab (that aren't marked noauto) are mounted at system bootup.
If you want to mount all filesystems specified in /etc/fstab (that aren't marked noauto), after boot (e.g. when just having edited /etc/fstab) you can do so by mount -a

Example from one of my systems:
/dev/hda5       /mnt/win2k      ntfs ro,uid=0,gid=50,umask=002  0       0
/dev/hda6       /mnt/winxp      ntfs ro,uid=0,gid=50,umask=002  0       0
/dev/hda5 is a partition containing an NTFS filesystem that is mounted on /mnt/win2k
/dev/hda6 is a partition containing an NTFS filesystem that is mounted on /mnt/winxp

As for the options, they are set as read-only (ro) although this driver does not even support write operations in the first place, and the owner of all files and directories is root (uid=0), and the group of all files and directories is staff (gid=50) and the permissions on all files and directories is set to 775 (umask=002) but actually due to the read-only nature the umask effectively becomes 222 (permissions of 555).
Old 11-08-2005, 08:24 PM   #6
LQ Newbie
Registered: Nov 2005
Location: Birmingham, UK
Distribution: Kubuntu 10.04 x64
Posts: 25

Original Poster
Rep: Reputation: 15
Hmm, well thanks people.
Your answers have made me have a big reconsideration.
My problem is that I need windows to run certain programs that are unmatched by any I have seen on Linux, for instance Photoshop and Flash, (I don't believe the GImp performs as well as Photoshop after seeing some results). However do want to ditch most of Windows as it always crashes and is resource hungry. I have two machines, a small old one I intended to set up as a linux web server, that I could remotely connect to with my top spec pc also running Debian (love the community idea) and have windows running in a window running my design software. Now I'm beginning to see how this may be harder than I first thaught, unless I step back onto Fat32 with a complete reinstall, what's your opinion may I ask, or have I gone too far of topic?


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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
recompile kernel for ntfs write? how? snip128 Linux - Newbie 3 07-13-2005 11:54 PM
how to recompile kernel for ntfs read only in Redhat * dj_prime Linux - Newbie 3 10-31-2004 11:43 AM
how do I recompile the KERNEL for NTFS in redhat 8? dj_prime Linux - General 2 10-31-2004 04:42 AM
linux-ntfs: recompile when kernel upgraded? luwigie Linux - General 3 08-28-2004 10:09 AM
why does my ntfs partition only read-only? kublador Linux - General 4 04-10-2003 01:50 PM > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 08:00 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