Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 264257 - gnome-base/gnome-mount-0.8 unable to automount NTFS volumes with ntfs-3g due to invalid mount option "locale="
Summary: gnome-base/gnome-mount-0.8 unable to automount NTFS volumes with ntfs-3g due ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Patrick McLean
URL:
Whiteboard:
Keywords:
: 264985 292589 (view as bug list)
Depends on:
Blocks: 287380
  Show dependency tree
 
Reported: 2009-03-30 08:53 UTC by Hans Nieser
Modified: 2009-11-12 23:03 UTC (History)
12 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch to gnome-mount ebuild (gnome-mount-0.8-r1.ebuild.patch,408 bytes, patch)
2009-03-31 21:07 UTC, Hans Nieser
Details | Diff
patch to remove locale from default ntfs3g mount options in gconf schema (gnome-mount-0.8-no-ntfs3g-locale-opt.patch,575 bytes, patch)
2009-03-31 21:08 UTC, Hans Nieser
Details | Diff
hal fdi file for ntfs-3g specific mount options (20-ntfs-3g.fdi,809 bytes, text/plain)
2009-06-14 21:03 UTC, Alexandre Rostovtsev (RETIRED)
Details
25-ntfs-3g-policy.fdi from Ubuntu (25-ntfs-3g-policy.fdi,2.98 KB, text/plain)
2009-08-30 13:10 UTC, coderoar
Details
25-ntfs-3g-policy.fdi (test2,2.99 KB, text/plain)
2009-09-14 22:12 UTC, Gilles Dartiguelongue (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hans Nieser 2009-03-30 08:53:28 UTC
On my ~amd64 system, automounting NTFS volumes in gnome/nautilus fails with the following error message:

  "Invalid mount option when attempting to mount the volume."

Running gnome-mount by hand with debugging options gives:

  $ gnome-mount --no-ui --block --verbose --hal-udi /org/freedesktop/Hal/devices/volume_uuid_1CBD578C7E928E0C
  gnome-mount 0.8
  ** (gnome-mount:5781): DEBUG: Mounting /org/freedesktop/Hal/devices/volume_uuid_1CBD578C7E928E0C
  ** (gnome-mount:5781): DEBUG: read default option 'locale=' from gconf strlist key /system/storage/default_options/ntfs-3g/mount_options
  ** (gnome-mount:5781): DEBUG: Mounting /org/freedesktop/Hal/devices/volume_uuid_1CBD578C7E928E0C with mount_point='', fstype='', num_options=1
  ** (gnome-mount:5781): DEBUG:   option='locale=en_US.utf8'
  ** Message: Mount failed for /org/freedesktop/Hal/devices/volume_uuid_1CBD578C7E928E0C
  org.freedesktop.Hal.Device.Volume.InvalidMountOption : The option 'locale=en_US.utf8' is not allowed for uid=1000

Apparently the latest HAL does not recognise 'locale' as a valid mount option anymore [1] for the ntfs/ntfs-3g fstype and suggests ntfs-3g should provide its own .fdi file (which it currently doesn't) to properly set allowed mount options.

Also, it would seem the 'locale' mount option is not used for filename character set conversion in newer releases of ntfs-3g [2] anyway (just for output of diagnostic messages) in which case it probably doesn't need to be set anyway.

Workaround: Removing the 'locale=' string from the gconf list at
/system/storage/default_options/ntfs-3g/mount_options seems to make it work again.

I'm using the following versions of hal/ntfs3g:

hal-0.5.12_rc1
ntfs3g-2009.2.1

[1] http://cgit.freedesktop.org/hal/commit/?id=a0d82b80f775faf666aa699f354338098286ff20
[2] http://article.gmane.org/gmane.comp.file-systems.ntfs-3g.devel/672


Reproducible: Always

Steps to Reproduce:
1. Make sure you're running Gnome with hal-0.5.12_rc1 and have ntfs-3g installed
2. Create a new user.
3. Observe the default setting of /system/storage/default_options/ntfs-3g/mount_option including "locale="
3. Plugin a disk with an NTFS volume


Actual Results:  
Mount fails due to the locale= option.
Comment 1 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-03-30 08:57:03 UTC
I believe this is normal given that in kernel ntfs module takes the locale argument but not ntfs-3g.
Comment 2 Hans Nieser 2009-03-30 09:12:23 UTC
(In reply to comment #1)
> I believe this is normal given that in kernel ntfs module takes the locale
> argument but not ntfs-3g.
> 

Hmm, isn't it the other way around? mount(8) manpage doesn't list locale mount opion for ntfs, while ntfs-3g(8) does

Comment 3 Rafał Mużyło 2009-03-30 10:26:43 UTC
I believe, this bug was incorrectly assigned.
The report says:
read default option 'locale=' from gconf strlist key /system/storage/default_options/ntfs-3g/mount_options

This (and a grep in hal and hal-info sources) suggests,
that it's a Gnome-only problem, not a hal one.
It's not a problem of fdi files, but probably Gnome schemas,
or whatever they're called.
Comment 4 Hans Nieser 2009-03-30 11:21:46 UTC
(In reply to comment #3)
> I believe, this bug was incorrectly assigned.
> The report says:
> read default option 'locale=' from gconf strlist key
> /system/storage/default_options/ntfs-3g/mount_options
> 
> This (and a grep in hal and hal-info sources) suggests,
> that it's a Gnome-only problem, not a hal one.
> It's not a problem of fdi files, but probably Gnome schemas,
> or whatever they're called.
> 

Yeah, I apologize for making it seem like hal was to blame, as far as I can tell it's the gnome-mount schema that defines the default /system/storage/default_options/ntfs-3g/mount_options as ["locale="], but since that is a valid option for ntfs-3g (even though it's not really needed anymore) I guess the real problem is that ntfs-3g doesn't come with an fdi file that defines these mount options, now that hal (rightfully) doesn't do it anymore. I looked at how Ubuntu went about it and they ship their own .fdi file with ntfs-3g

Comment 5 Hans Nieser 2009-03-31 21:05:46 UTC
So today I noticed the ntfs3g ebuild actually does install a policy file which interestingly until recently also included locale= in the valid mount option list. It was removed when version was bumped (see bug 256065).

I'll attach patches for gnome-base/gnome-mount that removes locale= from the gconf schema, but I am not 100% sure that is the right way to go about it since strictly speaking ntfs-3g still accepts the mount option, but now uses it only for locale of diagnostic messages according to the man page...
Comment 6 Hans Nieser 2009-03-31 21:07:19 UTC
Created attachment 186896 [details, diff]
patch to gnome-mount ebuild
Comment 7 Hans Nieser 2009-03-31 21:08:48 UTC
Created attachment 186898 [details, diff]
patch to remove locale from default ntfs3g mount options in gconf schema
Comment 8 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-05-17 18:58:09 UTC
*** Bug 264985 has been marked as a duplicate of this bug. ***
Comment 9 peng shao 2009-06-10 07:21:26 UTC
(In reply to comment #7)
> Created an attachment (id=186898) [edit]
> patch to remove locale from default ntfs3g mount options in gconf schema
> 

I met the same problem, and solved it manually in the exactly same way.
A little curiously, was this patch applied to the portage?
I have a ~amd64 machine and emerge world almost every two days...
Comment 10 Alexandre Rostovtsev (RETIRED) gentoo-dev 2009-06-14 20:59:34 UTC
This is not a hal bug. This is not a GNOME bug.

This is 100% Gentoo's ntfs3g packaging bug.

Because ntfs3g must provide a hal fdi file that describes what valid mount options mount.ntfs-3g accepts. And that is what other distros (e.g. Fedora) do.
Comment 11 Alexandre Rostovtsev (RETIRED) gentoo-dev 2009-06-14 21:03:41 UTC
Created attachment 194701 [details]
hal fdi file for ntfs-3g specific mount options

hal fdi file for ntfs-3g specific mount options (i.e. options that hal thinks that mount.ntfs does not accept).

Install this into /usr/share/hal/fdi/policy/20thirdparty and mounting ntfs volumes will work in Gnome.

This file, or something very similar to it, needs to be installed by the ntfs3g ebuild!
Comment 12 coderoar 2009-08-30 13:10:56 UTC
Created attachment 202706 [details]
25-ntfs-3g-policy.fdi from Ubuntu

There is another one from Ubuntu.
Comment 13 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-09-14 22:10:32 UTC
it is most likely that this problem is not specific to gnome-mount and technically, this should probably be a file provided by ntfs3g itself as it is done in ubuntu/debian/fedora. Reassigning to ntfs3g maintainers.

@chutzpath, if it's ok with you I'll had the attached fdi to ntfs3g ebuilds behind the hal use flag.
Comment 14 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-09-14 22:12:14 UTC
Created attachment 204138 [details]
25-ntfs-3g-policy.fdi

Taken from http://packages.debian.org/fr/sid/ntfs-3g
Comment 15 Yuri Sevatz 2009-10-03 08:13:36 UTC
Attachment (id=204138) -> 25-ntfs-3g-policy.fdi works very good.

Recommend we get this into an ebuild soon; others will want it :)
Comment 16 Marcello Magaldi 2009-10-05 15:03:56 UTC
(In reply to comment #15)
> Attachment (id=204138) -> 25-ntfs-3g-policy.fdi works very good.
> 
> Recommend we get this into an ebuild soon; others will want it :)
> 

this bug hit the stable amd64 and x86 since  0.5.12_rc1-r8 became stable on both archs .
Comment 17 Ricardo Neves 2009-10-26 03:55:13 UTC
(In reply to comment #15)
> Attachment (id=204138) -> 25-ntfs-3g-policy.fdi works very good.
> 
> Recommend we get this into an ebuild soon; others will want it :)
> 

It worked fine for me too... putting it on a ebuild sounds nice :)
Comment 18 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-10-28 22:32:37 UTC
+*ntfs3g-2009.4.4-r1 (28 Oct 2009)
+
+  28 Oct 2009; Gilles Dartiguelongue <eva@gentoo.org>
+  +files/10-ntfs3g.fdi.2009-r1, +ntfs3g-2009.4.4-r1.ebuild:
+  Version bump, add more complete fdi files, bug #264257.
+
Went with a revision bump since I consider the problem big enough that users
will want the tiny change at the cost of a useless rebuild.
Comment 19 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-11-12 23:03:10 UTC
*** Bug 292589 has been marked as a duplicate of this bug. ***