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
  • 211,503
aborted
  • 269
  • 1
  • 4
  • 17
  • Have you tried turning your windows off and on again ? According to the error message, Win is hibernated. Try rebooting under windows and cleanly shut your computer down. – Aserre Apr 10 '14 at 13:14
  • I don't know how to do that. My Windows 8 system wont boot up, so there is no way I can provide a proper shut down via Windows. My only hope is Ubuntu or the Windows 8 installation DVD, which hasn't served me anything with its Automatic Repair Tool. – aborted Apr 10 '14 at 13:17

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
  • 211,503
  • The issue is that I can't enter Windows. – aborted Apr 10 '14 at 15:26
  • @Aborted Ok I will put a very bad option here that will enable read/write but will also make you loose any hibernated data. So be warned. Test the option mentioned above. You have 2 options, using mount or using ntfs-3g. – Luis Alvarado Apr 10 '14 at 15:31
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
  • 299,756
  • The path to the HDD is wrong. I know the names of the drives (Windows 8 and Store), but I don't know how to get to them via that command you provided. Ideas? – aborted Apr 10 '14 at 13:22
  • I keep getting this error: mount: can't find /media/dugi/Store in /etc/fstab or /etc/mtab. And there is no fstab or mtab inside /etc. How do I proceed? – aborted Apr 10 '14 at 13:51
  • Now I'm getting this: mount: you must specify the filesystem type. Sorry for all these questions, it's just that I'm a first time Ubuntu user and I've installed it only 4 days ago. – aborted Apr 10 '14 at 13:57
  • Thanks again for your help. Now I'm getting this: Remounting is not supported at present. You have to umount volume and then mount it once again.. – aborted Apr 10 '14 at 14:26
  • ok ... so we remove the remount :+) – Rinzwind Apr 10 '14 at 14:37
  • mind if i clean this up? (ie. remove comments) – Rinzwind Apr 10 '14 at 14:37
  • Sure go ahead. :) – aborted Apr 10 '14 at 15:24