Hi, 3 of our recently purchased EmonPi’s are stuck in Raspberry Pi Booting. I understand it is an SD card issue, do replacements get sent out?
Thanks
John
Hi, 3 of our recently purchased EmonPi’s are stuck in Raspberry Pi Booting. I understand it is an SD card issue, do replacements get sent out?
Thanks
John
Can you access the web interface?
Have you attempted a hard restart?
On first boot it is important that the EmonPi is left to do all it’s updates. Not doing so can cause issues.
Hi Brian, thanks for the prompt reply - I left it for about 10 minutes or more. The others that we have booted up in a minute or so. I can’t turn on SSH so perhaps you could guide me as to how to access the web interface? The hard restart using the reset button doesnt work
Thanks
John
Leave it for an hour IME just to be sure - patience is a virtue…
If you have already done a hard reset before it finished the updates, that is probably the issue.
Are they on an Ethernet cable (connected to your router/switch not your PC)? If so search for the device (Fing app on your android phone) to find the IP and see if you can connect to the web interface (just type the IP into a computer on the same network).
Did you look at the RFM https://guide.openenergymonitor.org/setup/?
I seem to be in the same position.
My EmonPI web interface wasn’t responding properly - graphs wouldn’t come up.
But it could be pinged on its usual address.
I couldn’t login on ssh.
I went to look at it and the screen was blank and nothing happened when pushing the button.
I turned it off and on - display says AC Wave detected etc, then stops on Raspbery Pi booting.
No IP, no sign of life.
I suppose I have to pull it out, connected dsplay to the Pi and see why it doesn’t boot? Corrupted SD card I suppose?
@Elbow sorry to hear that, is your EmonPi a new SD card running the latest image?
I’ve had it 3 or 4 years, but I do update the firmware from time to time.
Unfortunately my backup isn’t too recent - maybe a couple of months old - so I suppose my historical data is toast.
Most likely the SD Card has some corruption.
Only between then and now.
OK - got a chance to open up my EmonPi and retrieve the SD.
Putting it into my Ubuntu machine and I get:
[365014.298338] usb 1-2: new high-speed USB device number 14 using xhci_hcd
[365014.450284] usb 1-2: New USB device found, idVendor=05e3, idProduct=0727
[365014.450286] usb 1-2: New USB device strings: Mfr=3, Product=4, SerialNumber=2
[365014.450287] usb 1-2: Product: USB Storage
[365014.450288] usb 1-2: Manufacturer: Generic
[365014.450289] usb 1-2: SerialNumber: 000000000251
[365014.451170] usb-storage 1-2:1.0: USB Mass Storage device detected
[365014.451715] scsi host0: usb-storage 1-2:1.0
[365015.471217] scsi 0:0:0:0: Direct-Access Generic STORAGE DEVICE 0251 PQ: 0 ANSI: 0
[365015.471511] sd 0:0:0:0: Attached scsi generic sg0 type 0
[365015.592237] sd 0:0:0:0: [sda] 15126528 512-byte logical blocks: (7.74 GB/7.21 GiB)
[365015.593078] sd 0:0:0:0: [sda] Write Protect is off
[365015.593079] sd 0:0:0:0: [sda] Mode Sense: 0b 00 00 08
[365015.593921] sd 0:0:0:0: [sda] No Caching mode page found
[365015.593924] sd 0:0:0:0: [sda] Assuming drive cache: write through
[365015.598013] sda: sda1 sda2 sda3
[365015.600757] sd 0:0:0:0: [sda] Attached SCSI removable disk
[365021.963455] sd 0:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[365021.963467] sd 0:0:0:0: [sda] tag#0 Sense Key : Not Ready [current]
[365021.963475] sd 0:0:0:0: [sda] tag#0 Add. Sense: Medium not present
[365021.963483] sd 0:0:0:0: [sda] tag#0 CDB: Read(10) 28 00 00 00 02 00 00 00 f0 00
[365021.963489] print_req_error: I/O error, dev sda, sector 512
[365021.965178] sd 0:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[365021.965188] sd 0:0:0:0: [sda] tag#0 Sense Key : Not Ready [current]
[365021.965197] sd 0:0:0:0: [sda] tag#0 Add. Sense: Medium not present
[365021.965206] sd 0:0:0:0: [sda] tag#0 CDB: Read(10) 28 00 00 00 02 f0 00 00 10 00
[365021.965212] print_req_error: I/O error, dev sda, sector 752
[365021.966576] sd 0:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[365021.966589] sd 0:0:0:0: [sda] tag#0 Sense Key : Not Ready [current]
[365021.966605] sd 0:0:0:0: [sda] tag#0 Add. Sense: Medium not present
[365021.966617] sd 0:0:0:0: [sda] tag#0 CDB: Read(10) 28 00 00 00 02 00 00 00 08 00
[365021.966629] print_req_error: I/O error, dev sda, sector 512
[365021.966645] Buffer I/O error on dev sda, logical block 64, async page read
[365022.007813] sda: detected capacity change from 7744782336 to 0
So it does look like my card is toast.
I got this as an assembled EmonPi - I guess I have to make a new card with the image on it and then try to restore my backup? Is there a process written up anywhere?
Thanks,
Steve
It doesn’t often appear as such, but experience has shown that a new image on a new card usually solves odd problems like this.
I had a look at the card and it seems like it is only mmblk0p1 is damaged.
I was able to copy the other two partitions off the card.
Looking at the fstab, it see,s
tmpfs /tmp tmpfs nodev,nosuid,size=30M,mode=1777 0 0
tmpfs /var/tmp tmpfs nodev,nosuid,size=1M,mode=1777 0 0
tmpfs /var/log tmpfs nodev,nosuid,size=50M,mode=1777 0 0
tmpfs /var/lib/dhcp tmpfs nodev,nosuid,size=1M,mode=1777 0 0
tmpfs /var/lib/dhcpcd5 tmpfs nodev,nosuid,size=1M,mode=1777 0 0
tmpfs /var/lib/openhab tmpfs nodev,nosuid,size=40M,mode=1777 0 0
tmpfs /var/lib/php/sessions tmpfs nodev,nosuid,nofail,size=5M,mode=1777 0 0
proc /proc proc defaults 0 0
/dev/mmcblk0p1 /boot vfat defaults,noatime,nodiratime 0 2
/dev/mmcblk0p2 / ext4 defaults,ro,noatime,nodiratime,errors=remount-ro 0 1
/dev/mmcblk0p3 /home/pi/data ext2 defaults,rw,noatime,nodiratime,errors=remount-ro 0 2
So it seems the broken partition was /boot.
So I should be able to reassemble a new card if I can image the same version of the card and then copy the root and /home/pi/data partitions from the images I have.
How do I find out what version the card is? The /etc/issue says “Raspbian GNU/Linux 8 \n \l”.
Oddly on partition 2 there is a boot directory that contains kernels etc - so I’m not sure what that is in relation to partition 1 which mounts over that directory.
@trystan may well be better to answer this but don’t try and copy the OS; it is old anyway and has lots of inherent problems that the new image fixes.
If you can copy the data folders, as a minimum, start start with a new EmonSD image and copy across the data folders.
You will need to rebuild the dashboards and feeds etc as you will have lost that information.
What you may be able to do is reload your old backup (which will include feeds etc), then overwrite the data directories with those you can read off the card - but I’m not sure if that will work.
Hi @borbin,
Thanks for your help. I bought my EmonPI back in early 2017.
I did do updates on the web interface from time to time but it seems it doesn’t update the basic Raspbian image?
It does look like my historical data is toast? I have a backup made by the option on the web interface but seems like you are saying that that doesn’t have the old feed data?
I had many inputs and feeds so I’m facing quite a bit of work to set it all up by hand again.
Anyway - lets start with the Oct 2019 image and see where things go.
Answering the question because it was asked…
That’s Raspbian Jessie.
As Brian said in his post above, you’ll definitely not want to continue using it.
OK - thanks. - Turned out easier than expected.
I made a new card with the Oct2019 version.
Restoring my backup brought back my feeds and graphs and what not. I had duplication of devices so I cleaned up.
My backup tarball only had a database dump and a few files - didn’t include the phpfine and phptimeseries directories.
So I copied them from /home/pi/data I think it was and guessed that they needed to go into the new /var/opt/emoncms.
Booting up after that there was a quite long time when the display showed Updating, but once done I seem to be back in business with my history intact.
Thanks for the help.
For others like me who haven’t dug into the detailed working - it seems that the ordinary update process in the web interface just updates the emoncms code itself and doesn’t update the underlying raspbian? Is that right? If so, what is the “proper” way to keep the OS up to date?
Thanks.
Steve
My backup did not include the I then shut down and copied the php… directories onto the 3rd partition. On booting up there was
We do try.
Which is odd.
Which is what one would expect - when you update an application on Windows, does that update the Windows installation as well?
Google is your friend Raspberry Pi Documentation - Raspberry Pi OS
Did you take a fresh backup?
I recall reading a thread some time back where updating the OS caused some things to break.
Is that still the case, or has that become a non-issue? i.e was that a problem with Jessie but
no longer an issue with Stretch or Buster?
I have a feeling there was an issue with Stretch and MQTT at one point, but I’m reasonably sure it is fine now.