Bricked on latest OS update (what are my options?)

Hello,

As per the title, this morning I casually hit ‘update OS’ as I usually do, and now my install refuses to connect to my network.

I am using a pi4 with SSD directly connected to my switch via ethernet. No network changes have been made.

This is the first time I’ve encountered such an issue in almost 3 years.

I manually downloaded a backup almost 4 months ago, but I believe a backup is made prior to all OS and operating system updates.

What are the recommended steps to restore to the latest backup?
Thank you in advance for reading and responding.

I hooked up a screen and this seems to be the type of issue showing up.

Crashed SSD. I would hook up the SSD to my Linux PC, and run fsck.

IF you don’t have a Linux PC, you use use a SD flashed with Raspberry OS, boot from that and run fsck from there
(You can’t run fsck on a mounted file-system)

Thank you!
I’ve opened up the ‘box’. Please see attached pic. I think the sd card was used in the install. When you say hook up the ssd, you mean the TEXTORM 480g right?

The one on the left, yes. I don’t really know these argon cases, but the SD is probably not used.

Installed the pi os, hooked up the problem disk. I ran lsblk to find the disk, unmounted it and then ran fsck. It threw up a superblock error. A bit of research suggests that is is not recoverable.

On the raspbian desktop however, when I plug the drive in, i am able to browse the contents as you can see (next post)

Somewhere here are the backups , right? If so where do I look?
My thought is to download them, format the ssd and restore on a fresh install.

Does that sound feasible?

Since the error was on sda5, i recommend first running

sudo fsck /dev/sda5

Where do you see sda5? I can only see sda.

sudo fsck /dev/sda5 throws a no such file or directory error

sda should be the disk
sda1 to sda8 the partitions HA OS creates when flashing the OS

The backups should be in /mnt/data/supervisor/backup

afbeelding

See what

df -h

returns

That looks more like the ssd is just the HA-OS data disk.
Apparently it is booted from the micro-sd and the error comes from there.

I went with df -h and figured I needed to unmount sda8, which threw up a bunch of errors when running fsck.
I had to run it thrice before it finally terminated with

Error writing file system info: Input/output error hassos-data: ***** FILE SYSTEM WAS MODIFIED *****

hassos-data: ********** WARNING: Filesystem still has errors ****

I managed to find the backups and save them.

Thank you so much Francis! I’m going to run fsck again before checking to see how it boots hassio

hi,
i also had the same problem after i installed the latest version of the operating system, so i deduce that the problem is in the new version.
maybe there is a bug?

Yikes Folgore! I hope it isn’t so. If you follow this thread you can figure out how to extract your backups.

I’m going to keep my ssd as is in case there is a fix later.

For now I’m installing on the sd card and applying a backup to see how it goes.

I’m really bummed out, but I learned quite a bit.
Thanks to you all!

Mostly, these errors appear when the computer is not properly shutdown.

Step 1- Daily backups.
I use the Samba Backup add-on to an NAS. A lot of people use the Google Backup add-on.

This way if your Home Assistant server bricks, you just reinstall Home Assistant and restore from the latest unencrypted backup. At worst only the changes in the past few hours will be lost.

If using a cloud to back up I strongly recommend encrypted backups. If you use a password manager, then store your decryption password in it.

I have developed a few CLI utilities which handles encrypted backups similar to tar. If there’s interest I can cross-link it.

This is all very good advice!
Thankfully I did have a backup to revert to. Gotta say the whole restore from backup process is pretty straightforward and easy to execute. Automating a backup should be the first thing we do on this platform.

Btw, my restore process is still ongoing after 45 mins.

Sam do you mean scripts to take backups? Like bash?

No, Home Assistant creates backups for you. In Home Assistant visit Settings > System > Backups. In the backups area you can configure settings and retrieve the password used to encrypt your backup.

This is built into Home Assistant. This CLI utility decrypts backup files from stdin.

If you disconnect your home assistant drive you can obtain your backups from /usr/share/hassio/backup/.

I can develop a way to retrieve the encrypted backup password if you don’t know what it is and your system is offline.

Your home assistant backup password can be retrieved from a JSON file located at

/usr/share/hassio/homeassistant/.storage/backup

That’s the name of the JSON file (no extension). For example you can get the password using jq command

jq .data.config.create_backup.password /usr/share/hassio/homeassistant/.storage/backup

Oh wow! Thank you thank you! I’m going to try this out and come back with an update this weekend