Safe shutdown for headless system

D

Doug G

Our system runs headless (screen, but no mouse/kdb). It runs from a hard
disk, but the boot partition is protected by disk-based EWF that is reset on
each bootup (changes are not propogated from one boot to the next). The end
user is suspicious that some h/w failures being seen in the field are due to
the system being powered down and up without a proper shutdown sequence. The
PC supplier is also placing blame there, saying that their systems are not
meant to be powered off unless you do the Start -> Shutdown thing from
Windows. My position is that there is very little likelihood of corrupting
the disk since EWF protects the XPE image itself, and besides our
application rarely writes to the disk, which is usually spun down via power
management settings.

However, I am wondering if there is any technical solution to this
situation. The panel-mount industrial PC that we are using does have a
special connection on it for a few custom DIs and DOs. If a pushbutton were
wired to one of the DIs, I suppose I could write a program or service that
would run in the background to monitor the DI. If the button is pushed, the
program could make the necessary calls to start a system shutdown or restart
sequence.

Has anyone tackled a situation like this? Are there any other possibilities
that come to mind?

Doug Gordon
 
R

Richard

Yes, Actually, I have the same exact situation, but I took it one step
further.
I'm battery powered - 24 vdc to DC DC Converter to 5vdc to SBC.
I have 3 wires. Switch, Battery +, Battery -

There is a Pic Micro that watches voltage on the switch, when the switch is
turned off, 2 things happen
1) Timer Starts (Adjustable but currently set for 1 minute)
2) I send a signal to the SBC DI.

Now the application see's the Input, and saves information, commits, then
shutsdown
When the timer expires, the pic turns off the DC/DC converter.

If the User turns the switch back on, before the system shutdown, then the
system continues to shutdown and the power gets shutoff, a delay of 5
seconds, then everything is restarted. This eliminates the System being
powered up and the "Safe to turn off" message being shown. (dead lock).

Richard
 
S

Slobodan Brcin \(eMVP\)

Hi Doug,

Do you have enough RAM memory to use EWF with RAM overlay. (It sounds ideal to your usage).
At what point of time do you tell EWF to discard data? (Could this be a problem?)

If it come to writing code For restart use xpepm.dll or direct API calls (depending on shutdown speed that you need and if you want
to "save all data". )
But let us try to figure out if EWF was really failing.

Regards,
Slobodan
 
S

Slobodan Brcin \(eMVP\)

Hey Doug,

Have you solved all problems related to dirty bit that you once had?

Regards,
Slobodan

Doug Hoeffel said:
Doug G:

As KM stated check out:
http://groups.google.com/groups?hl=en&lr=&c2coff=1&q=bootexecute+autochk+xp+embedded

I would recommend that you look for the dirty bit being set on any
partitions not protected by EWF. I have a similar setup as you and my logs
files have been corrupted due to abnormal shutdown.

Also, make sure you set the autocheck timeout to 0 via:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager]
"AutoChkTimeOut"=dword:00000000

so you don''t delay startup by 30 seconds as checkdsk is waiting to run.

HTH
...Doug H
Doug G said:
Slobodan:

We don't really have enough memory for RAM EWF. I reset the EWF at each
bootup by issuing the command "ewfmgr d: -setlevel=-1". This command is
always re-issued after a successful boot, so the EWF level and contents are
effectively cleared on each bootup. One reason for doing things this way is
that, if called for, I can manually go in and override it with a "commit"
command to save the current configuration.

In any case, I don't think that corruption of the XPE boot partition is an
issue. However, there is another partition on the disk that is not
EWF-protected because it is the area used for the user data files and log
files that do get written occasionally. My feeling is that data corruption
in fact is not occurring *at all*, but our PC vendor is blaming the current
problems on the shutdown sequence issue.

Doug


