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

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

 
Thread Tools Display Modes
Old July 16th, 2006   #1
givré
May the Ubuntu Be With You!
 
givré's Avatar
 
Join Date: Apr 2006
Beans: 1,252
HOWTO: NTFS with read/write support using the ntfs-3g (easy & safe method)

Introduction :

Support of NTFS partition for linux has always been a problem. Projects exist since many years but was always experimental, and was claim to be not safe. On the 14th of July 2006, a developer of the linux-ntfs team, Szabolcs Szakacsits, revolution this area by releasing a new driver ntfs-3g which claimed to provide full read/write support for all NTFS partition. After months of successful testing by hundreds of thousands of users in beta status, ntfs-3g is now fully stable.

For more information on ntfs-3g : http://www.ntfs-3g.org/

But now you probably want to test this great new feature. So let's start.
Note : You could also use the different traduction of this Howto (ask me to add yours here ):
In french
In portuguese
In german
In spanish
In chinese

Before starting : Please read attentively the instructions, and don't do a simple copy/paste like a lot of people do. I propose 2 ways of configuring ntfs-3g, and if you don't read the instructions, you'll finish by doing the 2 (don't laugh, it happened to more people that you could expect)

1. Set up your sources :

To get the latest ntfs-3g, you will need first to add a repository to your source.list. Open a terminal and type:
Code:
gksu gedit /etc/apt/sources.list
At the end of the file, just add one of the following mirror:
Warning : This repo don't contain amd64 packages. See at the end the amd64 section for more informations.

Feisty users don't have to deal with additionnal repository, all is already in ubuntu repo.

For DAPPER :
Code:
deb http://flomertens.free.fr/ubuntu/ dapper main main-all
deb http://ntfs-3g.sitesweetsite.info/ubuntu/ dapper main main-all
deb http://flomertens.keo.in/ubuntu/ dapper main main-all
For EDGY :
Code:
deb http://flomertens.free.fr/ubuntu/ edgy main main-all
deb http://ntfs-3g.sitesweetsite.info/ubuntu/ edgy main main-all
deb http://flomertens.keo.in/ubuntu/ edgy main main-all
The main channel contains the latest ntfs-3g package and an up to date fuse package.

The main-all channel contains modified and unofficial version of pmount and hal (only for dapper) to have a better integration of ntfs-3g in the desktop, and to be able to use ntfs-3g with external device. It also provide a configuration tool, ntfs-config. If you want to configure your system manually and don't need integration in gnome or kde, you can disable this channel.

2. Installation :

Packages of my repository are authenticated with a gpg key. To use it, you should execute the following command :
Code:
wget http://flomertens.keo.in/ubuntu/givre_key.asc -O- | sudo apt-key add -
or
Code:
wget  http://flomertens.free.fr/ubuntu/givre_key.asc -O- | sudo apt-key add -
First, upgrade your system :
Code:
sudo apt-get update
sudo apt-get upgrade
Be carfull the choice is here
Now you have the choice between an automatic configuration (via ntfs-config) or a manual configuration.

3. Automatic Configuration :

If you go for the automatic configuration, install ntfs-config. It will automaticly install ntfs-3g :
Code:
sudo apt-get install ntfs-config
Now, it's rather easy. Just launch ntfs-config via the menu (in system tools) or via the terminal :
Code:
gksu ntfs-config
If your NTFS partitions are not yet configure, it will ask you to choose a name that will be use as mount point. Just put the name you want.
Then just enable write support for internal and/or external device, and that's all.

3(alternative). Manual Configuration :

If you go for the manual configuration, just install ntfs-3g :
Code:
sudo apt-get install ntfs-3g
When all is install correctly, we need to configure the NTFS partition to be mount by ntfs-3g.
External device are automatically configure when plug, so you don't need to do this part for them.
To know first the name of your NTFS partition, type in a terminal:
Code:
sudo fdisk -l | grep NTFS
you will see in the first colone, the name of your NTFS partition(s).
Now you need to configure them in /etc/fstab. We will also make a backup of this file. In a terminal, type:
Code:
sudo cp /etc/fstab /etc/fstab.bak
gksu gedit /etc/fstab
locate the line of your NTFS partition. If they are there, just change them so it looks like that:
Code:
/dev/<your partition>     /media/<mount point>     ntfs-3g     defaults,locale=en_US.utf8   0    0
(of course replace <your partition> & <mount point> by your configuration)
If your partition is not there, you'll have to first create a directory where you would like to mount it :
Code:
sudo mkdir /media/<the name you want>
and add a line at the end of the file like the one above.

Tips: You can change your locale option ( for ex locale=fr_FR.utf8 ). Execute 'locale -a' in a terminal to know which one are supported by your system.
Tips2: If you want to now more about the option available, have a look at 'man ntfs-3g'

Now remount all your drive
Code:
sudo umount /dev/<your partition>
sudo mount -a
or simply reboot.

4. Time to start :

Now some important point,
- Before using it, have a look at the WHAT YOU COULDN'T DO category.
- Look at the COMMON PROBLEM section before asking.

