How can you tell from dos if a system just hibernated?

Hi I would like to know how you can tell from Dos if a system just hibernated? I'm writing a utility that I'll run before Norton Ghost. I know there are windows Backup titles and many other options. However I actually like backing up in dos....




Topic Options
#112322 - 10/09/02 07:11 AM How can you tell from dos if a system just hibernated?
Christianb Offline
old hand

Registered: 11/10/01
Posts: 759
Hi I would like to know how you can tell from Dos if a system just hibernated? I'm writing a utility that I'll run before Norton Ghost. I know there are windows Backup titles and many other options. However I actually like backing up in dos. Almost nothing can go wrong. No Virusses, No crashing, No files in use, No etc... Also you can delete Hiberfil.sys if the user didn't just hibernate. Of course you can delete it anyways, but that would definetly be annoying: getting error messages and loosing your application states, and possibly some unsaved files.

So how about it do any of your MCPs, A+'s, or MCSEs know how to do it?
Thanks a zillion,
Christian Blackburn

Top
Advertisement
#112331 - 10/09/02 01:41 PM Re: How can you tell from dos if a system just hibernated?
Tomay Offline
addict

Registered: 10/09/01
Posts: 530
I just played with my second system which has 2 partitions C: win98 D:w2000 sp3. I hibernated, and then used a cdrom to boot into dos. (took me a while, cos I got an old scsi burner and it took a few tries to figure out that the boot sequence has to be scsi... to boot from scsi cd-rom laugh )
Since I still like to use dos from time to time I understand you. But I hate ntfs and sometimes even fat32 and sometimes even norton comannder, cos it cuts all my long filenames and then everything looks like file~1.

I figured out two ways to determine if a sys is hibernated. On my C: was a file called "hiberfil.sys" just like the one od D: but just 40 bytes long, and when I opened it was "linkmulti(0)disk(0)rdisk(0)partition(2)" I deleted the file and the system did not resume from hibernation, but went to the bootmenu. I wandered if there wobuld be any errors if I booted win2k, so I tried, but it didn't do a fresh boot it just returned from hibernation. So at boot the hiberfil.sys is checked before boot.ini so if you have a multi os system you can't boot to other systems while in hibernation or can you? I tired after deleting the hiberfil.sys on c: and I could boot to w98 and then normaly resumed from hibernation afterwards. (but be careful when you do this on w xp without the sp1 or w2k without sp3. Everything i changed, installed ... while in hibernation booting to another system was trashed and put in a "found.000" folder when resuming from hib. M$ says it is fixed in the sp1, but be careful)

when you're not in hibernation there is no hiberfil.sys on c: so you could write something like "if exist c:hiberfil.sys then..." (haven't got an A+ in programing) smile

So how does the windows know when it's hibernated and when not. When viewing the hiberfil.sys on d:, that has the size of my ram i noticed "hibr" at the start of the file when it was in hibernation, when it was not there was nothing i could read.

This is for a multi OS system i don't know what happens when you have a single xp sys. But try to look for something similar.

Hope it helps. Good luck.

Btw post back when you wrote the utillity and what it does. I'm interested (very) 8)

Top
#112345 - 10/09/02 09:32 PM Re: How can you tell from dos if a system just hibernated?
Christianb Offline
old hand

Registered: 11/10/01
Posts: 759
On a single OS system HiberFil.sys is always present. I have to take a look a the start of the HiberFil.sys file, thanks for your help. The HiberFil.sys is also always = my ammount of ram or not there if I deleted it.

Top
#112362 - 10/10/02 12:51 AM Re: How can you tell from dos if a system just hibernated?
Christianb Offline
old hand

Registered: 11/10/01
Posts: 759
Thanks for your Help Tomay,
Christian

Top
#112406 - 10/10/02 02:41 PM Re: How can you tell from dos if a system just hibernated?
Tomay Offline
addict

Registered: 10/09/01
Posts: 530
I'll take a look at a single OS system, when I get to one. Right now all my comp's a multi os. I guess I just can't without the old w98. smile

Top
#112428 - 10/10/02 11:30 PM Re: How can you tell from dos if a system just hibernated?
Christianb Offline
old hand

Registered: 11/10/01
Posts: 759
Ya I emulate windows 98 in my Virtual PC 5.0 program.

Top
#112429 - 10/10/02 11:30 PM Re: How can you tell from dos if a system just hibernated?
Christianb Offline
old hand

Registered: 11/10/01
Posts: 759
I use Virtual PC for software development mainly so I can test compatiblity.

Top


Forums
Windows Support Forums
Everything New Technology
Legacy OS
Hardware
Software
Games
Networking
Customization & Tweaking
Security

Linux Support Forums
Everything Linux
Linux Hardware
Linux Software
Linux Games
Linux Networking
Linux Customization & Tweaking
Linux Security

Apple Support Forums
Everything Apple
Recent Topics
MSDTC - Update causes Apps to fail
by Zman
6 minutes 38 seconds ago
Ntloader missing message when trying to install xp
by Complutenovice
07/10/09 04:20 AM
Odd 3DO malfuction.
by one thread wonder
07/09/09 06:53 AM
DosBox v0.73 Released
by jmmijo
07/09/09 04:20 AM
qtech winxp pc
by johnmony
07/08/09 12:58 AM
Who's Online
1 Registered (Zman), 165 Guests and 13 Spiders online.
Key: Admin, Global Mod, Mod
Forum Stats
90558 Members
24 Forums
52396 Topics
182627 Posts

Max Online: 1079 @ 03/12/08 01:36 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22