LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to get NTFS read write support? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-get-ntfs-read-write-support-514497/)

J.W. 01-01-2007 12:37 AM

beta still means beta though, and as masonm correctly pointed out, using a beta version of anything in a production environment is IMHO irresponsible if not foolhardy. Of course, that statement applies a lot more to a corporate environment than a home PC, but even so, presumably if there is a need or desire to mount the NTFS partition, the data on the NTFS partition must have some value, and therefore should not be subjected to unnecessary risk of damage or loss.

The OP didn't furnish details about where/how this would be used, and given that even the ntfs-3g maintainers state that the software is in beta status, the ability to write to NTFS in Linux should continue to be considered as experimental. Granted, ntfs-3g may be quite reliable, but until it loses the beta label I would only consider it for use in a non-essential, test environment. Just my 2 cents

arindom 01-01-2007 01:32 AM

Quote:

Originally Posted by igu
Arindom quite probably hit a SELinux bug which is explained here with the solution: http://www.ntfs-3g.org/support.html#selinux

Ntfs-3g is quite widely used already and there isn't anything wrong with its reliability. In fact, most distributions already replaced the "stable" captive-ntfs with the "beta" ntfs-3g because it's miles ahead both in reliability and speed.

This has turned out to be a great learing experience for me and for those users who are trying to switch over to Linux.

Regarding the importance of data in my Windows partition, I have taken a backup and if something at all happens, I do not risk much. I have decided long ago that I am going to use Linux. So I have to take chances (if any).

As suggested here I am mentioning the steps taken by me to activate ntfs-3g in my system. As I have already installed ntfs-3g earlier, I am starting from the next step.

I am following the steps written here :

a) Changed
SUBSYSTEM=="block", GROUP="disk", MODE="0640"
as
SUBSYSTEM=="block", GROUP="disk", MODE="0660"
in /etc/udev/rules.d/50-udev.rules

b) Added my username by
$ usermod -a -G disk,fuse username

c) Changed permissions of the mounted NTFS directory :
$ chmod 777 /mnt/windows

d) As mentioned in SELINUX bug workaround :
Set SELINUX to "permissive" in /etc/selinux/config

e) Added this line to /etc/fstab:
/dev/hda1 /mnt/windows ntfs-3g dmask=022,fmask=133,noauto,locale=hu_HU.UTF-8,user 0 0

And then System reboot.

Result :
No error message in booting. But -
$ ls /mnt/windows
showing nothing

Tried in SU mode
$ ntfs-3g /dev/hda1 /mnt/windows

NOW IT IS WORKING. I have tried writing and that also worked.

So everything is ok except I have to give the ntfs-3g command everytime I boot? I will wait for your's suggestion.


I understand that ntfs-3g is in beta state and as because it is still having the beta tag the user runs the risk of using a beta software. But as correctly pointed out by J.W., it is the question of how much important data is there in my windows partition is the important factor. As I have taken a backup so I took the chance.

Thank you all for your help. Please help me to clear the last hurdle.

igu 01-01-2007 06:38 AM

Remove the 'noauto' option from the /etc/fstab line. It means don't mount during boot.

arindom 01-01-2007 08:38 AM

Quote:

Originally Posted by igu
Remove the 'noauto' option from the /etc/fstab line. It means don't mount during boot.

Thanks, now it is working correctly. :D

I would like to point it out here that while shutting down Fedora I am getting an unmount (audit) error. I can't read it properly because by then it is switching off. But from the language of the error message it seems if I unmount the windows partition before switching off then it would be better. Do I have to unmount the partition everytime before switching off? Please advise.

igu 01-01-2007 10:12 AM

Can you find anything in /var/log/messages? It seems you still have some SELinux bug. It's a very serious problem if you can't unmount filesystems during shutdown because you can easily lose data. This is true for any filesystem.

arindom 01-01-2007 10:19 AM

No there is absolutely nothing in /var/log/messages. It's blank.

igu 01-01-2007 02:28 PM