(depending on shutdown speed that you need and if you want The sequence. pushed,
 
S

Slobodan Brcin \(eMVP\)

Doug,

I have not seen any useful info so far on this subject :(
But I will let you know.

Regards,
Slobodan


Doug Hoeffel said:
Slobodan:

Unfortunatly no I have not resolved this. But on a good note... this
remaining issue is very low priority compared to the problem that the
RAM-based EWF solved. I'm at the point of diminishing returns... plus I'm
working on other things now but I do check the NG daily to see if anyone
else has come across and resolved any of the low(er) priority issues that my
product still has. Plus, if and when I have the opportunity to re-spin my
XPe image (for SP2 for example), I always try to incorporate any bug fixes
that I can. I'm still curious about this dirty bit issue... its just that I
can't spend much time on it at the moment. Hey... if you ever come across
some good info. on the problem I'd be interested in your findings :)

Thanks...
... Doug

Slobodan Brcin (eMVP) said:
Hey Doug,

Have you solved all problems related to dirty bit that you once had?

Regards,
Slobodan

Doug G:

As KM stated check out:
http://groups.google.com/groups?hl=en&lr=&c2coff=1&q=bootexecute+autochk+xp+embedded

I would recommend that you look for the dirty bit being set on any
partitions not protected by EWF. I have a similar setup as you and my logs
files have been corrupted due to abnormal shutdown.

Also, make sure you set the autocheck timeout to 0 via:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager]
"AutoChkTimeOut"=dword:00000000

so you don''t delay startup by 30 seconds as checkdsk is waiting to run.

HTH
...Doug H
Slobodan:

We don't really have enough memory for RAM EWF. I reset the EWF at each
bootup by issuing the command "ewfmgr d: -setlevel=-1". This command i s
always re-issued after a successful boot, so the EWF level and contents
are
effectively cleared on each bootup. One reason for doing things this way
is
that, if called for, I can manually go in and override it with a "commit"
command to save the current configuration.

In any case, I don't think that corruption of the XPE boot partition is an
issue. However, there is another partition on the disk that is not
EWF-protected because it is the area used for the user data files and log
files that do get written occasionally. My feeling is that data corruption
in fact is not occurring *at all*, but our PC vendor is blaming the
current
problems on the shutdown sequence issue.

Doug


Hi Doug,

Do you have enough RAM memory to use EWF with RAM overlay. (It sounds
ideal to your usage).
At what point of time do you tell EWF to discard data? (Could this be a
problem?)

If it come to writing code For restart use xpepm.dll or direct API calls
(depending on shutdown speed that you need and if you want
to "save all data". )
But let us try to figure out if EWF was really failing.

Regards,
Slobodan

Our system runs headless (screen, but no mouse/kdb). It runs from a
hard
disk, but the boot partition is protected by disk-based EWF that is
reset on
each bootup (changes are not propogated from one boot to the next).
The
end
user is suspicious that some h/w failures being seen in the field are
due to
the system being powered down and up without a proper shutdown
sequence.
The
PC supplier is also placing blame there, saying that their systems are
not
meant to be powered off unless you do the Start -> Shutdown thing from
Windows. My position is that there is very little likelihood of
corrupting
the disk since EWF protects the XPE image itself, and besides our
application rarely writes to the disk, which is usually spun down via
power
management settings.

However, I am wondering if there is any technical solution to this
situation. The panel-mount industrial PC that we are using does have a
special connection on it for a few custom DIs and DOs. If a pushbutton
were
wired to one of the DIs, I suppose I could write a program or service
that
would run in the background to monitor the DI. If the button is
pushed,
the
program could make the necessary calls to start a system shutdown or
restart
sequence.

Has anyone tackled a situation like this? Are there any other
possibilities
that come to mind?

Doug Gordon
 
D

Doug G

Slobodan:

We don't really have enough memory for RAM EWF. I reset the EWF at each
bootup by issuing the command "ewfmgr d: -setlevel=-1". This command is
always re-issued after a successful boot, so the EWF level and contents are
effectively cleared on each bootup. One reason for doing things this way is
that, if called for, I can manually go in and override it with a "commit"
command to save the current configuration.

In any case, I don't think that corruption of the XPE boot partition is an
issue. However, there is another partition on the disk that is not
EWF-protected because it is the area used for the user data files and log
files that do get written occasionally. My feeling is that data corruption
in fact is not occurring *at all*, but our PC vendor is blaming the current
problems on the shutdown sequence issue.

Doug

Hi Doug,

Do you have enough RAM memory to use EWF with RAM overlay. (It sounds ideal to your usage).
At what point of time do you tell EWF to discard data? (Could this be a problem?)

If it come to writing code For restart use xpepm.dll or direct API calls
(depending on shutdown speed that you need and if you want
 
K

KM

Doug,

You may schedule scandisk on that non EWF protected data partition if no successful shutdown performed.
Search NG archive for "autocheck" from more details.
 
D

Doug Hoeffel

Doug G:

As KM stated check out:
http://groups.google.com/groups?hl=en&lr=&c2coff=1&q=bootexecute+autochk+xp+embedded

I would recommend that you look for the dirty bit being set on any
partitions not protected by EWF. I have a similar setup as you and my logs
files have been corrupted due to abnormal shutdown.

Also, make sure you set the autocheck timeout to 0 via:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager]
"AutoChkTimeOut"=dword:00000000

so you don''t delay startup by 30 seconds as checkdsk is waiting to run.

HTH
....Doug H
 
D

Doug Hoeffel

Slobodan:

Unfortunatly no I have not resolved this. But on a good note... this
remaining issue is very low priority compared to the problem that the
RAM-based EWF solved. I'm at the point of diminishing returns... plus I'm
working on other things now but I do check the NG daily to see if anyone
else has come across and resolved any of the low(er) priority issues that my
product still has. Plus, if and when I have the opportunity to re-spin my
XPe image (for SP2 for example), I always try to incorporate any bug fixes
that I can. I'm still curious about this dirty bit issue... its just that I
can't spend much time on it at the moment. Hey... if you ever come across
some good info. on the problem I'd be interested in your findings :)

Thanks...
.... Doug

Slobodan Brcin (eMVP) said:
Hey Doug,

Have you solved all problems related to dirty bit that you once had?

Regards,
Slobodan

Doug G:

As KM stated check out:
http://groups.google.com/groups?hl=en&lr=&c2coff=1&q=bootexecute+autochk+xp+embedded

I would recommend that you look for the dirty bit being set on any
partitions not protected by EWF. I have a similar setup as you and my logs
files have been corrupted due to abnormal shutdown.

Also, make sure you set the autocheck timeout to 0 via:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager]
"AutoChkTimeOut"=dword:00000000

