LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   How To Add Ntfs Support (https://www.linuxquestions.org/questions/debian-26/how-to-add-ntfs-support-350899/)

XSquire 08-07-2005 03:31 PM

How To Add Ntfs Support
 
I have just installed Debian and I need to access the windows partitions.

I installed "ntfsprogs" and its dependencies, but it still doesn't recognize NTFS, therefore I have no mount options. Do I need to recompile the kernel??? If so, how? Debian includes the Synaptic Package Manager, would simply reinstalling the kernel be enough????

If I'm wrong, then How do I enable NTFS Support in Debian???

makuyl 08-07-2005 03:47 PM

AFAIK you should be able to mount an ntfs partition even without ntfsprogs.
See if ntfs support is in the kernel: gunzip < /proc/config.gz |grep NTFS
or: grep NTFS /usr/src/linux/.config
or: grep NTFS /boot/config-some_version
If it says CONFIG_NTFS_FS=m it's a module and can be loaded with: modprobe ntfs
for a more permanent loading use modconf.
How are you trying to mount anyway?

demian 08-07-2005 04:25 PM

Quote:

Originally posted by makuyl
gunzip < /proc/config.gz |grep NTFS

a bit off topic here but did you know there's zgrep?

zgrep whatever zipped.file.gz

also zless, zmore. zcat, zdiff and zcmp

All part of the gzip packages. Neat, eh?

XSquire 08-07-2005 04:25 PM

I haven't tried to mount anything yet, cause I can't find any NTFS support installed in the kernel to begin with :S, just tried to look for support using grep and still can't find it. As far as I have figured out I dont have support for NTFS installed in the kernel. I used cat /proc/filesystems and it lists all the fs supported and NTFS isn't on there :S

XSquire 08-07-2005 04:28 PM

What happens if I re-install my kernel using synaptic??? Do I screw it up??

demian 08-07-2005 04:34 PM

Quote:

Originally posted by XSquire
What happens if I re-install my kernel using synaptic??? Do I screw it up??
Did you try modprobe ntfs? If it comes back with module not found your kernel lacks ntfs support. Then (and only then) you will have to get a new kernel. Either build it yourself or use the pre-built kernel images that are available through apt (or synaptic). As far as I know all pre-built kernels come with the ntfs module.

XSquire 08-07-2005 04:42 PM

Yes I tried modprobe ntfs and nothing happend, I'm guessing that might mean that when I installed the system it came pre-compiled...so what should I do next to try to mount one of the partitions?

demian 08-07-2005 04:54 PM

Quote:

Originally posted by XSquire
so what should I do next to try to mount one of the partitions?
sounds like a great plan

XSquire 08-07-2005 04:59 PM

Yes, great idea. The thing is, how??

demian 08-07-2005 05:10 PM

mount -t ntfs /dev/hdXn /mount/point

The -t ntfs might not even be necessary. Maybe it's determined automagically. /dev/hdXn needs to be adjusted to suit your needs (hda1: first partition on primary master,....).

Might be worth putting an entry in /etc/fstab if you constantly mount this device. see man fstab and man mount

makuyl 08-07-2005 05:11 PM

Quote:

Originally posted by demian
a bit off topic here but did you know there's zgrep?

zgrep whatever zipped.file.gz
All part of the gzip packages. Neat, eh?

Heh, that is neat. Now that you mentioned it, I do remember it but habits die hard. Will probably change this one though, so thanks.

XSquire 08-07-2005 05:18 PM

Thx I got it working, still dont see anything anywhere that says the kernel has ntfs support, but I still got it thought.

Matty-J 10-04-2005 05:48 PM

Quote:

Originally posted by demian
mount -t ntfs /dev/hdXn /mount/point

The -t ntfs might not even be necessary. Maybe it's determined automagically. /dev/hdXn needs to be adjusted to suit your needs (hda1: first partition on primary master,....).

Might be worth putting an entry in /etc/fstab if you constantly mount this device. see man fstab and man mount

Hi,

I'm running into some problems as well. I did a cat /proc/filesystems and ntfs was listed. I also did a modprobe ntfs with no errors.

My problem arises when I try to do the actual mounting. If I do mount /dev/hda1 mount/windows it says that mount point mount/windows does not exist.

If i just try mount /dev/hda1 can't find /dev/hda1 in /etc/fstab or /etc/mtab.

I'm very new, especially to Debian, so I appologize if I'm just missing something. Any help would be great.

Thanks,
Matt

makuyl 10-05-2005 06:28 AM

It's usually /mnt/windows and not mount/windows , observe the missing / as well.
If the dir doesn't exist: mkdir /mnt/windows

Matty-J 10-05-2005 04:51 PM

Quote:

Originally posted by makuyl
It's usually /mnt/windows and not mount/windows , observe the missing / as well.
If the dir doesn't exist: mkdir /mnt/windows

Man, I feel dumb now. I got 'er to mount now, but how do I set permissions so that all users can access it, but not write? Currently only the owner (root) can access the drive.

Edit: I found notice I could use mount /dev/hda1 /mnt/window -o
and then enter either uid, gid, umask but I'm not sure what I'd put there.

Thanks,
Matt

makuyl 10-06-2005 01:31 AM

You could try something like this in /etc/fstab :
/dev/hda1 /mnt/window ntfs noauto,users,exec,ro,umask=000 0 0

If you want to set uid and gid use the following but umask already took care of permissions to read and execute.
/dev/hda1 /mnt/window ntfs noauto,users,exec,ro,uid=root,gid=users,umask=000 0 0

Matty-J 10-06-2005 07:34 AM

Hi,

thanks for your help, I'll try that tonight after work.

Should I add the ntfs support to modconf since I usually have to do modprobe ntfs to get it to work? Or does fstab take care of that?

Thanks,
Matt

makuyl 10-06-2005 08:44 AM

You can add it with modconf or manually to whatever file you use for loading modules. Perhaps under some file in /etc/modprobe.d/ or with 2.4 kernels /etc/modules.conf

Matty-J 10-06-2005 04:05 PM

Hi,

When I edited fstab, I got this after I exited:

Code:

Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

Any idea?
I entered
/dev/hdb1 /mnt/window ntfs noauto,users,exec,ro,umask=000 0 0
into fstab.

Thanks,
Matt

makuyl 10-06-2005 04:17 PM

The error has nothing to do with what you typed in fstab, but rather how you edited it. It is often easiest to use a console editor to edit files as root. "apt-get install nano" and as root type "nano /etc/fstab", nano is self explanatory at the bottom of the screen, ctrl-x to quit and so on. If you wish to use a gui editor as root, "apt-get install sux" and use sux instead of su to become root.

Matty-J 10-06-2005 04:38 PM

HI,

I was using vi, is that not good enough?

Also, now the filesystem is mounted when the computer starts up, but I still can't access it. If I try through Konqueror, it says it doesn't exist. If I try through Konsole as root, I can get into the directory, but ls doesn't bring up anything.

Any ideas?

Thanks,
Matt

Edit: I'm not sure, but I don't think fstab mounted it properly because I can still actually use the mount command to mount /dev/hdb1 to /mnt/windows. If I do this, I'm then able to see all the files in the directory... Still can't access with a normal user though.

makuyl 10-07-2005 02:46 AM

It shouldn't be automounted on bootup while you have the noauto option for it in fstab. Change it to auto if you like.
What does the command "mount" say about it?
What are the permissions on the mountpoint? Writable to users?


All times are GMT -5. The time now is 03:29 PM.