Nautilus suggests option for mounting hibernated ntfs partitions that could lead to data loss

Bug #1008117 reported by Austin Dempewolff
30
This bug affects 6 people
Affects Status Importance Assigned to Milestone
ntfs-3g
New
Undecided
Unassigned
ntfs-3g (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

--- What happens: ---
If a user tries to open an ntfs partition that has been hibernated while using Nautilus they will be presented with this dialog:
------------------------------------------
Unable to mount XP

Error mounting: mount exited with exit code 14: Windows is hibernated, refused to mount.
Failed to mount '/dev/sda3': Operation not permitted
The NTFS partition is hibernated. Please resume and shutdown Windows
properly, or mount the volume read-only with the 'ro' mount option, or
mount the volume read-write with the 'remove_hiberfile' mount option.
For example type on the command line:

            mount -t ntfs-3g -o remove_hiberfile /dev/sda3 /media/XP_
-------------------------------------------

The last suggestion, "mount the volume read-write with the 'remove_hiberfile' mount option," is problematic because doing this would delete the 'hiberfile.sys' file and cause the user to lose all information on the saved session--potentially including unsaved work. Here is a selection from the ntfs-3g manpage explaining this option:

remove_hiberfile
              Unlike in case of read-only mount, the read-write mount is
              denied if the NTFS volume is hibernated. One needs either to
              resume Windows and shutdown it properly, or use this option
              which will remove the Windows hibernation file. Please note,
              this means that the saved Windows session will be completely
              lost. Use this option under your own responsibility.

The fact that the exact command to do this is prominently displayed (and is the only command displayed) without any warning that this will delete the saved Windows session only aggravates the risk of data loss.

--- What should happen: ---

1. If a command is to be prominently displayed it should be the command to mount the partition in read-only mode (see command below)--this is the only completely safe way to mount a hibernated ntfs-partition without risking data loss.

              mount -t ntfs-3g -o ro /dev/sda3 /media/XP_

2. A warning should be included in the Nautilus dialog which explains that using the 'remove_hiberfile' option to mount the drive in read-write mode will require deleting the saved Windows session and losing any unsaved files.

--- Steps to reproduce: ---

1. Hibernate a Windows installation
2. Boot Ubuntu
3. Attempt to open the Windows partition using Nautilus

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: nautilus 1:3.4.2-0ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-24.39-generic 3.2.16
Uname: Linux 3.2.0-24-generic x86_64
NonfreeKernelModules: nvidia wl
ApportVersion: 2.0.1-0ubuntu8
Architecture: amd64
Date: Sun Jun 3 22:08:06 2012
ExecutablePath: /usr/bin/nautilus
GsettingsChanges: org.gnome.nautilus.window-state geometry '1192x655+56+24'
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
SourcePackage: nautilus
UpgradeStatus: Upgraded to precise on 2012-04-29 (34 days ago)
XsessionErrors:
 (gnome-settings-daemon:1917): color-plugin-WARNING **: failed to get edid: unable to get EDID for output
 (gnome-settings-daemon:1917): color-plugin-WARNING **: unable to get EDID for xrandr-default: unable to get EDID for output
 (gnome-settings-daemon:1917): color-plugin-WARNING **: failed to reset xrandr-default gamma tables: gamma size is zero
 (compiz:1933): GConf-CRITICAL **: gconf_client_add_dir: assertion `gconf_valid_key (dirname, NULL)' failed

Revision history for this message
Austin Dempewolff (adempewolff) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in nautilus (Ubuntu):
status: New → Confirmed
Revision history for this message
Sebastien Bacher (seb128) wrote :

The messages comes from ntfs-3g:

"static const char *hibernated_volume_msg =
"The NTFS partition is hibernated. Please resume and shutdown Windows\n"
"properly, or mount the volume read-only with the 'ro' mount option, or\n"
"mount the volume read-write with the 'remove_hiberfile' mount option.\n"
"For example type on the command line:\n"
"\n"
" mount -t ntfs-3g -o remove_hiberfile %s %s\n"
"\n";
"

affects: nautilus (Ubuntu) → ntfs-3g (Ubuntu)
Revision history for this message
Carl Patenaude Poulin (carlpaten) wrote :

Trying to mount a Windows 8 partition results in this bug no matter if the partition is shut down or hibernated.

Revision history for this message
Jean-Pierre (jean-pierre-andre) wrote :

The mounting denial is not a bug. It is a feature preventing you from losing data.

Also please see http://jp-andre.pagesperso-orange.fr/advanced-ntfs-3g.html#windows8

Revision history for this message
Austin Dempewolff (adempewolff) wrote : Re: [Bug 1008117] [NEW] Nautilus suggests option for mounting hibernated ntfs partitions that could lead to data loss
Download full text (4.6 KiB)

Similarly, this bug was not filed because of the mounting denial, but
rather because the denial lists the command for a potential dangerous
action without explaining what it would do and the data loss it could cause.

On Friday, September 21, 2012, Jean-Pierre <email address hidden>
wrote:
> The mounting denial is not a bug. It is a feature preventing you from
> losing data.
>
> Also please see http://jp-andre.pagesperso-orange.fr/advanced-ntfs-
> 3g.html#windows8
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1008117
>
> Title:
> Nautilus suggests option for mounting hibernated ntfs partitions that
> could lead to data loss
>
> Status in NTFS-3G:
> New
> Status in “ntfs-3g” package in Ubuntu:
> Confirmed
>
> Bug description:
> --- What happens: ---
> If a user tries to open an ntfs partition that has been hibernated
while using Nautilus they will be presented with this dialog:
> ------------------------------------------
> Unable to mount XP
>
> Error mounting: mount exited with exit code 14: Windows is hibernated,
refused to mount.
> Failed to mount '/dev/sda3': Operation not permitted
> The NTFS partition is hibernated. Please resume and shutdown Windows
> properly, or mount the volume read-only with the 'ro' mount option, or
> mount the volume read-write with the 'remove_hiberfile' mount option.
> For example type on the command line:
>
> mount -t ntfs-3g -o remove_hiberfile /dev/sda3 /media/XP_
> -------------------------------------------
>
> The last suggestion, "mount the volume read-write with the
> 'remove_hiberfile' mount option," is problematic because doing this
> would delete the 'hiberfile.sys' file and cause the user to lose all
> information on the saved session--potentially including unsaved work.
> Here is a selection from the ntfs-3g manpage explaining this option:
>
> remove_hiberfile
> Unlike in case of read-only mount, the read-write
 mount is
> denied if the NTFS volume is hibernated. One needs
either to
> resume Windows and shutdown it properly, or use this
 option
> which will remove the Windows hibernation file.
Please note,
> this means that the saved Windows session will be
 completely
> lost. Use this option under your own responsibility.
>
> The fact that the exact command to do this is prominently displayed
> (and is the only command displayed) without any warning that this will
> delete the saved Windows session only aggravates the risk of data
> loss.
>
> --- What should happen: ---
>
> 1. If a command is to be prominently displayed it should be the
> command to mount the partition in read-only mode (see command
> below)--this is the only completely safe way to mount a hibernated
> ntfs-partition without risking data loss.
>
> mount -t ntfs-3g -o ro /dev/sda3 /media/XP_
>
> 2. A warning should be included in the Nautilus dialog which explains
> that using the 'remove_hiberfile' option to mount the drive in read-
> wri...

Read more...

Revision history for this message
Stuart Bishop (stub) wrote :

This looks fixed. I am no longer presented with the dangerous option:

Error mounting /dev/sda2 at /media/stub/0123456789ABCDEF: Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,dmask=0077,fmask=0177" "/dev/sda2" "/media/stub/0123456789ABCDEF"' exited with non-zero exit status 14: Windows is hibernated, refused to mount.
Failed to mount '/dev/sda2': Operation not permitted
The NTFS partition is in an unsafe state. Please resume and shutdown
Windows fully (no hibernation or fast restarting), or mount the volume
read-only with the 'ro' mount option.

Revision history for this message
Samuel Bronson (naesten) wrote :

Huh, I would have expected the fix to just involve changing the ezxample to use "ro" instead of "remove_hiberfile"; its not so harmful to just *mention* the latter, is it?

Changed in ntfs-3g (Ubuntu):
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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