0

I have an external hard drive with Windows 8 installed on it. Ubuntu cannot mount this drive.

Failed to mount '/dev/sdb5': Operation not permittedThe 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.

I'm not using this Windows installation right now, so I don't mind deleting it. What can I do to fix this? Do I have to delete some partitions in the drive? If so which ones? Or is there an easier way?

Thanks.

Edit: I forgot to mention that the Windows installation is broken so I have no way of booting into it and shutting it down properly. Also, the main partition of the HDD (not the windows partition) has important data.

Final Update (Solution):

Check this tutorial.

john
  • 164
  • The edit doesn't make any difference, see the second answer: http://askubuntu.com/a/499541/158442 – muru Mar 07 '15 at 22:33
  • Thanks, I realize I need to use remove_hiberfile but since I have 2 Windows installations in my system (1 in the ubuntu drive as a dual boot, and 1 in the external hard drive), how can I make sure this command will only delete the hiberfile in the external drive? – john Mar 08 '15 at 06:00

2 Answers2

0

if you wish to delete the windows installation, you can either delete the partition with fdisk or the like, or simply make a new filesystem with the mkfs command, like so: mkfs -t <filesystem type> /dev/sdb5, where filesystem type can be any number of supported filesystems, including ntfs, ext{2,3,4}, fat{12,16,32}, and so fourth. But, this seems a bit overkill. You can simply boot the windows partition and properly shut it down.

hanetzer
  • 441
  • Thanks, but I forgot to mention that the Windows installation is broken so I have no way of booting into it and shutting it down properly. Also, the main partition of the HDD (not the windows partition) has important data. What do you recommend? – john Mar 07 '15 at 20:33
  • mount it read only, collect whatever personal files you may need from it, and either format it as something linux friendly or use a live cd to delete the partition and extend your primary linux install into the freed area. – hanetzer Mar 07 '15 at 20:37
  • My Ubuntu installation is in a separate drive. Also, it's around 1 TB of data so I have no place else to back it up to. I was thinking of deleting all the partitions on that external drive, except for the data partition. Is that okay? Thanks. – john Mar 07 '15 at 20:43
  • sounds about right. – hanetzer Mar 07 '15 at 20:44
  • I deleted all the other partitions in the external drive and erased all the windows files that were in the data partition (only my data folders are left) and yet Ubuntu fails to mount it for the same reason. – john Mar 08 '15 at 06:03
0

You just have to follow the instructions in the error message.

Windows was not shut down properly, but suspended (hibernated to be exact). This is also automatically done instead of shutting down if you have enabled the FastBoot option.

So now it still has marked the drive as used somehow which prevents Ubuntu from getting full (r+w) access to the drive. You can mount it as read-only without problems, though.

The easiest solution to get full access to the drive without doing any damage is to restart your machine, boot into Windows, disable FastBoot if necessary and properly shut it down. Boot Ubuntu up and mount the drive.
Finished!

Byte Commander
  • 107,489
  • Thanks, but I forgot to mention that the Windows installation is broken so I have no way of booting into it and shutting it down properly. Also, the main partition of the HDD (not the windows partition) has important data. What do you recommend? – john Mar 07 '15 at 20:33
  • Look at the link in the duplicate banner. It seems to provide an Ubuntu-only solution/workaround. Or click here (same link). – Byte Commander Mar 07 '15 at 20:43
  • Thanks, I realize I need to use remove_hiberfile but since I have 2 Windows installations in my system (1 in the ubuntu drive as a dual boot, and 1 in the external hard drive), how can I make sure this command will only delete the hiberfile in the external drive? – john Mar 07 '15 at 21:06
  • Sorry, I never used this command. The safest option would be to physically disconnect the data cable from the hdd, if possible (desktop pc only! - and only when power is OFF!). I have no idea what parameters this command takes... – Byte Commander Mar 07 '15 at 21:48
  • It is an external hard drive connected to my laptop so it can be disconnected as you say, unfortunately since the windows installation in the external drive is broken, there's no way to start it again and shut if down properly. – john Mar 08 '15 at 06:02