update from 2.5.0 to 2.5.2 failed
The update from 2.5.0 to 2.5.2 fails.
The update failed: Command '['sudo', '/opt/tinypilot-privileged/update']' returned non-zero exit status 100.
The issue appears to be here:
dpkg: unrecoverable fatal error, aborting:
reading statoverride file '/var/lib/dpkg/statoverride': Is a directory
W: Could not open file '/var/log/apt/history.log' - OpenLog (21: Is a directory)
E: Sub-process /usr/bin/dpkg returned an error code (2)
Here are the log hopefully:
Linked from:
- David @david2023-01-26 13:08:58.417Z
Hi @strategus, sorry you're running into issues updating your TinyPilot software.
Thanks for sharing those logs! I think this could be an issue with the network connection on your TinyPilot.
non-zero exit status 100
suggests that the network may have been down.Could you try to update to 2.5.2 again and see if you get the same issue? I wonder if something like a small drop in your TinyPilot's internet connection may have caused the update to fail.
- SSteve @strategus
Retrying gave the same results. My current hypothesis is that the filesytem on the SD card is damaged.
pilot@tinypilot:/tmp $ dpkg-statoverride --list dpkg-statoverride: unrecoverable fatal error, aborting: reading statoverride file '/var/lib/dpkg/statoverride': Is a directory pilot@tinypilot:/tmp $
Unless you have something else for me to try, I plan to use either a new SD card or USB stick with the new image on it and go from there. I should have the opportunity to do that later today.
After I pull the SD card I'll run fsck on it just to see if that shows issues.
Thanks for your help.
- David @david2023-01-26 16:51:40.874Z
Retrying gave the same results. My current hypothesis is that the filesytem on the SD card is damaged.
Thanks for trying that!
In that case, there's a decent chance that the problem is with the filesystem on the SD card (like you mentioned). The issue with files being listed as directories (
'/var/lib/dpkg/statoverride': Is a directory
) suggests the same. Re-flashing your SD card is the best option here.It sounds like you may have already seen it, but you can set your TinyPilot to boot from a USB which may improve stability over an SD card. Enabling the read-only filesystem is a good idea too, since that can reduce the risk of filesystem corruption.
- SSteve @strategus
The system is back up and running. I used a USB stick vice an SD card this time. It's a brand new Samsung BAR+ I had for another project which never came to fruition. I'd not considered going read-only until you suggested it. I'm gonna give that some thought.
I ran fsck on the filesystem on the SD card. Oh my gosh! It was trashed 8 ways to Sunday. I recently discovered that one of my UPS needed a new battery. I discovered that the hard way. We lost power and the UPS powered down before the generator kicked in. The TinyPilot was one of the systems on that UPS. I thought I'd gotten off cleanly. Oh well. I thought that Raspberry Pi systems would fsck an unclean fs; guess not. Hmmm. Something to look into. In the future.....
Thanks again for your help.
- David @david2023-01-27 12:23:01.321Z
Glad to hear you're back up and running!
We lost power and the UPS powered down before the generator kicked in
In that case, the power drop was almost definitely the cause. Unexpected power drops aren't exactly the best thing for SD cards, which is why we recommend shutting down via the web interface instead of pulling the power cable - obviously in this situation the power drop was unavoidable.