Community
OpenEnergyMonitor

Community

Post power cut emonpi is stuck at "Raspberry Pi Booting..."


(Graeme knott) #1

As in the title, we had a power cut a few days ago & now emonpi can’t boot and just displays “Raspberry Pi Booting…”

before it gets to this point it does tell me its V2.50

Best action to remedy?

I’ve searched troubleshooting and nothing obvious in there… seen a few posts in the forum but mainly around update issues.

assuming its an issue with the SD card?


(Brian Orpin) #2

How old? If quite recent it is surprising, but not unheard of for an SD card to corrupt in power off.

Have you tried unplugging and plugging back in?

Is SSH activated? If so have you tried to log in via SSH - sometimes it might say it is booting but it is a problem with the display rather than the Pi itself?


(Graeme knott) #3

Hi,

Thanks for the reply…
No joy with power cycling it, does exactly the same
Its unresponsive on the network (ping)…

So I guess the next question is how to revive (the SD?) but keep data?


(Brian Orpin) #4

In most cases the data is not retrieveable although I am sure I read somewhere (perhaps here) of someone successfully recovering data using a 3rd party tool.

Get a new SD card and flash it with a new EmonSD image and see if it boots. It will at least confirm that is the issue.

How old is the EmonPi?


(Greebo) #5

You can insert the SD Card into another working device (using a card reader) and mount the volume either natively if the device is running Linux, or using a third party tool if the device is running Windows.

If the SD Card is still readable, you should be able to get any data off it that way.


(Paul) #6

If you do have another Pi (or remove this one from it’s case) you could try connecting a screen and keyboard. although the desktop isn’t installed in the emonSD, you should be able to see how far (if at all) the emonpi is getting before failing. The printout to screen might give you the info to fix it eg running a disk repair utility.

If you have another SD card you could try putting another copy of the emonSD image in the emonPi to see if that boots. If it does, then you could plug in the card reader and old image to inspect/fix/back up.

Are you referring to the age of the SDcard or the vintage of emonSD image?

Unfortunately the latest image is not read-only, therefore the chance of failure during a power outage is significantly higher. That was a big benefit of a read-only OS.

The reason cards corrupt when power is removed is usually due to a incomplete write, ie the power was removed mid-write and the data corrupted. With the pre-oct18 images, the writes were limited, the fs was read-only and only when the feedwriter saved data from memory, momentarily every 60s, and when config files were edited etc, was the system vulnerable to power off corruption, now the OS is not RO, the writing is less controlled, it could be writing at any time, it’s a game of chance. IMO you’d be quite unlucky to corrupt the SDcard this way since the logfiles are still in RAM, but none the less, that risk has increased with losing the RO FS. I use simple battery backup UPS’s on any SD based device that isn’t RO.


(Paul) #7

Just to clarify as it hasn’t beeen specifically stated in this thread. The display is initially controlled by the emonpi-addon board as it is faster to boot up, it will display the emonpi “firmware” sketch version running on the emonpi-addon boards MCU and then display "Raspberry Pi Booting…” whilst the RPi bit of the emonPi is booting, once the RPi has booted up, it takes control of the LCD display.

So the symptoms seen here are in keeping with the emonpi-addon board doing its bit correctly and then nothing else happening. This could (in some instances) simply be the LCD driver or code not running on the otherwise fully operational RPi. In this instance though, the lack of presence on the local network suggests the RPi is not booting, but it could just be a networking issue (for example). This is also the expected behaviour if the emonPi’s RPi was totally dead, either due to HW failure or SW issues. Hence the suggestion to put the card in another RPi or remove this one from it’s case and attach a monitor.

Whilst the case is open, is there any LED activity on the RPi when you try booting?


(Luis Rodríguez Gómez) #8

Hi,
I have a similar problem than @graemetherunner.
I got my emponpi 3 months ago with pre-built sd card- I use it to monitor power consumption at home. I went off for 3 weeks and when I cambe back I had the message “Raspberry Pi Booting”.
When I power ON/OFF, the LCD shows the emonpi vresion 2.9, goes through CT detecttion and temperature probe detection, then stays in the “Raspberry Pi booting” state.
I connected an HDMI screen and what I see is a last message saying “end kernel panic -not syncing: Attempted to kill init! exitcode=0x00007f00”.

I don’t mind building a new SD card and re-configuring my system, but I would like to know how to avoid this happening again. Should I go to a Read-Only OS?


(Graeme knott) #9

thanks for the info. just found an old nix laptop and accessed the card… any clues to where data is stored… ?


(Greebo) #10

For an EmonSD image, it’s usually in /home/pi/data, depending on what data you want to retrieve of course. Thats where all the timeseries data is stored anyway.


(Graeme knott) #11

thank you. I’ve flashed a new card… the device is working, so must be a boot issue caused by the cut as per suggestions above.

In which case can I just copy the boot partition to the old sd and its fixed

both the new and old cards are flashed with the same version


(Greebo) #12

If possible, I’d take an image of your original SD card before doing anything, so you can at least get back to your starting position…

If you have the original SD card available in your other linux system, you could try and run fsck against each of the partitions on the SD card and then put it back into your RPi and see if it boots (without copying anything anywhere).

Which image?


(Graeme knott) #13

17 July 15


(Greebo) #14

I’m not sure what the image looked like back then so I don’t really feel qualified to offer any further suggestions!