Hi, I recently update Homeassistant and after the update the raspberry pi wasn’t booting anymore. Nothing, just a black screen.
I haven’t backed up anything but I am still able to read the SD Card data.
I already tried to restore the largest backup but since it is only a automatically taken partial backup, nothing helpful.
Is there another way to get anything usefull from the sd card? Or even get to the point before the update?
Thank you already for every information you can give to me.
Are you running HA OS, or raspberry pi OS with a supervised install of HA? Regardless of which you have, if you have another linux system available to you the first thing you should do is run a check file system command on the SD to make sure it’s not full of errors.
Hi, I am running HASSOS.
When I am running fsck /dev/sd I get this error.
fsck from util-linux 2.38.1
e2fsck 1.47.0 (5-Feb-2023)
ext2fs_open2: Bad magic number in super-block
fsck.ext2: Superblock invalid, trying backup blocks...
fsck.ext2: Bad magic number in super-block while trying to open /dev/sdc
The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem. If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
or
e2fsck -b 32768 <device>
after that I tried the e2fsck -b command and I ran testdisk
Under linux I’m not sure I’ve ever seen a disk named /dev/sd. The “sd” devices normally have a letter, so like /dev/sda or /dev/sdb. The device would then have a partition table giving one or more partition. The first being 1 the second 2. The filesystem then sits on a partition. So normally under linux you would be running fsck on /dev/sda1 or /dev/sda2.
I usually do fdisk -l to get a list of all the devices and their associated partitions.
Here’s an example from my linux desktop
# fdisk -l |grep sd
Disk /dev/sda: 223.57 GiB, 240057409536 bytes, 468862128 sectors
/dev/sda1 2048 468862127 468860080 223.6G 83 Linux
I guess it’s possible that HASSOS isn’t doing stand linux stuff and just write the file system directly to the device. If /dev/sd is the correct partition with the associated filesystem, then the error you’re getting is pretty bad, as the filesystem is complete screwed if it doesn’t have the super block. Normally when I have this issue I just figure the data is gone. The disk might still have data, but all the inode tables are messed up and you have to use a forensic tool to try and grab data off this disk.
Hopefully you’re just using the wrong partition label for the fsck.