Can you ever lose saved information from a bad hibernation/boot on Windows?

3

Modern Windows versions hibernate by default rather than shutting down. I remember hearing that you can lose data, even when you have saved it to disk, if the hibernation process or the boot up goes badly and the hiberfil.sys gets deleted. Here is an example of someone reporting this: https://social.technet.microsoft.com/Forums/windows/en-US/e82ba84c-f0c5-4ee1-856d-b652f5cad6df/hibernation-file-deleted-but-saved-data-lost

I can understand how you would lose unsaved data, but can you indeed lose saved data in this case? How does this happen? Shouldn't any saved data be written to the filesystem independently of what's in hiberfil.sys?

katriel

Posted 2015-02-24T13:24:40.600

Reputation: 155

Can you link to what you heard exactly? You are not going to lose saved data, its already been saved, the provided link talks about data that wasn't saved prior to entering hibernation. If you are that worried then you should disable hibernation. – Ramhound – 2015-02-24T13:26:14.803

I added something I found googling, but I hadn't been able to find what I remembered. – katriel – 2015-02-24T13:27:17.663

I think formerly I was looking at it in the context of dual-booting with Linux: https://superuser.com/questions/144720/missing-files-when-windows-7-returns-from-hibernate-w-dual-boot. I recognize that this is a different issue than Windows deleting its "own" files.

– katriel – 2015-02-24T13:28:39.897

@Ramhound Unfortunately I'm trying to diagnose a problem I'm actually having right now (though the computer in question is out of my reach for the afternoon). It looks to me like the example I posted is about saved data that got lost: "My SPSS file that I've been working with and saving changes everyday" – katriel – 2015-02-24T13:31:23.800

Call my cynical but when somebody says they saved a file everyday, end up losing said file, and are told the SPSS does not create temporary files. I have a hard time believing they actually saved that file everyday. In other words I have not actual seen a real case of this somebody losing data they actually saved to the disk because the hibernation file was deleted. – Ramhound – 2015-02-24T13:44:52.190

As I indicated. If you are that worried you should disable hibernation mode. If you are dual booting then you should verify Windows was shutdown. What is described in that question is to be expected and would happen in any operating system that supported a hibernation mode. – Ramhound – 2015-02-24T13:47:16.823

Answers

2

You shouldn't lose information already stored on the disk. However, a write-back cache might explain this.

A write-back cache increases performance by placing data to be written to disk into a memory area and deferring the actual writing onto the disk to a later time so that multiple writes can be combined. However, applications writing data are told that the data is written as soon as it is in the cache, not when it is committed to disk.

If hibernation occurred before the cache was flushed, the only copy of the data would be in the hiberfil.sys. A failed resume would result in data loss.

Other possible explanations include file system corruption and simple user error.

user422311

Posted 2015-02-24T13:24:40.600

Reputation: