FAQ SearchLogin
Tuxera Home
View unanswered posts | View active topics It is currently Wed Nov 25, 2020 10:28



Post new topic Reply to topic  [ 10 posts ] 
Win 10: Windows is hibernated, refused to mount. 
Author Message

Joined: Tue Aug 04, 2015 14:06
Posts: 5
Post Win 10: Windows is hibernated, refused to mount.
Windows 10 Home on /dev/sda1, fast boot and hibernate off
Slackware64 current multilib, ntfs-3g 2015.3.14-x86_64-1
PartedMagic 2015_07_07, ntfs-3g 2015.3.14-i486-1_pmagic
Xubuntu 14.04.2 X86_64, ntfs-3g 1:2013:1.13AR.1-2ubuntu2

Since I suspended my Win10, awoke it again, did a full powerdown and booted any one of the 3 Linux systems above ntfs-3g reports "Windows is hibernated, refused to mount":

root@riposo:~/works# mount /C
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.
root@riposo:~/works# mount -ro /dev/sda1 /C
root@riposo:~/works# head -c 32 '/C/$LogFile' | od -t x2
0000000 5352 5254 001e 0009 0000 0000 0000 0000
0000020 1000 0000 1000 0000 0030 0001 0001 0013
0000040
root@riposo:~/works#

I then rebooted in Windows, did a full powerdown and booted any one of the 3 Linux systems:

root@riposo:~/works# mount /C
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.
root@riposo:~/works# mount -ro /dev/sda1 /C
root@riposo:~/works# head -c 32 '/C/$LogFile' | od -t x2
0000000 5352 5254 001e 0009 0000 0000 0000 0000
0000020 1000 0000 1000 0000 0030 0001 0001 0011
0000040
root@riposo:~/works# umount /C
root@riposo:~/works# mount -o remove_hiberfile /dev/sda1 /C
root@riposo:~/works# head -c 32 '/C/$LogFile' | od -t x2
0000000 5352 5254 001e 0009 0000 0000 0000 0000
0000020 1000 0000 1000 0000 0030 0001 0001 0011
0000040
root@riposo:~/works#

I then rebooted any of the 3 Linux systems above and could mount /C without problems. However, once I rebooted in Windows, did a full powerdown and booted any one of the 3 Linux systems:

root@riposo:~/works# mount /C
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.
root@riposo:~/works# mount -ro /dev/sda1 /C
root@riposo:~/works# head -c 32 '/C/$LogFile' | od -t x2
0000000 5352 5254 001e 0009 0000 0000 0000 0000
0000020 1000 0000 1000 0000 0030 0001 0001 000d
0000040
root@riposo:~/works#

The only way I could resolve the problem permanently was by restoring a Ghost backup from before I ever suspended my Windows:

root@riposo:~/works# mount /C
root@riposo:~/works# head -c 32 '/C/$LogFile' | od -t x2
0000000 5352 5254 001e 0009 0000 0000 0000 0000
0000020 1000 0000 1000 0000 0030 0001 0001 000d
0000040
root@riposo:~/works#


Tue Aug 04, 2015 14:31
Profile
NTFS-3G Lead Developer

Joined: Tue Sep 04, 2007 17:22
Posts: 1286
Post Re: Win 10: Windows is hibernated, refused to mount.
Hi,

Quote:
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.

There are two reasons which can trigger this error :
1) system is hibernated
2) the fast restart is enabled.

The $LogFile data clearly shows that the second condition is not met, then it must be the first one, the more as you had hibernated your system earlier, and as you could mount with option remove_hiberfile.

Actually, ntfs-3g checks the hibernation condition by reading the first bytes of hiberfil.sys, if "hibr" or "HIBR" is found, then the system is supposed to be hibernated.

Based on your tests, I suppose this file was created when you hibernated, and Windows 10 does not invalidate it any more when restarting, but...
Quote:
I then rebooted in Windows, did a full powerdown and booted any one of the 3 Linux systems:
root@riposo:~/works# mount /C
Windows is hibernated, refused to mount.

So apparently Windows 10 keeps track of having been hibernated in the past and restores the hiberfil.sys !

On my own Windows 10, I do not have the option to hibernate (I can only shut down or restart). I think this is because hibernation is deactivated (by "powercfg /h off"). It may also be different on a laptop.

Was the hibernation activated when you hibernated the first time ?
Can you confirm the hiberfil.sys is recreated even though you do not hibernate (and hibernation is deactivated) ?

Regards

Jean-Pierre


Tue Aug 04, 2015 21:49
Profile

Joined: Tue Aug 04, 2015 14:06
Posts: 5
Post Re: Win 10: Windows is hibernated, refused to mount.
To prevent misunderstandings: with "suspending" I mean suspending to memory ("sleep" in Windows speak) and with "hibernating" suspending to disk.

Yes, when booting into Windows after having opened the Windows partition with "-o remove_hiberfile" the hiberfil.sys was recreated and its first 4 bytes indeed read "HIBR".
Issuing "powercfg /h off" in a Command Prompt for Administrator removed that hiberfil.sys file. It was not recreated when rebooting into Windows nor when suspending Windows.
In other words, the "powercfg /h off" command resolved my problem.