5.(optional) For own compile kernel

If you have compile your own kernel (not from the repo), fuse is probably not implemented. To check that:
Code:
modprobe -l fuse
If it return nothing, you will need to compile it yourself.
Install the source:
Code:
sudo apt-get install fuse-source
and have a look at /usr/share/doc/fuse-source/README.Debian to know how to compile it.

6. For amd64 users :

My repo don't contain amd64 packages so to use ntfs-3g for this arch.
For dapper, you'll have to complile the needed package yourself with those instructions
This will replace step 1 and 2, you'll have then to follow step 3 and 4.
For edgy, ntfs-3g is in universe, so you'll not need my repo, but to use NTFS external device, you'll need a modified version of pmount that i provide in my repo. To install it, follow those instructions

WHAT YOU COULDN'T DO :

The present limitations of this driver are
- access to encrypted files
- writing compressed files (reading is ok)
- change file ownership and access right

COMMON PROBLEM :

* The gnome Trash don't support neither ntfs filesystem nor fat32 filesystem, so when you delete files with nautilus, they don't go in the trash, but in an hidden directory, at the root of the partition, call .Trash-<username>. So to 'empty the trash', you'll have to show hidden files (<Ctrl><H>) and use the suppr function of nautilus on this directory (<Shift><Suppr>)

* Checking manually your partition in windows, chkdsk can report the bellow message :
Cleaning up N unused index entries from index $SII of file 0x9.
Cleaning up N unused index entries from index $SDH of file 0x9.
Cleaning up N unused security descriptors.
These messages are part of an optimization process which is
completely independent of ntfs-3g. Nothing to worry about them.

* If your external device don't show up on the desktop when plug, that could mean that it fails because of a wrong configuration, or an unclean device. To know what is the problem, you should mount it using the terminal, with :
Code:
pmount-hal /dev/sda1
Of course, replace /dev/sda1 by the name of your partition.
Post a message here if you don't know what to do.

* If your internal device is not mounted at boot time, try in a terminal :
Code:
sudo mount -a
* If you get this error :
Code:
$LogFile indicates unclean shutdown (0, 0)
Failed to mount '/dev/hdc1': Operation not supported
Mount is denied because NTFS logfile is unclean. Choose one action:
Boot Windows and shutdown it cleanly, or if you have a removable
device then click the 'Safely Remove Hardware' icon in the Windows
taskbar notification area before disconnecting it.
Or
Run 'ntfsfix' on Linux unless you have Vista, then mount NTFS with
the 'force' option read-write, or with the 'ro' option read-only.
Or
Mount the NTFS volume with the 'ro' option in read-only mode.
boot windows, and then shutdown and boot ubuntu (100% guarentee of success).
If you don't dual boot, get ntfsfix from the ntfsprogs package, run it on the windows device, and add the 'force' option in /etc/fstab for your windows device.

* More common problem ? look at the ntfs-3g FAQ : http://www.ntfs-3g.org/support.html

NEWS:

08 February 2007 :
* ntfs-3g is now RC1
21 January 2007 :
* Update of the latest ntfs-3g 0.20070118-BETA, and the latest fuse 2.6.1 in the main repo.
For the full ChangeLog, have a look here : http://ntfs-3g.org/releases.html
* New easy method to configure ntfs-3g via ntfs-config.
31 Octobre 2006 :
* New upstream release : ntfs-3g-0.20061031-BETA
- fix: unmount was asynchronous; full fix requires FUSE 2.6.0 as well
- fix: mount was denied if $MFTMirr was too small
- fix: option parsing was incorrect if there was no space between name & argument
- change: new software versioning
22 September 2006 :
* New upstream release : ntfs-3g-20070920-BETA
- fix: file creation at disk-full may lead to i/o errors
- fix: statistic of inodes and free inodes was incorrect (df -i)
- fix: the 'umask' option wasn't always parsed as an octal number
- fix: "too long filename" handling wasn't posix compliant
- fix: mount failed if $MFTMirr had unused garbage at the file end
10 September 2006 :
* New upstream release : ntfs-3g-20070910-BETA
- fix: rename was always denied if the target file or directory existed
- fix: renaming like 'foo' -> 'FOO' was denied in the WIN32 namespace
- fix: fuse kernel module is automatically loaded, no need for config
- fix: verbose mount error messages with hints for solutions
- fix: compilation failed with gcc 2.96
- change: top request: full read-write access to everybody by default
- change: file lookups are always case-sensitive


Wha, finish. If you have some problem, let a message, and share your experience
__________________
WARNING : Post with explicit contents
Join to "STOP monolithic all-in-one unmanageable application"
The wiki is your friend https://help.ubuntu.com/community/

Last edited by givré; January 23rd, 2008 at 07:28 PM..
givré is offline   Reply With Quote
Old July 16th, 2006   #2
plutoprime
Gee! These Aren't Roasted!
 
Join Date: Jul 2005
Location: Earth
Beans: 18
Send a message via ICQ to plutoprime Send a message via AIM to plutoprime
Re: HOWTO: NTFS with read/write support using ntfs-3g (easy method)

