# Standalone mode: execution of error state after powerloss

**URL:** <https://hub.mender.io/t/standalone-mode-execution-of-error-state-after-powerloss/6411>\
**Category:** General Discussions\
**Tags:** standalone, mender-client, power\
**Created:** [December 12, 2023, 6:41am UTC](https://hub.mender.io/t/standalone-mode-execution-of-error-state-after-powerloss/6411 "2023-12-12T06:41:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mowlwurf](https://avatars.discourse-cdn.com/v4/letter/m/77aa72/32.png) [@Mowlwurf](https://hub.mender.io/u/Mowlwurf)\
**Post date:** [December 12, 2023, 6:41am UTC](https://hub.mender.io/t/standalone-mode-execution-of-error-state-after-powerloss/6411/1 "2023-12-12T06:41:57Z")

</div>

Hello,

the [documentation](https://docs.mender.io/artifact-creation/state-scripts#power-loss) says that the mender client will transition into an error state in case of a power loss.

I don’t understand when/how this error state will be executed after reboot if I use the mender client in standalone mode.  
Do I have to call the `install` or the `commit` command again?  
Are there any uboot variables I can check?

Best regards,  
Markus

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [December 12, 2023, 10:56am UTC](https://hub.mender.io/t/standalone-mode-execution-of-error-state-after-powerloss/6411/2 "2023-12-12T10:56:50Z")

</div>

Hi @Mowlwurf,

In standalone mode, the client does not handle the reboot, and therefore does not run the error state. The recommended approach is to create and handle a custom marker for update/reboot in progress, for example at `/var/reboot-successful`, and check for it in the Update Module and/or state script, depending on the exact use case.

Greetz,  
Josef

---

<div class="post-metadata">

**Author:** ![Mowlwurf](https://avatars.discourse-cdn.com/v4/letter/m/77aa72/32.png) [@Mowlwurf](https://hub.mender.io/u/Mowlwurf)\
**Post date:** [December 12, 2023, 12:25pm UTC](https://hub.mender.io/t/standalone-mode-execution-of-error-state-after-powerloss/6411/3 "2023-12-12T12:25:34Z")

</div>

Hello @TheYoctoJester

thank you for your fast reply.

Is this approach also used by the managed mode to detect a power failure?

Best regards,  
Markus
