2

When i try to access the drive , following problem occurs-

Error mounting /dev/sda2 at /media/ankur/D0484A98484A7CEA: Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,dmask=0077,fmask=0177" "/dev/sda2" "/media/ankur/D0484A98484A7CEA"' 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/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.
bain
  • 11,260

2 Answers2

2

You can run in Windows chkdsk /f

or

Install ntfs-3g with sudo apt-get install ntfs-3g. Then run the ntfsfix command on your NTFS partition.

ntfsfix v2.0.0 (libntfs 10:0:0)

Usage: ntfsfix [options] device

Attempt to fix an NTFS partition.

-h, --help             Display this help
-V, --version          Display version information

For example: ntfsfix /dev/hda6

Developers' email address: linux-ntfs-dev@lists.sf.net Linux NTFS homepage: http://www.linux-ntfs.org

=======================================

You can use a program called ntfsprogs. If its not installed, you can install it by, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo apt-get install ntfsprogs

Once installed, you need to find out you NTFS drive name, just do sudo fdisk -l, to find that out, once you know the name, then

sudo ntfsfix /dev/sdXX

Make sure that you replace the XX with your drive's name.

Note: Whenever you're dealing with partition, make sure that you have a complete backup just to be on the safe side.

===================================

sudo apt-get install testdisk

Then run it:

sudo testdisk

and follow the instructions. You must search for partitions and then write the changes.

Thanks to answerers here:

1

Enter as root in terminal and enter the line.
"mount -t ntfs-3g -o remove_hiberfile /dev/sdax/media/your-drive-number" which will be like (28CC250CCC24D5BA),select your sda(x) number also.
but you have to do this everytime you enter in the ubuntu after using windows 7.
The other option is listed below..


Turn off the fast shutdown from windows 7.

For doing this,follow the steps.
Step-1:start windows 7
Step-2:goto control panel-->power options.
Step-3: select Additional options, there will be an option mid-top side of the window.
This will enable you to change the settings as administrator.
go down to that window and uncheck fast shutdown option.
Than restart the pc and enjoy ubuntu.. ;-)


Dont use hibernate/standby in windows 7,this method of ms windows will not completely shutdown the system or disk.
it keeps the disk drive on standby and not make complete shutdown.
This ubuntu dont allow to access a standby drive due to data loss.

bonny
  • 121
  • 1
  • 6