# HELP! Bootlooped my RPi with NR flow

**URL:** <https://discourse.nodered.org/t/help-bootlooped-my-rpi-with-nr-flow/59670>\
**Category:** General\
**Created:** [10 March 2022 17:54 UTC](https://discourse.nodered.org/t/help-bootlooped-my-rpi-with-nr-flow/59670 "2022-03-10T17:54:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![daxliniere](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/daxliniere/32/42187_2.png) [@daxliniere](https://discourse.nodered.org/u/daxliniere)\
**Post date:** [10 March 2022 17:54 UTC](https://discourse.nodered.org/t/help-bootlooped-my-rpi-with-nr-flow/59670/1 "2022-03-10T17:54:41Z")

</div>

Hey gang,  
I was testing out a flow which would automatically reboot my RPi whenever the RAM usage was \>75% and somehow I've got it stuck in a bootloop.  
Can anyone suggest a way to get out of this, please?

I used an execute node with `sudo reboot`.

I'm guessing I'll need to pull the SD card and modify something, but I don't have another Linux machine to work on it.

Any help appreciated!  
Dax.

---

<div class="post-metadata">

**Author:** ![daxliniere](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/daxliniere/32/42187_2.png) [@daxliniere](https://discourse.nodered.org/u/daxliniere)\
**Post date:** [10 March 2022 18:00 UTC](https://discourse.nodered.org/t/help-bootlooped-my-rpi-with-nr-flow/59670/2 "2022-03-10T18:00:33Z")

</div>

I think I got lucky. I kept trying and caught it at exactly the right moment and was able to disable the flow in the editor. Phew!!

To avoid this happening again, I've added a 5 minute delay to the output of the node.

---

<div class="post-metadata">

**Author:** ![daxliniere](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/daxliniere/32/42187_2.png) [@daxliniere](https://discourse.nodered.org/u/daxliniere)\
**Post date:** [10 March 2022 18:01 UTC](https://discourse.nodered.org/t/help-bootlooped-my-rpi-with-nr-flow/59670/3 "2022-03-10T18:01:43Z")

</div>

Out of interest, how's my way of doing this?

```auto
var now = new Date();

if((msg.topic == "Memory") && (msg.payload >= 75) && (now.getHours() >= 3) && (now.getHours() <= 9))
  {
  msg.payload = 1;
  return msg;
  }
  
return null;

```

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [10 March 2022 18:15 UTC](https://discourse.nodered.org/t/help-bootlooped-my-rpi-with-nr-flow/59670/4 "2022-03-10T18:15:55Z")

</div>

> [@daxliniere](#):
>
> Out of interest, how's my way of doing this

There is nothing wrong with what you are doing. You could be a bit more verbose for readability.

```javascript
const now = new Date();
const hh = now.getHours();

if (msg.topic == "Memory" && msg.payload >= 75 && hh >= 3 && hh <= 9) {
    msg.payload = 1;
    return msg;
}

return null;

```

  

> [@daxliniere](#):
>
> I was testing out a flow which would automatically reboot my RPi whenever the RAM usage was \>75% and somehow I've got it stuck in a bootloop.  
> Can anyone suggest a way to get out of this, please?

Start node-red in safe mode `node-red --safe`

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [24 March 2022 18:16 UTC](https://discourse.nodered.org/t/help-bootlooped-my-rpi-with-nr-flow/59670/5 "2022-03-24T18:16:24Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
