Using EWF and an auto-restore?

S

Scott Kelly

I have a disk based EWF system that is working great (thanks Slobodan!).

I can use ewfmgr to enable, disable, commit and restore.

My question is, is there a way to have the system do an automatic "Restore"
if it was not shutdown properly? I know I can use the API, but I am not
sure how to garantee that I know when the XPE was shutdown properly or not.

Basically I want the system to committ changes - as long as it was shutdown
properly. But if it isn't shutdown properly, I want to lose all changes. On
my system, there is always a chance that power could be pulled from the
device at any time ... even while ewfmgr is executing the "commit" or
something.

So I thought about doing this....

On startup, go ahead and execute:
ewfmgr c: -Restore
That will force the OS to restore on next reboot. So if the power gets
pulled, it will restore. Then, on shutdown (I think there is a way to have
windows run a command on shutdown), have it run:
ewfmgr c: -NoCmd
That way, since it was shutdown properly, the overlay data will be retained.

Where is the best place to hook in some sort of shutdown command fro XPE?

My fear is that after executing the -NoCmd, what if power has been pulled.
Can the OS get corrupted then? It seems like there are all these little
windows of opportunity where if power is pulled, the OS could get corrupted.

I also though about on startup running:
ewfmgr c: -Commit
so that any previous overlay cache is applied.

Does anyone have any experience using the Restore and Commit on startup and
shutdown to protect the OS.

Background: This is a disk based system 10gig. I am using EWF because in
field testing the XP OS got corrupted when customers cycled the power on and
off. I put my OS in partition 1, EWF protected 1gig. I put my application
data in partition 2, 7gig. I then have an unpartioned 1gig at the end that
FBA uses to initialize EWF. For the most part my device does not update the
O/S during normal executing. They may change IP addresses, etc. so there are
some changes to the O/S.

Thanks,
Scott
 
S

Slobodan Brcin

Hi Scott,
My question is, is there a way to have the system do an automatic "Restore"
if it was not shutdown properly? I know I can use the API, but I am not
sure how to garantee that I know when the XPE was shutdown properly or
not.

What are you trying to accomplish exactly?

I had some freaky ideas of my own how to use disk overlays, but in the end I
have chosen RAM EWF.

Do you need to commit changes every time, or sometimes during configuration
change?

When you commit, changes are written during shutdown (not in moment you call
commit) so if in that exact moment power is lost, then you are probably out
of luck.

If power is lost during startup or normal execution (most likely), nothing
wrong will happen, because nothing is saved to the disk. This is probably
behavior that you are asking for.

Best regards,
Slobodan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top