User-friendly automounting of ntfs partitions with an unclean logfile

Bug #175503 reported by Tom Verdaat
60
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gnome-mount (Ubuntu)
Invalid
Undecided
Unassigned
Nominated for Hardy by Ric Flomag
Nominated for Intrepid by Tom Verdaat
Jaunty
Invalid
Undecided
Unassigned
ntfs-3g (Ubuntu)
Fix Released
Wishlist
Chris Coulson
Nominated for Hardy by Ric Flomag
Nominated for Intrepid by Tom Verdaat
Jaunty
Fix Released
Wishlist
Chris Coulson

Bug Description

Binary package hint: ntfs-3g

When you try to mount a ntfs drive that was not safely removed last time you'll get the following error:

> Cannot mount volume
> unable to mount the volume
>
> Details:
> $LogFile indicates unclean shutdown (0,0) Failed to mount '/dev/hda1/': Operation not supported
> Mount is denied because NTFS is marked to be in use. Choose one action:
>
> Choice 1: If you have Windows then disconnect the external devices by clicking on the 'Safely
> Remove Hardware' icon in the Windows taskbar then shutdown Windows cleanly.
>
> Choice 2: If you don't have Windows then you can use the 'force' option for your own responsibility.
> For example type on the command line: mount -t ntfs-3g /dev/hda1 /media/disk -o force or add the
> option to the relevant row in the /etc/fstab file: /dev/hda1 /media/disk ntfs-3g defaults,force 0 0

This is particularly annoying when working with external harddisks which Ms Windows users often just unplug without properly unmounting. The thing that suprises me is that both Ms Windows and Apple's OS X do not complain about this while linux does. To me this does not seem comply with the "it just works" idea behind the Ubuntu distribution.

Both choices do not offer a real solution: going back to Windows to cleanly unmount both requires having Windows and if you do, this is not a user-friendly solution. Adding a line to fstab also is not user-friendly, it won't work when you're faced with different external drives all the time and adding a drive to fstab also seems to hinder the automounting process of GNOME, which again is not user-friendly.

I'm sure there is a risk when ignoring the unclean logfile but to me this seems like punishing the user after the damage is already done. So the question of this bug is: how can this be solved? Three solutions I can think of at this time could be:

1) Fix handeling of unclean logfiles in upstream ntfs-3g. If this was easy I guess it would already have been done.
2) Removing the unclean logfile check completely from the upstream ntfs-3g package in a next version so it won't complain and just mount, like Windows and OS X do.
3) Adding a config file feature to the next version of ntfs-3g that contains a variable like ignore_unclean_logfile which allows you (or then preferably enabled by default in the ubuntu package) to set the "force" flag globally in stead of per-disk.

Hope this is a clear description of my (and many other peoples) annoyance. I hope this can be solved!

Thanks!

Revision history for this message
Fabián Rodríguez (magicfab) wrote :

Thank you for you clear description of this usability issue.

I have to agree with this... changing status to wishlist, I don't think this requires a full spec but not sure how/if/when it would be implemented.

Changed in ntfs-3g:
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
Ric Flomag (ricflomag) wrote :

It would definitely be nice to fix this for hardy.

I would however suggest another solution: change the dialog box so that it warns the user about the improper shut down:

----
Warning

The disk <name of partition> was not shut down properly last time it has been used. For the safety of your data, consider to always unmount the drive before you unplug it.

<OK button that mounts the disk with the -o force option>
----

Marking as candidate for hardy.

Revision history for this message
Tom Verdaat (tom-verdaat) wrote :

I like the suggestion by Ric Flomag. It didn't make it into Hardy so I've marked it for Intrepid. Hope it makes it this time.

Revision history for this message
Wouter Stomp (wouterstomp-deactivatedaccount) wrote :

Still not fixed in intrepid. I think this should be higher priority than wishlist, I only have ubuntu, an ntfs formatted usb disk and no windows anymore, so choice 1 is no option. Choice 2 is even for experienced ubuntu users not easy and definitely not user-friendly.

Revision history for this message
glass.dimly (jmjohn) wrote :

I think this should be a much higher priority as well. It seems small but it makes Ubuntu seem broken to the new user, and if things like this aren't fixed, Ubuntu will not become usable for the regular person.

Bugs like this are extremely frustrating when migrating from Windows. The first thing I did after installing Ubuntu onto my new laptop was plug in my 500 Gb NTFS USB drive to migrate my files, only to spend several frustrating hours trying to understand what "mounting" was, how to "force" it (scary: "forced mounting" sounds like rape), trying to edit fstab (without success), trying to find out what devices I had and what they were called, and installing misleading packages like "automount". Eventually I gave up and ejected it from Windows--a bitter lesson. Wasn't it fortunate I didn't migrate completely to Linux?

