openenergymonitor / emonpi

Raspberry Pi Based Energy Monitor. Hardware, Firmware & related software for the PI.
https://guide.openenergymonitor.org/setup
270 stars 113 forks source link

Emonpi + latest prebuilt SD image always leads to Kernel Panic #142

Open johnalanwoods opened 1 year ago

johnalanwoods commented 1 year ago

Hi,

I'm using a physical EmonPi, with the latest version of the prebuilt SD: emonSD-21Jul21 (Stable)

I've dd'd the image to a number of SD cards, and found that no matter how many times I try, as soon as I set up Wifi or plug in Ethernet, the EmonPi card corrupts (resulting in a message during Pi boot of Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block.

On boot, the EmonPi simply shows a message saying booting...

I had been running a happy EmonPi for months, and noticed after a power cut (read: reboot) that this issue occurred, I'm only realising now that this isn't an issue with my SD card, but with the latest SD card, Raspberry Pi OS, and whatever updates are applied after initial setup.

Is anyone else seeing issues using the prebuilt SD with vanilla setup?

I tried to use fsck.ext4 to fix the panic, but the result is a message saying:

Input/output error while recovering journal of rootfs No medium found while trying to open /dev/sdb2

The superblock could not be read or does not describe a valid ext2/3/4 filesystem.

Again, I can replicate this by imagine the latest prebuilt to an SD card, putting it in any EmonPi I own, booting initial setup (via Wifi or Ethernet), then near immediately Apache gives a 403 Forbidden and next reboot yields the disk corruption issue I mentioned above.

Any ideas?

glynhudson commented 1 year ago

This sounds like the SD card is not being written correctly. I would recommend using https://etcher.io/ to write the SD card. Upon first boot up ensure Ethernet is connected and leave it for about 10min-15min to complete the first boot update process before creating an account. I also recommend using good quality industrial grade SD cards.