0

My HDD is on its verge of death and I have Windows 8 installed on it. I have some pretty important files there that I need to take to the Ubuntu side. My Ubuntu installation is on its separate physical hard drive.

When I click one of my Windows 8 partitions via Ubuntu (there are two), I get this error message:

Error mounting /dev/sdb1 at /media/dugi/Store: Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,dmask=0077,fmask=0177" "/dev/sdb1" "/media/dugi/Store"' exited with non-zero exit status 14:

  The disk contains an unclean file system (0, 0). Metadata kept in
  Windows cache, refused to mount. Failed to mount '/dev/sdb1':
  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.

Is there a way I can fix or backup my important data from this HDD via Ubuntu? It's the only way I have direct access to these HDDs - the Windows 8 system wont boot anymore.

Help would be appreciated.

Luis Alvarado
  • 216,643
aborted
  • 269

2 Answers2

1

That is not a Partition problem. It just means that Windows 8 was closed in a unsafe way (Power down while using Windows, You hibernated or suspended the Windows 8 session or any other option than shutting down Windows the normal way).

In Windows 8, Microsoft introduced a "new" feature when shutting down that it actually not shutdown the PC but hibernated it. The feature is called "Fast Start Up" which is fancy words for "You are not actually shutting down but hibernating".

What Hibernating does when related to a Linux system is that it tells Linux, in this case Ubuntu that the partition is not save to write to. So to avoid problems, Ubuntu does not let you mount the partition until it has been properly shutdown. Hibernating creates a "state" of how Windows was the moment you tried to turn it off.

So any change you make will be erased as soon as you start Windows again (Because of the hibernation)

If you are experiencing one of the following issues:

  • Loosing Data when copying from Ubuntu to Windows 8 after shutting down Windows 8
  • Can not access your Windows partitions from Ubuntu getting a Disk contains an unclean file system

    This is most likely the cause of an option in Windows 8 called Fast Startup which behaves similar to hibernation and keeps a snapshot of the system so when you boot up, it will load faster. Since it keeps a snapshot, anything you copy or change in Windows 8 from Ubuntu after doing the fake shutdown will be lost (Apart from other issues found [HERE][12]).

As taken from Installing Ubuntu Alongside a Pre-Installed Windows with UEFI

The solution in Windows 8 is to go to:

Control Panel --> Power Options --> Choose what the power button does

In here click on "Change settings that are currently unavailable" where you should see something like this:

enter image description here

Uncheck the option that says "Turn on fast startup"

After this, you can shutdown Windows correctly and this will set the bit that tells linux that it was properly shutdown. Since hibernating was not done this time, you will be able to mount and read/write the partition between both systems.

NOTE: Forcing to mount the Windows system might create more problems with your Windows system.

Forcing Windows 8 Partition to Mount (Warning: You will loose hibernated Data)

There is an option I normally try to avoid which forces mounting Windows 8 but with the problem that you will loose all hibernated data. If you don't care what you hibernated, then keep on going.

We use the remove_hiberfile with the ntfs-3g command.

eg: sudo ntfs-3g /dev/sda1 /mnt -o remove_hiberfile

eg: sudo mount -t ntfs-3g -o remove_hiberfile /dev/sda1 /mnt

The remove_hiberfile will remove any hibernated data (The hibernate file) from Windows. So be warned.

Luis Alvarado
  • 216,643
0

"mount the volume read-only with the 'ro' mount option." read only means you can extract the files from it. So why not follow that advice if all you want is to extract the files?

Command would be something like this:

 sudo mount -t ntfs-3g /dev/sdb1 /media/dugi/Store -o ro,noatime

(mind the ro for readonly and none of the options in -o can have spaces besides from the one after the -o)

Otherwise you will need Windows to check the disc since the disc seems to believe it is in hibernation (and you need a working windows to boot it from)

Rinzwind
  • 309,379