This actually worked... I'm .. amazed!! Thanks!

Code:
xxxx@Aida:~$ sudo mount -a
Couldn't set locale to en_EN.utf8 thus you may not see properly or at all some files.
I get that though .. but it all work still
plutoprime is offline   Reply With Quote
Old July 16th, 2006   #3
givré
May the Ubuntu Be With You!
 
givré's Avatar
 
Join Date: Apr 2006
Beans: 1,252
Re: HOWTO: NTFS with read/write support using ntfs-3g (easy method)

This locale is probably not supported for your system.
To know which one you can use, do:
Code:
more /var/lib/locales/supported.d/local
Ex:
Code:
fr_FR.UTF-8 UTF-8
en_US.UTF-8 UTF-8
so if you are american and want to use en_US.UTF8, just remplace locale=en_EN.utf8 with locale=en_US.utf8 in /etc/fstab

I will change the default to en_US since it is the more common option. Sorry guys from everywehere else
__________________
WARNING : Post with explicit contents
Join to "STOP monolithic all-in-one unmanageable application"
The wiki is your friend https://help.ubuntu.com/community/
givré is offline   Reply With Quote
Old July 16th, 2006   #4
Cyraxzz
Gee! These Aren't Roasted!
 
Cyraxzz's Avatar
 
Join Date: Jun 2006
Location: Western Eurasia
Beans: 199
Ubuntu 6.10 Edgy
Re: HOWTO: NTFS with read/write support using ntfs-3g (easy method)

Works perfectly here,

With external hard drives you just have to install this program no configurations were necessary.

Last edited by Cyraxzz; July 16th, 2006 at 04:10 PM.. Reason: typo error
Cyraxzz is offline   Reply With Quote
Old July 16th, 2006   #5
ZonedOut
Spilled the Beans
 
Join Date: Jul 2005
Beans: 14
Re: HOWTO: NTFS with read/write support using ntfs-3g (easy method)

I had done a previous tutorial to set up read/write support for NTFS. Now that I've done this tutorial (and everything is working well ) using ntfs-3g, do I need ntfsprogs anymore or is this replacing that?
ZonedOut is offline   Reply With Quote
Old July 16th, 2006   #6
givré
May the Ubuntu Be With You!
 
givré's Avatar
 
Join Date: Apr 2006
Beans: 1,252
Re: HOWTO: NTFS with read/write support using ntfs-3g (easy method)

You don't need it anymore, ntfs-3g is a total remplacement of the further method.
__________________
WARNING : Post with explicit contents
Join to "STOP monolithic all-in-one unmanageable application"
The wiki is your friend https://help.ubuntu.com/community/
givré is offline   Reply With Quote
Old July 16th, 2006   #7
haani
Just Give Me the Beans!
 
Join Date: Jun 2006
Beans: 71
Ubuntu 7.04 Feisty Fawn
Re: HOWTO: NTFS with read/write support using ntfs-3g (easy method)

Quote:
Originally Posted by Cyraxzz View Post
Works perfectly here,

With external hard drives you just have to install this program no configurations were necessary.
how did u get this to work on external hard drive it only works on internal harddrive since you only change the option in fstab?
__________________
Laptop:
Acer Aspire 5672WLMi
Intel Core Duo T2300 (1.6), 15.4" WXGA, ATI MOBILITY Radeon x1400 128M, RAM 1024M (2*512) DDR II, 100G SATA Windows Vista Ultimate + Ubuntu 7.04 Feisty Fawn
haani is offline   Reply With Quote
Old July 16th, 2006   #8
Beire
A Carafe of Ubuntu
 
Join Date: Oct 2004
Beans: 29
Re: HOWTO: NTFS with read/write support using ntfs-3g (easy method)

working superb on edgy! great and simple how-to ! congrats
Beire is offline   Reply With Quote
Old July 16th, 2006   #9
KFASheldon
5 Cups of Ubuntu
 
KFASheldon's Avatar
 
Join Date: Jun 2006
Location: Birmingham, UK
My beans are hidden!
Ubuntu 6.06
Send a message via MSN to KFASheldon
Re: HOWTO: NTFS with read/write support using ntfs-3g (easy method)

Haani - this should work fine on any external usb drive,
You can even mount it in fstab (/dev/sda1) mine is workin very well
deleted 80Mb and copied another 102Mb over to the drive no loss all OK and very fast.
KFASheldon is offline   Reply With Quote
Old July 17th, 2006   #10
kbunsie
First Cup of Ubuntu
 
kbunsie's Avatar
 
Join Date: Jan 2006
Location: NYC, NY
Beans: 4
Ubuntu 7.04 Feisty Fawn
Send a message via AIM to kbunsie
Re: HOWTO: NTFS with read/write support using ntfs-3g (easy method)

Problem here. When I mount the drives only the first one shows up on my desktop. Also, when I do "umount -a" and then "mount -a" my external drive does not remount. Even after I power it off and on again. Any help?
kbunsie 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 10:26 AM.


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