What's the error message when you type 'umount -a' as root? Anything new in /var/log/messages?

arindom 01-01-2007 09:35 PM

There is no error if I "umount /mnt/windows" (I am only unmounting the hda1 here). It is unmounting. Regarding the shutdown time messages all it is perfectly ok.

No there is still nothing in /var/log/messages.

As things stand now I have to manually unmount the Windows partition. Is it that way only?

igu 01-05-2007 10:59 PM

Update the selinux-policy package. It have fixed the SELinux bugs related to ntfs-3g. There shouldn't be even need for the Permissive mode anymore.

arindom 01-06-2007 06:52 AM

That's good news. I hope I can update the SELinux-policy package by yum extender/update utility. Thanks igu for your help all along this problem.

radu.miron 02-12-2007 08:52 AM

Yo...people...could you tell me How to mount my Windows partitions on FC6? I just want to read them, not write ...

Thanks!

berbae 02-12-2007 03:44 PM

Hello radu.miron
You should have opened a new thread to ask your question, as it is not related to read/write mounting of a ntfs partition.

But I will try to answer nevertheless.
1) look for the Windows partition on your disk :
in a root console do
fdisk -l <device>
from 'man fdisk'
Quote:

The device is usually one of the following:
/dev/hda
/dev/hdb
/dev/sda
/dev/sdb
(/dev/hd[a-h] for IDE disks, /dev/sd[a-p] for SCSI disks, /dev/ed[a-d] for ESDI disks, /dev/xd[ab] for XT disks).
A device name refers to the entire disk.
eg, on my machine 'fdisk -l /dev/hda' gives :
Périphérique Amorce Début Fin Blocs Id Système
/dev/hda1 * 1 3698 29704153+ 7 HPFS/NTFS
...

so the Windows partition is /dev/hda1 for me
2) create a directory where you want to mount that partition :
eg, mkdir /mnt/windows
3) try to mount it manually under root, running :
mount -t ntfs /dev/hda1 /mnt/windows
change the partition and the directory accordingly.

PTrenholme 02-12-2007 05:03 PM

Two things:

1) To use fuse (which ntfs-3g does), you should be a member of the fuse group.
2) selinux can not parse a filesystem name containing a dash. Thus:
..2a) You can not use ntfs-3g unless you set selinux to "permissive" mode.
..2b) While you should review the selinux audit logs for intrusion attempts, etc, when you're running in "permissive" mode, the messages re "fuse" and "ntfs-3g" are expected, and can be ignored.

radu.miron 02-15-2007 05:40 AM

Thanks for the quick answer man...I succeeded in mounting my ntfs partitions, but....after I restart, they aren't mounted anymore, and when the system checks whether all it's components are OK( just after the boot loader ), it says right there that he couldn't mount the partitions because smthing with FUSE...(I didn't memorize the entire error). The thing is that I added in the file /etc/fstab the lines( sda1 & sda5 being my windows partitions ) :
[HTML]/dev/sda1 /media/c_drive ntfs-3g ro,defaults,umask=0222 0 0
/dev/sda5 /media/d_drive ntfs-3g ro,defaults,umask=0222 0 0 [/HTML]
But it seems not working, so every time I start the system, I hae to manually remount my ntfs partitions :|

PTrenholme 02-15-2007 08:33 AM

See if you can find the error message in /var/log/messages. I suspect that the message is that your fuse kernel module is an older version, and that ntfs-3g requires version 2.6.3 to work (more) reliably. On my Fedora system, I had to compile that version from source since the Fedora project hasn't yet updated their distributed version.

For what it's worth, my fstab entry looks like this:
Code:

$ cat /etc/fstab | grep ntfs
/dev/hda1              /ntfs/c            ntfs-3g rw,uid=root,gid=disk 0 0

I notice that you're mounting the filesystem "ro." If you don't need write access, the drivers from the ntfs-project are (slightly) easier to install and use. (Just search for "ntfs" in your repository.


All times are GMT -5. The time now is 12:18 PM.