so you don''t delay startup by 30 seconds as checkdsk is waiting to run.

HTH
...Doug H
Doug G said:
Slobodan:

We don't really have enough memory for RAM EWF. I reset the EWF at each
bootup by issuing the command "ewfmgr d: -setlevel=-1". This command i s
always re-issued after a successful boot, so the EWF level and
contents
are
effectively cleared on each bootup. One reason for doing things this
way
is
that, if called for, I can manually go in and override it with a "commit"
command to save the current configuration.

In any case, I don't think that corruption of the XPE boot partition is an
issue. However, there is another partition on the disk that is not
EWF-protected because it is the area used for the user data files and log
files that do get written occasionally. My feeling is that data corruption
in fact is not occurring *at all*, but our PC vendor is blaming the current
problems on the shutdown sequence issue.

Doug


Hi Doug,

Do you have enough RAM memory to use EWF with RAM overlay. (It sounds
ideal to your usage).
At what point of time do you tell EWF to discard data? (Could this be a
problem?)

If it come to writing code For restart use xpepm.dll or direct API calls
(depending on shutdown speed that you need and if you want
to "save all data". )
But let us try to figure out if EWF was really failing.

Regards,
Slobodan

Our system runs headless (screen, but no mouse/kdb). It runs from
a
hard
disk, but the boot partition is protected by disk-based EWF that is
reset on
each bootup (changes are not propogated from one boot to the
next).
The
end
user is suspicious that some h/w failures being seen in the field are
due to
the system being powered down and up without a proper shutdown sequence.
The
PC supplier is also placing blame there, saying that their systems are
not
meant to be powered off unless you do the Start -> Shutdown thing from
Windows. My position is that there is very little likelihood of
corrupting
the disk since EWF protects the XPE image itself, and besides our
application rarely writes to the disk, which is usually spun down via
power
management settings.

However, I am wondering if there is any technical solution to this
situation. The panel-mount industrial PC that we are using does have a
special connection on it for a few custom DIs and DOs. If a pushbutton
were
wired to one of the DIs, I suppose I could write a program or service
that
would run in the background to monitor the DI. If the button is pushed,
the
program could make the necessary calls to start a system shutdown or
restart
sequence.

Has anyone tackled a situation like this? Are there any other
possibilities
that come to mind?

Doug Gordon
 

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