• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Default Hibernation in XP Home?

kevinthenerd

Platinum Member
Cliff notes:
Is there a way in XPH to start the computer every time with a default hibernation memory image?

Longer version:
I have XP Home on my laptop. Is there a way to script up something at shutdown or on startup so that each time I start my laptop it boots up a default memory image? I'd like to use Hibernate all the time but I have a feeling a true reboot every now and then would do the computer some good. Hibernation startup is quick, and if I could have a default startup every time I start the computer it would be as if I had started it afresh. Plus, it would be nice to have a default set of applications up and running without a whole lot of time spent in startup.

If you can't help me directly, perhaps you can answer some questions to get me started. Where is the hibernation file stored? How does Windows know to use it? When and where does Windows check for this file or for the command to load it?

Thanks.
 
Supposedly there should be a hiberfil.sys in the root of the C drive, but how is it triggered? When can I swap it out for my desired hiberfil.sys.. before boot, during boot, after boot...?

(Now, if I really wanted to get creative, is there a way to dual-boot by putting some kind of bogus hibernation file there that contains a Linux memory dump? This would be some serious stuff.)
 
I suppose getting the operating system to load the hiberfil.sys file every time would be the hard part. Copying a default memory image into it should be the easy part, right? I suppose it would take a good bit of time to copy a 1 gig file, but if it's on shutdown it doesn't matter TOO much, unless it's for my laptop.
 
You won't be able to do this unless Windows' hibernation was designed to support it because the state of the filesystems is also kept in that file so putting back an old hiberfil.sys file will confuse the kernel.
 
Originally posted by: Nothinman
You won't be able to do this unless Windows' hibernation was designed to support it because the state of the filesystems is also kept in that file so putting back an old hiberfil.sys file will confuse the kernel.

When the computer starts up, isn't the state of the file system always the same? As long as the NTFS doesn't have some sort of weird write abortion going on, I'd imagine a system with 2 optical drives and a hard drive wouldn't be all that different each time. Are you saying that the file table is kept in RAM? Isn't there a way to force the OS to refresh the status or something?

As a test, I guess I could copy the hiberfil.sys to another file, hibernate the machine, boot it into Knoppix or some other live Linux distro, copy the old hiberfil.sys into the new one (as long as the file lengths are the same... otherwise Linux implementations of NTFS would totally screw everything up), start the machine, and hope that the file system doesn't become corrupt as a result.
 
When the computer starts up, isn't the state of the file system always the same? As long as the NTFS doesn't have some sort of weird write abortion going on, I'd imagine a system with 2 optical drives and a hard drive wouldn't be all that different each time. Are you saying that the file table is kept in RAM? Isn't there a way to force the OS to refresh the status or something?

I can't say 100% for NTFS since I don't have the source to the NTFS driver but for FAT it definitely does cache at least part of the FAT and that gets stored in the hibernation file and restored upon resume no matter what changes happened to the filesystem while the system was hibernated.
 
Originally posted by: kevinthenerd
I suppose getting the operating system to load the hiberfil.sys file every time would be the hard part. Copying a default memory image into it should be the easy part, right? I suppose it would take a good bit of time to copy a 1 gig file, but if it's on shutdown it doesn't matter TOO much, unless it's for my laptop.

It's not just the hibernation file (which is a snapshot of your physical memory) but your pagefiles as well. If those are out of sync your going to have one seriously unhappy system.

Your spending all this effort because 'I have a feeling that', just hibernate. I have systems that have only been restarted for patches, other than that they never reboot.
 
Back
Top