This bug nearly caused me to revert to Windows. Now I use ntfsfix /dev/sdb1 (from the package ntfsprogs), even though it's deprecated, because I haven't figured out how to edit fstab effectively yet. And I'm not stupid--I was a cognitive science and logic major in college, I'm a web developer, and I've had two semesters of Java.

Revision history for this message
Jordan Hall (jordan-hall) wrote :

I also highly agree. I have asked friends to specifically 'Remove Safetly' from Windows so I avoid this annoyance at a later point. I realise it is just one command to force mount the partition, and am capable of doing this however some people will not be or will not put up with having to do so.

I think the solution proposed by Ric Flomag is excellent, and seems it feasible to be able to detect this specific mounting error and return the proposed dialog.

Revision history for this message
Erik Vandamme (erik1vandamme) wrote :

Could not agree more, in my case Intrepid does not even "see" the drives anymore a bit chicken for Intrepid

Revision history for this message
Ronan Jouchet (ronj) wrote :

Hello,

In bug #275951 (which is a duplicate of this one), I proposed a draft of dialogbox. I attached it, you may find it interesting.
BTW, this bug has also a relevant Brainstorm idea, idea 4994 : http://brainstorm.ubuntu.com/idea/4994/

Cheers,
Ronan

Revision history for this message
Philipp Lies (philipp-lies) wrote :

For using ubuntu in real world scenarios this is a severe bug!!

Imagine an ubuntu installation where not every user has sudo rights. This should be the case every time ubuntu is used in companies with right-minded administrators. There you cannot just "sudo mount ..." or reboot your system and start windows. In this case the user is screwed as he is incapable of working around this bug.

I think keeping this a wishlist feature for three releases now is inacceptable. The importance should be raised and be fixed with jaunty at the latest. Since one viable solution would be just accepting the "force" parameter be set in gconf-editor /system/storage/default_options/ntfs-3g (which raises an "invalid mount option error" currently), so the user can decide for himself if he wants to force the mount or not.

Or am I seeing something wrong?

Revision history for this message
Philipp Lies (philipp-lies) wrote :

I just hacked a patch for this bug. Not the most elegant way but works perfect. I just check whether ntfs-3g filesystem causes the error, then propose running "gksudo ntfsfix /dev/sdxx" and user can decide if he wants to execute it.
Maybe an acceptable workaround for some of you (at least for me^^)

Revision history for this message
Erik Vandamme (erik1vandamme) wrote : Re: [Bug 175503] Re: User-friendly automounting of ntfs partitions with an unclean logfile

I fully agree

Philipp Lies wrote:
> I just hacked a patch for this bug. Not the most elegant way but works perfect. I just check whether ntfs-3g filesystem causes the error, then propose running "gksudo ntfsfix /dev/sdxx" and user can decide if he wants to execute it.
> Maybe an acceptable workaround for some of you (at least for me^^)
>
> ** Attachment added: "gnome-mount.c.patch"
> http://launchpadlibrarian.net/20202323/gnome-mount.c.patch
>
>

--

*Erik Vandamme*
*54 Hilltop Road - WAMBERAL NSW 2260 Australia*
*<email address hidden>* <mailto:<email address hidden>>
*Skype - erik_vandamme*
*02 43843613 - 0406 042750*

Revision history for this message
glass.dimly (jmjohn) wrote :

It sounds great to me, simple. If somebody wants to do it the "right" way they are more than welcome to do so, but something needs to be done about this ASAP in a world where Linux must play nicely with Windows or be deemed broken. This is not a small bug.

-glass.dimly

Revision history for this message
Nick Bridgwater (leamphil) wrote :

I agree with the need to be more user-friendly with this situation - if it arises could the user be prompted (if they want to be, or execute the user-specified default action) to select from:

1. Don't mount the disk
2. Mount the disk as read-only
3. Run ntfsfix and mount the disk as read/write
4. Mount the disk as read/write anyway (=force)

Revision history for this message
gianni (gbarberi) wrote :

thanks for the help, can someone give me more hints on how to apply the patch?
as a xmas gift?....

thank you

Revision history for this message
Philipp Lies (philipp-lies) wrote :

Applying the patch is quite easy.
1. create a folder for the source files, e.g. ~/development and cd into it
2. run sudo apt-get source gnome-mount
3. copy gnome-mount.c.patch into gnome-mount/src and cd into the folder
4. run patch -b gnome-mount.c gnome-mount.c.patch
5. go to the root folder of gnome-mount and start the compilation & installation
You might need to install some development packages, the configure script started whining about missing libs, so I just installed the according libxxxxxx-dev package, reran the configure script and after the 5th run or so it compiled and installed.

Revision history for this message
Philipp Lies (philipp-lies) wrote :

Nicks suggestion is exactly the solution which would be perfect, but I think will be very difficult to handle. Two systems which should be independent need to cooperate. gnome-mount just executes the mount command for any possible file system. It should not have to treat some fs different i.e. should not have knowledge of the underlying layer. It just passes on the error message from the fs mounter.

On the other hand the ntfs-3g fs mounter does not know whether a shell or gnome executed it. Ran from shell, the error message is totally suitable as it provides information how to handle the problem. The mounter should not need information about the caller to run properly.

I think a major decision has to be made here (maybe that's why this bug is untouched) about how the fs mounter layer and the (gnome) UI layer shall communicate in cases of errors. Including special treatment for some special mounters in gnome source code is wrong. (k, I did it, but just as short term hotfix) My idea would be including some standard buttons in the "error occured" window, not just the "OK" button (since it isn't "ok" *g*). The buttons are "retry" and "run command & retry". An even more configurable approach would be giving gnome-mount a config file where it looks for solutions and offers them to the user. This would not only enable to fix such a problem without compiling modules but also allowing ubuntu to automatically adding solutions to known problems when installing a new fs driver.

Revision history for this message
Jan Niklas Hasse (jhasse) wrote :

That sounds too complicated to me. IMHO it's just a bug of mount/ntfs-3g, because it treats the unclean shutdown as an error while windows (that's the OS which is using NTFS, so they probably know best) ignores it completely.

If it would only be a warning, shell user will see it (and probably think "Do I care? Tell me something interesting!") and nautilus user will never see any message (and probably also don't want to see one).

Revision history for this message
Szabolcs Szakacsits (szaka) wrote :

NTFS-3G solved this issue from version 2009.2.1: http://ntfs-3g.org/releases.html

Revision history for this message
Jordan Hall (jordan-hall) wrote :

According to http://packages.ubuntu.com/jaunty/libntfs-3g48 the current version of NTFS-3G shipping with Jaunty is 2009.1.1-0ubuntu1.

Is it too late for the latest version (2009.2.1) to appear in Jaunty, or can we expect this to happen?

Revision history for this message
Martin Pitt (pitti) wrote :

No, it's not too late to update to a new upstream version. Someone just needs to prepare and test it.

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

I'll take a look at doing the ntfs-3g update later on hopefully

Changed in ntfs-3g:
assignee: nobody → chrisccoulson
status: Confirmed → In Progress
Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Here's the diff.gz for the 2009.2.1 update

Changed in ntfs-3g:
status: In Progress → Triaged
Revision history for this message
Martin Pitt (pitti) wrote :

Since this was handled in ntfs-3g, I mark the gnome-mount task as invalid.

Changed in gnome-mount:
status: New → Invalid
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ntfs-3g - 1:2009.2.1-0ubuntu1

---------------
ntfs-3g (1:2009.2.1-0ubuntu1) jaunty; urgency=low

  * New upstream version:
    - The 'recover' and 'norecover' mount options were introduced.
      The former option will casue the driver to recover and repair a
      corrupted or inconsistent NTFS volume if it's possible. The
      default behaviour is 'recover' (fixes LP: #175503).
    - The user extended attribute namespace is supported by default.
    - A volume having unclean journal file is recovered and mounted by
      default. The 'norecover' mount option can disable this.
  * Updated due to SO version bump:
    - debian/control, debian/rules, libntfs-3g49.docs,
      libntfs-3g49.install, libntfs-3g49-udeb.install,
      libntfs-3g-dev.links, ntfs-3g.links
  * debian/changes/Changelog:
    - Updated to document new upstream changes.
  * debian/25-ntfs-3g-policy.fdi:
    - Updated to expose new 'recover' and 'norecover' options via HAL.

 -- Chris Coulson <email address hidden> Sun, 15 Feb 2009 20:15:24 +0000

Changed in ntfs-3g:
status: Triaged → Fix Released
Revision history for this message
cmcanulty (cmcanulty) wrote :

I can't get any of 3 ext ntfs hard drives to mount and yes they were cleanly removed from windows. I have downloaded about every possible ubuntu utility. So I can never back up and this is driving me crazy!!! All 3 drives work fine in windows.

Revision history for this message
gianni (gbarberi) wrote : Re: [Bug 175503] Re: User-friendly automounting of ntfs partitions with an unclean logfile

this is 1 y old post! witj 9.10 is solved

On Fri, Dec 11, 2009 at 11:54 PM, cmcanulty <email address hidden> wrote:
> I  can't get any of 3 ext ntfs hard drives to mount and yes they were
> cleanly removed from windows. I have downloaded about every possible
> ubuntu utility. So I can never back up and this is driving me crazy!!!
> All 3 drives work fine in windows.
>
> --
> User-friendly automounting of ntfs partitions with an unclean logfile
> https://bugs.launchpad.net/bugs/175503
> You received this bug notification because you are a direct subscriber
> of the bug.
>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.