Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
03-10-2005, 02:13 PM
|
#1
|
Member
Registered: Nov 2004
Location: Texas
Distribution: openSUSE 10.3, Yoper Linux 3.0 , Arch Linux 2007.08
Posts: 253
Rep:
|
HOWTO - Write Access to NTFS Partitions
Great news! I have just achieved full write access to the Windows XP NTFS partition on my dual boot MDK 10.1 / Win XP computer. I know that this is a bit of a "holy grail" and I thought I would pass along the winning "recipe" to the group, lest others wish to use it.
The secret is using a package called "captive", short for captive-ntfs. Captive uses Windows' own ntfs drivers, via a wine-like set of interfaces which allows them to run successfully on top of MDK (most linux distros in fact). Because it uses Windows' own drivers, it is uncondititionally safe.
To get captive, go to
http://www.jankratochvil.net/project/captive/
and download captive-static-1.1.5-0.i386.rpm
I did this on my Mandrake 10.1 CE system, and so can't vouch for other Mandrake versions, but I suspect that the following will work on any 10.x Mandrake (and it says it has been verified on Mandrake 9.1 as well).
To use captive:
1. su to root
2. Make sure that you have your NTFS windows C: drive mounted
3. Install the captive rpm, via "rpm -Uvih captive-static-1.1.5-0.i386.rpm"
This will seem to take a long time, and you will hear your hard drive being accessed a lot. This is because as part of the install, this package searches your hard drive to find the existing Window's NTFS drivers (that is why there is a need to have the Windows C: drive mounted before you do this).
4. When done, check that the drivers you want were found via the following command (still as root)
captive-install-acquire
This should pop up a window showing all of the drivers that were found, and offer to scan your hard drive for more. In my case, it listed all the right drivers. I clicked Next to have it scan anyway - I would recommend against this, if all the right drivers were found anyway - in my case it got stuck here, and I had to kill the process.
5. Update /etc/fstab:
- the install of the captive package updates your /etc/fstab, backing up your original to /etc/fstab.pre-captive
- the /etc/fstab update is a little brain dead - it just adds a new line at the bottom, but doesn't delete the original Mandrake fstab line for your windows drive. Delete it now.
- In its default state, the line added to fstab only grants root write access to the NTFS partition. To fix that, I added the keywords "gid=users,uid=my_userid" (where I put my actual userid in place of "my_userid") to the fstab line, and made a few other changes.
Here is the final fstab line I am working with (my userid is "emcee"):
/dev/hda1 /mnt/win_c captive-ntfs auto,rw,gid=users,uid=emcee,users 0 0
Save off fstab.
That's it! You are now ready to use captive-ntfs. To do this, either restart or do the following:
a) unmount your Windows NTFS partition if it mounted, and then issue the above command as root:
b) mount /mnt/win_c
Either of these two actions will result in your /mnt/win_c now using the captive-ntfs drivers.
You should now be able to cd to /mnt/win_c, and do an "ls -al" and observe that all of the files are owned by group "users" and user "emcee" (of course, you would have substituted your own userid in the /etc/fstab entry, and so your userid would show up not mine!).
You can now freely create, delete, copy, etc. files on the NTFS partition. Because you are using Windows' own drivers, you are assured that you will not damage the partition.
Have fun!
|
|
|
03-10-2005, 04:14 PM
|
#2
|
Senior Member
Registered: Sep 2004
Location: Outlying D.C.
Distribution: Mandriva
Posts: 2,090
Rep:
|
Yes, it works just fine with 10.1 Powerpack & Retail.
I've been using it this way since 10.1 came out.
Good writeup.
|
|
|
03-14-2005, 10:02 AM
|
#3
|
Member
Registered: Nov 2004
Location: Texas
Distribution: openSUSE 10.3, Yoper Linux 3.0 , Arch Linux 2007.08
Posts: 253
Original Poster
Rep:
|
Hold the presses! I seem to have spoken too soon.
While everything appears to work just fine, when I boot into Win XP, the files and/or directories I created do not show up. Thinking I perhaps has older NTFS drivers on my Win XP setup, I even forced the captive-install-acquire to download new ones, but the same result. I have tried it using the default fstab that captive installed and the modified one I wrote about in my first post. No joy either way. The files copy over and look great from MDK, but don't show up under Win XP.
Has anyone encountered this? Any thoughts on how to resolve it? It sure would be nice to be able to write to that Win XP partition. Thanks.
|
|
|
03-19-2005, 11:31 AM
|
#4
|
LQ Newbie
Registered: Mar 2005
Location: Málaga, Spain
Distribution: Linux Mandrake 10.1
Posts: 3
Rep:
|
Same thing to me.... żanybody can help us?
|
|
|
03-19-2005, 11:36 AM
|
#5
|
Senior Member
Registered: Sep 2004
Location: Outlying D.C.
Distribution: Mandriva
Posts: 2,090
Rep:
|
Did you set the writes to "sync?" on that partition?
Otherwise Linux will cache all writes to the NTFS volume, and because of the Windows Driver involved, never seems to actually flush the write cache.
I remember running into this problem too.
|
|
|
03-19-2005, 05:00 PM
|
#6
|
Member
Registered: Nov 2004
Location: Texas
Distribution: openSUSE 10.3, Yoper Linux 3.0 , Arch Linux 2007.08
Posts: 253
Original Poster
Rep:
|
Thanks, no I hadn't done that. I will give it a try and see what happens.
In the meantime, I seem to have discovered that if I create a top level directory entry on the NTFS volume, and confine my writes to there, all is well. My initial tests were WAY down in the directory hierarchy, and I decided to try one from the top just as a test. It seemed to work out just fine. Hope use of the "sync" option make the rest of it work well. Thanks again.
|
|
|
03-19-2005, 05:23 PM
|
#7
|
Member
Registered: Nov 2004
Location: Texas
Distribution: openSUSE 10.3, Yoper Linux 3.0 , Arch Linux 2007.08
Posts: 253
Original Poster
Rep:
|
That did it! I unmounted and remounted my NTFS volume, this time specifying the "snyc" option, and it worked like a champ. I created a directory and file WAY WAY down in the NTFS file tree, and then rebooted over to Windows. There is was! Using "sync" seems to have done it.
For everyone else out there, you can do this one of two ways:
1) fstab
Simply add "sync" to the list of options I specified in my first post on this (same area where I had reported setting the "rw", "gid" and "uid" options - just add ",sync" to the end of that list
2) Manually mounting (unmount first, then remount with the right options)
# umount /mnt/win_c
# mount -t captive-ntfs /dev/hda1 /mnt/win_c -o rw,sync,gid=users,uid=emcee,users
That did it for me! Of course, you will need to substitute your own userid where I show "emcee" in the above line, and use the appropriate disk for your system where I show "/dev/hda1" in the above line.
Thanks for the tip!
|
|
|
03-19-2005, 05:36 PM
|
#8
|
LQ Newbie
Registered: Mar 2005
Location: Málaga, Spain
Distribution: Linux Mandrake 10.1
Posts: 3
Rep:
|
Cool, i'll try too  thanks for the help 
|
|
|
03-20-2005, 02:15 AM
|
#9
|
Senior Member
Registered: Sep 2004
Location: Outlying D.C.
Distribution: Mandriva
Posts: 2,090
Rep:
|
No problem!
|
|
|
03-20-2005, 07:50 AM
|
#10
|
LQ Newbie
Registered: Mar 2005
Location: Málaga, Spain
Distribution: Linux Mandrake 10.1
Posts: 3
Rep:
|
I tried, but...
Hey guys, still not working for me  this is the my line added to fstab....
/dev/hda1 /mnt/win_c captive-ntfs rw,sync,gid=users,uid=zen,users 0 0
Do you see something wrong here?
Regards, Zen
P.D. Lol, i just realized i've forgotten de parameter 'auto'... I have added it but still it isn't working....
Last edited by Zendar; 03-20-2005 at 08:02 AM.
|
|
|
03-20-2005, 01:13 PM
|
#11
|
Member
Registered: Nov 2004
Location: Texas
Distribution: openSUSE 10.3, Yoper Linux 3.0 , Arch Linux 2007.08
Posts: 253
Original Poster
Rep:
|
One last thought. If you unmount the drive manually (i.e. su to root and umount /dev/hda1) that *should* force Mandrake to flush the disk buffer, no matter what options you have specified on the fstab line. Try that and see. I have to admit that my trial with the sync option was done manually; I haven't gone back to the fstab version yet, since I don't want to write to that NTFS volume all that often. Try manually unmounting before booting to Windows and see if that helps.
|
|
|
03-21-2005, 04:21 PM
|
#12
|
LQ Newbie
Registered: Mar 2005
Posts: 3
Rep:
|
Hya,
I recently installed Suse 9.2 on my machine, and was trying to have write access to my windows drive.
I followed all the instructions above and it seems to work fine up to the 'restart' point.
I restarted, tried, still no write access
Went to check my mounted drives and none were there
entered:
mount -t captive-ntfs /dev/hda1 mnt/captive-noname -o rw,sync,gid=users,uid=ST,users
as advised and get the following message:
Mount point directory not a valid directory: mnt/captive-noname at /sbin/mount.captive-ntfs line 47.
Went to:
/sbin/mount.captive-ntfs line 47.
and that looks like chinese to me
Any advice please
 btw: very green newbie here, so please speak slowly
