Jump to content

NTFS Partition


Guest schastlivtsev
 Share

Recommended Posts

Guest schastlivtsev

Hi everyone!

I have Mandriva 2008.0 installed along with Windows.

I had three partitions made in Windows. They have the NTFS file system. As usual, Mandriva provides only an access facility to NTFS partitions.

As directed by many people, I made changes in the /etc/fstab file by changing 'ntfs' to 'ntfs-3g' and rebooted the system.

 

I was able to make changes in the drives now, EXCEPT FOR ONE PROBLEM....

 

All the data that was present in the drives was not being shown. The entire drive was blank. But I was able to access and chang the contents of the drives in Windows. But any change or anything wasn't being shown in Mandriva at all.

 

When I reverted back to 'ntfs' instead of 'ntfs-3g'... the things started working again as they used to. The data was being shown, and the "locks" on the drive icons had come back! And I was not able to change the contents but I could view them.

 

Do I need to install any separate drivers from the ntfs-3g.org site or likewise?

 

Please help asap!

Regards,

Schastlivtsev.

Link to comment
Share on other sites

Simply changing the wording from ntfs to ntfs-3g is not correct. You need to install the ntfs-3g and ntfs-config packages. If you have your sources setup you can type from commandline as root: urpmi ntfs-3g ntfs-config. If you don't have your sources setup then use the Easy-Urpmi link to the top right of this board to get started.

Link to comment
Share on other sites

You must first

1.Install fuse and ntfs-3g packages

2. Modprobe fuse and get sure this is done at system startup

3. Make the change at fstab from "ntfs" to "ntfs-3g"

4. If your system uses a locale different than English, you have to change the /sbin/mount.ntfs-3g symlink to get sure ALL existing files are visible. Replace it with something like

#!/bin/bash
/bin/ntfs-3g $1 $2 -o locale=en_US.UTF-8 #put your own locale here

Link to comment
Share on other sites

Normally, with ntfs-3g you don't need to put anything in /etc/fstab since udev/hal will do all the hard work. At least, on my install of Fedora 8 it does anyway.

Link to comment
Share on other sites

You must first

1.Install fuse and ntfs-3g packages

2. Modprobe fuse and get sure this is done at system startup

3. Make the change at fstab from "ntfs" to "ntfs-3g"

4. If your system uses a locale different than English, you have to change the /sbin/mount.ntfs-3g symlink to get sure ALL existing files are visible. Replace it with something like

#!/bin/bash
/bin/ntfs-3g $1 $2 -o locale=en_US.UTF-8 #put your own locale here

Apparently, this gives the write access to the root user only. To be able to write as a user, I changed umask=0022 to umask=0000.

Link to comment
Share on other sites

Apparently, this gives the write access to the root user only. To be able to write as a user, I changed umask=0022 to umask=0000.

 

The rest is done via a HAL rule... name the following "something.fdi" and put it at your HAL policies directory (in my case, /etc/hal/fdi/policy)

<?xml version="1.0" encoding="UTF-8"?> 
<deviceinfo version="0.2">
  <device>
 <match key="volume.fstype" string="ntfs">
   <match key="@block.storage_device:storage.hotpluggable" bool="true">
	 <merge key="volume.fstype" type="string">ntfs-3g</merge>
	 <merge key="volume.policy.mount_filesystem" type="string">ntfs-3g</merge>
	 <append key="volume.mount.valid_options" type="strlist">locale=</append>
   </match>
 </match>
  </device>
</deviceinfo>

Then, reboot or simply restart udev/hal

Now anyone can access removable and non-removable ntfs volumes as user, regardless of the desktop he/she is using.

Edited by scarecrow
Link to comment
Share on other sites

Nop. I changed umask=0000 back to umask=0022, and saved the above code as /etc/hal/fdi/policy/ntfs-access-policy.fdi. Reboot. No write access as user. Changed back to umask=0000, reboot, and I have full read/write access.

 

A related question. Now fuse fails to shutdown cleanly, i.e, when I shutdown I can see the message "Stopping fuse ...... FAILED". The same message "Stopping fuse ...... FAILED" appears when I put the laptop to standby. I will try later again to see if I can read/write after resume. Regardless of that my concern is whether this message is something normal at all, and what i should do to solve the problem.

 

Edit: A followup question regarding the above script. My ntfs partition is on the same HDD as the my linux partitions. Is it still "storage.hotpluggable", or should I change this somehow?

Link to comment
Share on other sites

Greetings all:

 

I followed the advise from the above posts and now have read/write capability on XP partition.

 

Here's what I did:

1. Installed NTFS-3g and libs.

2. Edited /etc/fstab to be as shown below: (the italics are what I changed)

 

/dev/hda5 / ext3 defaults 1 1
/dev/hda7 /home ext3 defaults 1 2
none /proc proc defaults 0 0
/dev/hda6 swap swap defaults 0 0
/dev/hda1 /media/hd [i]ntfs-3g umask=0000[/i],nls=utf8,sync 0 0			  <------ also removed "ro" from this line.
/dev/sr0 /media/cdrom auto umask=0022,users,iocharset=utf8,sync,noauto,ro,exec 0 0

 

3. Saved and rebooted.

4. Copied a test file to hda1 and then deleted same - no problems.

 

Thanks everyone.

 

Regards,

Randy3011

 

----

When all else fails, RTFM (or this case, the forum)

Link to comment
Share on other sites

Randy3011,

 

My fstab entry for the ntfs partition looks exactly as yours (except for the name of the mount point), and I don't have problems with reading/writing to the NTFS partition.

 

When I was installing ntfs-3g, I was also asked to install a package called fuse. The service is enabled on startup by default, but it does not shutdown cleanly, unless I manually unmount the NTFS partition (as root). This makes me think that something is not right.

Link to comment
Share on other sites

ntfs-3g is a userspace driver (and probably will never be a kernel module), and the fuse module is creating that "filesystem in userspace" the ntfs-3g driver needs to access your ntfs volumes.

I must admit my complete ignorance, I missed all this userspace thing... Would it be too naive to think that, thanks to this userspace thing, I should be able to mount/unmount/ read and write to /mnt/windows as user. Well, I can read/write after I removed umask altogether (thanks for the tip!), so I presume userspace thing has nothing to do with this - the default umask=0 gives all users permission to do whatever they want.

 

However, I cannot unmount /mnt/windows as user (it mounts from /etc/fstab on boot), and I cannot shutdown computer cleanly because stopping fuse fails. Fuse stops cleanly only if /mnt/windows is umnounted, and only root can do this. Where is the catch?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...