Montowanie partycji NTFS, z niepoprawnie wyłączonego Windowsa


Miałem kiedyś problem z zamontowaniem partycji z dysku, który kiedyś był podłączony do komputera z Windowsem. Niestety komputer ten został nieprawidłowo wyłączony lub zahibernowany i wymagał ponownego uruchomienia Windowsa i zamknięcia aby móc tę partycję zamontować pod linuksem. Niestety nie posiadałem komputera z Windowsem aby to zrobić, a przy próbie montowania pod linuksem otrzymywałem komunikaty typu:

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

lub

Error mounting system-managed device /dev/sda1: Command-line `mount „/media/sda1″’ exited with non-zero exit status 14: [mntent]: warning: no final newline at the end of /etc/fstab
Windows is hibernated, refused to mount.
Failed to mount '/dev/sda1′: 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.

rozwiązanie tego problemu jest proste:

sudo ntfsfix /dev/sdXY

sdXY należy zastąpić swoim oznaczeniem partycji.