
ntfsprogs refusing to modify a win7 filesystem
short form:
various ntfsprogs utilities (eg. ntfscp, ntfsfix) are refusing to modify a Win7 filesystem, claiming "Hibernated non-system partition, refused to mount." even though the host was fully shut down, not hibernated.
OS: CentOS 6.5
ntfsprogs: versions v2011.4.12 (distro provided) and v2014.2.15 (built from current sources)
longer:
I have a Win7 VM, and want to back up the C: drive using ntfsclone. Before doing this I'm trying to copy a zero-length file over each of pagefile.sys and hiberfil.sys to reduce space taken by the backup.
I shut down the VM (not hibernate) and create a loop device on the virtual HD that exposes just the C: partition. ntfsls correctly shows the contents of the C: drive, but ntfscp refuses to make any changes.
Code:
~/win7 $ sudo losetup --find --show --offset $((206848*512)) /var/lib/libvirt/images/win7.img
/dev/loop0
~/win7 $ sudo ntfsls /dev/loop0 -l
0 Apr 15 12:31 2014 $Recycle.Bin
6528 Apr 15 09:06 2014 bootsqm.dat
0 Apr 15 12:31 2014 Documents and Settings
0 Apr 14 21:17 2014 hiberfil.sys
4294545408 Apr 14 18:39 2014 pagefile.sys
0 Apr 15 12:31 2014 PerfLogs
0 Apr 15 12:31 2014 Program Files
0 Apr 15 12:31 2014 Program Files (x86)
0 Apr 15 12:31 2014 ProgramData
0 Apr 14 20:01 2014 Recovery
0 Apr 14 18:40 2014 System Volume Information
0 Apr 15 12:31 2014 Users
0 Apr 15 12:31 2014 Windows
~/win7 $ ls -lF empty.bin
-rw-r--r--. 1 jsteph jsteph 0 Aug 20 2012 empty.bin
~/win7 $ sudo ntfscp /dev/loop0 empty.bin pagefile.sys
Hibernated non-system partition, refused to mount.
Failed to mount '/dev/loop0': Operation not permitted
The NTFS partition is hibernated. Please resume Windows and turned it
off properly, so mounting could be done safely.
ERROR: couldn't mount volume: Operation not permitted
~/win7 $
Any suggestions?
(Don't bother with "shut the system down instead of hibernating it" unless Start > Shut Down and then watching the system say "Shutting Down..." is somehow doing it wrong)