I am absolutely sure that my Windows was never hibernated. Actually this desktop has not had a Windows for years. As I do support for PartedMagic I thought that testing with Win 10 would be a good idea. So last week I dusted off a 2011 recovery CD for Win 7, installed it and brought it up to date by installing all 4 years worth of fixes. I then upgraded this installation to Win 10. During that whole process I never suspended or hibernated the installation.
On the "Control Panel\Hardware and Sound\Power Options\System Settings" panel only the Sleep and Lock options were and are checked, the Fast Startup and Hibernate options were and are unchecked.
Obviously the Hibernate option being unchecked is not equivalent to the "powercfg /h off" command ...

As a final thought, is not only a hiberfil.sys younger than the pagefile.sys a sure indication of Windows being hibernated?

Kind regards, Dick


Wed Aug 05, 2015 10:06
Profile

Joined: Tue Aug 04, 2015 14:06
Posts: 5
Post Re: Win 10: Windows is hibernated, refused to mount.
Correction: As a final thought, is not only a hiberfil.sys not older than the pagefile.sys a sure indication of Windows being hibernated?
:mrgreen:


Wed Aug 05, 2015 11:10
Profile
NTFS-3G Lead Developer

Joined: Tue Sep 04, 2007 17:22
Posts: 1286
Post Re: Win 10: Windows is hibernated, refused to mount.
Hi,

Quote:
Issuing "powercfg /h off" in a Command Prompt for Administrator removed that hiberfil.sys file. It was not recreated when rebooting into Windows nor when suspending Windows.
In other words, the "powercfg /h off" command resolved my problem.

So, in this respect, Windows 10 behaves like Windows 8.
Quote:
Correction: As a final thought, is not only a hiberfil.sys not older than the pagefile.sys a sure indication of Windows being hibernated?

How would you know this is free from some race or uncontrolled conditions depending on active drivers or applications ?

Regards

Jean-Pierre


Wed Aug 05, 2015 21:12
Profile

Joined: Tue Aug 04, 2015 14:06
Posts: 5
Post Re: Win 10: Windows is hibernated, refused to mount.
Quote:
How would you know this is free from some race or uncontrolled conditions depending on active drivers or applications ?
I do not, I was just reasoning.

For testing purposes I issued a "powercfg /h on" command: immediately a hiberfil.sys was created. I also enabled hibernation on the Power > System Settings screen.
I then rebooted into Slackware: ntfs-3g did not bark. The first 4 bytes of the hiberfil.sys read "WAKE".
I rebooted into Windows and invoked a hibernation.
I then rebooted into Slackware: ntfs-3g barked on all NTFS partitions that were mounted at the moment of the hibernation. The first 4 bytes of the hiberfil.sys read "HIBR".
I rebooted into Windows: the session was restored.
I then rebooted into Slackware: ntfs-3g did not bark. The first 4 bytes of the hiberfil.sys read "WAKE".
I rebooted into Windows, suspended the session and unsuspended it.
I then rebooted into Slackware: ntfs-3g barked at the Windows C: partition. The first 4 bytes of the hiberfil.sys read "HIBR". <<< This is my initial problem again.
I rebooted into Windows and issued a "powercfg /h off". The hiberfil.sys was removed and was not recreated upon a sleep or a reboot. <<< This is my initial resolution again.

In other words: Suspending a Windows session when hibernating is not off causes an anomaly that makes ntfs-3g think Windows is hibernated. Whether this is Windows 10 specific I do not know. If you want I can test things with Win 7. I do not have a Win 8{,.1} install.
:mrgreen:


Thu Aug 06, 2015 12:30
Profile
NTFS-3G Lead Developer

Joined: Tue Sep 04, 2007 17:22
Posts: 1286
Post Re: Win 10: Windows is hibernated, refused to mount.
Hi,

Quote:
I rebooted into Windows, suspended the session and unsuspended it.
I then rebooted into Slackware: ntfs-3g barked at the Windows C: partition. The first 4 bytes of the hiberfil.sys read "HIBR". <<< This is my initial problem again.

I have read somewhere that when you suspend to ram, Windows backs up the session on disk, so that you can restart after a power failure (cannot test myself). I would however expect the HIBR mark to be removed on awakening. As Windows does not wake up from hiberfil.sys on subsequent sessions, we have to find out the criterion it uses.

Regards

Jean-Pierre


Thu Aug 06, 2015 13:58
Profile

Joined: Tue Aug 04, 2015 14:06
Posts: 5
Post Re: Win 10: Windows is hibernated, refused to mount.
Awaiting your findings ...
Kind regards, Dick :mrgreen:


Fri Aug 07, 2015 12:16
Profile

Joined: Fri Feb 05, 2016 06:44
Posts: 3
Post Re: Win 10: Windows is hibernated, refused to mount.
Maybe it's because of hybrid sleep?

Btw why not just check the existence of hiberfil.sys like the kernel driver (and mount read-only with warning given)?


Fri Feb 05, 2016 06:51
Profile

Joined: Sat Feb 20, 2016 13:46
Posts: 3
Post Re: Win 10: Windows is hibernated, refused to mount.
To mount it i think u have to delete hibernated file


Fri Apr 22, 2016 12:29
Profile WWW
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Original forum style by Vjacheslav Trushkin.