Cheers,
Steph
|
|
|
03-21-2005, 05:06 PM
|
#13
|
Senior Member
Registered: Sep 2004
Location: Outlying D.C.
Distribution: Mandriva
Posts: 2,090
Rep:
|
Syntax error!
mkdir /mnt/captive-noname
mount -t captive-ntfs /dev/hda1 /mnt/captive-noname -o rw,sync,gid=users,uid=ST,users
Or
mkdir /mnt/captive
mount -t captive-ntfs /dev/hda1 /mnt/captive -o rw,sync,gid=users,uid=ST,users
Notice the slash in front of /mnt ?
It's needed.
|
|
|
03-22-2005, 04:23 AM
|
#14
|
LQ Newbie
Registered: Mar 2005
Posts: 3
Rep:
|
Thanks
Feeling very blonde now, how well....
Although mounting my drive again + restarting still hasn't given me write access to them...
Any idea?
Cheers,
Steph
|
|
|
03-22-2005, 05:34 AM
|
#15
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,340
|
Hate to rain on everyones parade, but this is not safe.
From the captive site;
Quote:
Mounting of NTFS devices usually works, but is no longer supported by the author of Captive.
|
Your data, your decision ...
Me, I mount read only.
|
|
|
All times are GMT -5. The time now is 02:32 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|