Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Ubuntu 9.10 is out!!!

When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu.

The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely.

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
Thread Tools Display Modes
Old March 10th, 2006   #1
LKRaider
Way Too Much Ubuntu
 
LKRaider's Avatar
 
Join Date: Feb 2006
Location: Brasil
Beans: 244
Xubuntu 7.04 Feisty Fawn
Send a message via ICQ to LKRaider Send a message via MSN to LKRaider Send a message via Yahoo to LKRaider
Exclamation HOWTO: Mount NTFS volumes with write support

Please refer to this thread now: http://www.ubuntuforums.org/showthread.php?t=217009

This guide is outdated since there is a new and better ntfs supporting driver now.

======================

ATTENTION, OLD INSTRUCTIONS FOLLOW BELOW FOR REFERENCE ONLY! PREFER THE INSTRUCTIONS FOUND ON THE NEW THREAD:
http://www.ubuntuforums.org/showthread.php?t=217009


======================


As initially posted on the Wiki: https://wiki.ubuntu.com/Lkraider/NtfsFuse

Initial Remark:
Warning! Ntfs writing support is still experimental! You should not enable it on production machines and/or volumes you don't have backups of. Proceed at your own risk!
End of Initial Remark.

That being said, it is quite safe and if it fails to write something, will not corrupt your disk (unless there's a bug somewhere).

This initial part is for Breezy only, Dapper users already have the required packages
----
I - Install the necessary dependencies

Code:
bash:~$ sudo apt-get install libfuse2 fuse-utils
II - Get the latest ntfsprogs package

Note: You will be downloading these directly from the Dapper repositories, so they are safe to install.
III - Install the downloaded packages

Code:
bash:~$ sudo dpkg -i libfuse2_*.deb fuse-utils_*.deb ntfsprogs_*.deb libntfs8_*.deb
----

Dapper and Breezy instructions from here on:
Note: you can replace the "gksudo gedit" commands with your preferred editor (ex: "sudo nano", for instance)

1 - Add fuse to the list of modules to load

Code:
bash:~$ echo fuse | sudo tee -a /etc/modules
2 - Create a user group to access the ntfs disks

Code:
bash:~$ sudo addgroup ntfs
The output should look something like this:
Code:
Adding group `ntfs' (1002)...
Done.
Take notice of your group GID (the number printed after the group name), as it can differ for you and we will need it.
3 - Edit the fstab file to mount the disks

Make a backup of your current settings:
Code:
bash:~$ sudo cp /etc/fstab /etc/fstab.bak
Edit the fstab file:
Code:
bash:~$ gksudo gedit /etc/fstab
Find the line that currently mounts your ntfs partitons, and change them to look like this:
Code:
/dev/hda1    /media/hda1    ntfs-fuse    auto,gid=1002,umask=0002    0    0
Notice the use of the group's GID from before, and the umask to allow write access just to owner (root) and group (ntfs), and read access to everyone.
You could also use an umask=0007 to block all access for users not on the ntfs group.
4 - Add users to the ntfs group

Code:
bash:~$ sudo adduser username ntfs
Where username stands for the user you whish to add (replace it with a real username). Do this for all the users you want to be able to write to ntfs disks.
5 - Fix Dapper bug #29865 of the linux-ntfs package:

Code:
bash:~$ sudo rm /sbin/mount.ntfs-fuse && sudo ln /usr/bin/ntfsmount /sbin/mount.ntfs-fuse
----

If you reboot now, the disk will be writable to the selected users when they logon.

If you want the changes to take effect immediately without rebooting, execute these commands:
Code:
bash:~$ sudo modprobe fuse && sudo umount -a && sudo mount -a
(Ignore errors about "/" and others not being unmounted, it doesn't matter)
You'll have to logout from all your user sessions for the new group to be acknowledged (usually a logout from your graphical session and login back again will do it).

TROUBLESHOOT
1) If you get this error:
Code:
Couldn't mount device '/dev/hda1': Operation not supported
Windows did not shut down properly.  Try to mount volume in windows, shut down and try again.
Mount failed.
You will have to boot into your Windows OS and do a "chkdsk /f" (aka. scandisk) on the partiton that you are trying to mount. Currently, ntfsprogs can't check/fix the integrity of the partitions and will refuse to mount them if they are marked as dirty (ie. needing to be checked), so you'll have to do it from Windows.

2) You can't access the ntfs partitions from Nautilus anymore from the computer:/// places. This is a bug of Nautilus I think. You'll get an error like this:
Code:
Unable to mount the selected volume mount: according to mtab, /dev/hda1 is already mounted on /media/hda1
A workaround is manually creating a link from the mountpoint to your desktop for easy access.


3) If you want to check whether you are in the ntfs group, type:
Code:
bash:~$ groups
it will output all groups the current user is in. Example:
Code:
username adm dialout cdrom floppy audio dip video plugdev lpadmin scanner admin ntfs
4) If you partition/format the NTFS drive in Linux then the System Volume Information folder is not created and you must run chkdsk on it in order for it to work correctly. (as reported by glycerin)

Last edited by LKRaider; September 16th, 2007 at 05:19 PM.. Reason: Minor changes and added troubleshooting tips
LKRaider is offline   Reply With Quote
Old March 11th, 2006   #2
SSamiK
Just Give Me the Beans!
 
SSamiK's Avatar
 
Join Date: Jul 2005
Location: Jevnaker, Norge
Beans: 71
Send a message via MSN to SSamiK
Re: HOWTO: Mount NTFS volumes with write support

Hit a snag when trying to mount a NTFS disk...

ntfsmount: error while loading shared libraries: libntfs.so.9: cannot open shared object file: No such file or directory

SSamiK is offline   Reply With Quote
Old March 11th, 2006   #3
elsupermang
Just Give Me the Beans!
 
elsupermang's Avatar
 
Join Date: Feb 2006
Location: New York City
Beans: 15
Dapper Drake Testing/
Re: HOWTO: Mount NTFS volumes with write support

How fast is the read access compared to the read-only NTFS driver? I noticed with captive-ntfs the read access is way slower compared to the native linux NTFS driver
elsupermang is offline   Reply With Quote
Old March 11th, 2006   #4
briancrutin
Day Old Decaf
 
briancrutin's Avatar
 
Join Date: Mar 2006
Beans: 3
Re: HOWTO: Mount NTFS volumes with write support

big help! thanks!
briancrutin is offline   Reply With Quote
Old March 11th, 2006   #5
NMUrugbysteve
Just Give Me the Beans!
 
NMUrugbysteve's Avatar
 
Join Date: Aug 2005
Location: Berkley / Marquette, MI
Beans: 82
Ubuntu Jaunty Jackalope (testing)
Send a message via AIM to NMUrugbysteve
Re: HOWTO: Mount NTFS volumes with write support

Thanks for the howto, i'm having some troubles though. I've done everything step by step, have write access as root, but my user can't access anything. Any ideas as to why?
NMUrugbysteve is offline   Reply With Quote
Old March 11th, 2006   #6
elsupermang
Just Give Me the Beans!
 
elsupermang's Avatar
 
Join Date: Feb 2006
Location: New York City
Beans: 15
Dapper Drake Testing/
Re: HOWTO: Mount NTFS volumes with write support

you have to add users to your /etc/fstab like this:

/dev/hda1 /mnt/hda1 ntfs defaults,users,gid=users 0 0

you can then give the group read write and execute permissions
elsupermang is offline   Reply With Quote
Old March 11th, 2006   #7
NMUrugbysteve
Just Give Me the Beans!
 
NMUrugbysteve's Avatar
 
Join Date: Aug 2005
Location: Berkley / Marquette, MI
Beans: 82
Ubuntu Jaunty Jackalope (testing)
Send a message via AIM to NMUrugbysteve
Re: HOWTO: Mount NTFS volumes with write support

Quote:
Originally Posted by elsupermang
you have to add users to your /etc/fstab like this:

/dev/hda1 /mnt/hda1 ntfs defaults,users,gid=users 0 0

you can then give the group read write and execute permissions
Wouldn't that completely defeat the purpose of making the ntfs user group?
NMUrugbysteve is offline   Reply With Quote
Old March 11th, 2006   #8
muzaki
Just Give Me the Beans!
 
muzaki's Avatar
 
Join Date: Mar 2006
Location: JAPAN
My beans are hidden!
Ubuntu 6.06
Re: HOWTO: Mount NTFS volumes with write support

for a while ago i use captive from suse 10.0 which works great for writing on ntfs....
now i dont need it as i ve changed all my HD to fat
info on captive:

http://www.jankratochvil.net/project/captive/

try it
__________________

muzaki is offline   Reply With Quote
Old March 12th, 2006   #9
Peacepunk
Just Give Me the Beans!
 
Peacepunk's Avatar
 
Join Date: Mar 2006
Location: Cambodia
Beans: 81
Ubuntu 6.06 Dapper
Question Re: HOWTO: Mount NTFS volumes with write support

Quote:
Originally Posted by SSamiK
Hit a snag when trying to mount a NTFS disk...

ntfsmount: error while loading shared libraries: libntfs.so.9: cannot open shared object file: No such file or directory

Same for me. I must add that anyway, I cannot even read hda1.

Nor can I change read permissions or ownership: readonly file.

__________________
Hamlet - O, from this time forth, my thoughts be bloody, or be nothing worth !
Shakespeare "Hamlet" Act IV, Scene 4
Registered Linux user number 418565
Peacepunk is offline   Reply With Quote
Old March 12th, 2006   #10
shinygerbil
A Carafe of Ubuntu
 
shinygerbil's Avatar
 
Join Date: Aug 2005
Location: London, UK
Beans: 119
Dapper Drake Testing/
Re: HOWTO: Mount NTFS volumes with write support

I also cannot find libntfs.so.9 - I assume this is a Breezy thing. Although a quick hunt shows me that Dapper has libntfs.so.8, so I may be wrong.

Still, I would love to be able to get write access on my NTFS partition. It has a buggered install of XP, but too much data which I cannot backup (30+ GB) for me to format. But if I can use it like a normal hard drive (or at least write to it), then I would feel much happier

If anyone feels like enlightening us on this problem, don't hesitate

Steve


EDIT -- Well as soon as I wrote this one of my housemates wandered in - and aftr a brief conversation he's lending me his 30GB iPod to sort the problem out. Oh well. Still, for other user it would be a very useful tool!

Steve
__________________
It's a cow.

Last edited by shinygerbil; March 12th, 2006 at 01:13 PM..
shinygerbil is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

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

Forum Jump


All times are GMT -4. The time now is 04:39 AM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. lingonberry