Comments (3)
I managed to restore my system. Here's what I did
- Image a new SD card with a clean HA install (OS 12.1)
- start up HA using the new card on the RPi, let it finish its configuration process until it gets to the Create User screen in the UI, then shut it down
- insert both SD cards in a Ubuntu PC, identify which partitions are the
hassos-data
partition on each card - copy data partition from the old SD card to the new one using
dd if=/dev/sdb8 of=/dev/sdc8
(wheresdb8
is the oldhassos-data
partition andsdc8
is the new one) (this took around 3 hrs) - insert new SD card in RPi and system is back up and running with all previous data intact
Obviously I was careful to ensure I was copying the correct partitions, in the right direction. One easy way to tell was that the old partition had a rauc.db
file since it had been previously upgraded, whereas the new one did not have that file.
Now the final step is to re-add Lovelace add-ons that are missing from the new install, as these don't appear to be part of the data that was copied across. these appeared after a short while,
I would still be interested to know what caused the failure in the first place, and if there is an easier way to restore the system.
from operating-system.
the same thing happened to me, I upgraded rpi4 to 12.3.rc1 and this happened
from operating-system.
@asjp Great, glad you figured it out! The SD card corruption can happen randomly during the SD card (or any NAND flash) life, and while it is most common when the device suffers a power loss or is worn out by excessive writes, it may happen even during reading (see "read disturb"). This actually happens more than you may think, but in most cases the controller embedded in the SD card is able to cope with that using its error correction mechanism. But in some cases, despite you giving the SD card the best care by limiting writes and avoiding sudden power loss, errors that can't be corrected occur and you get corrupted data.
Your method is generally correct, you could just run into issues if the data partition on the old card were larger than on the new one. Otherwise there are only two partitions that contain user data - the hassos-data
and the hassos-overlay
in partition 7, however the latter only contains mostly operating system configuration and it's usually fine if you don't retain it when migrating (the full HA backup doesn't do that too).
In your case, the system might have been restored only by copying the partition 1 (e.g. /dev/sdb1
) from a fresh installation to the old SD card, or even by copying the content of the filesystem of the boot partition. Following this, I would do a backup and restore on a new and more trustworthy SD card. Also, when copying to an SD card using dd
, it's worth increasing the block size by adding the bs=4M
, as it makes the writes to be much more effective and faster.
Anyway, this is unfortunately a thing that we can't do much about. What you can do is to pick a high quality SD card and make sure you don't abuse it. Also you can use an external drive as a data disk (note this is not the same as using an external drive for the whole HAOS install). This way you can quite simply replace the SD card with the system and keep using the same data disk without any complicated recovery steps if the SD card breaks.
from operating-system.
Related Issues (20)
- Using timers on automation bug HOT 1
- OS 12.2 broke HDMI-CEC HOT 1
- (x86_64) HA OS doesn't boot when updating from 12.1 to 12.2 HOT 73
- v4l2-related tracedump appears in kernel log (dmesg) during boot HOT 3
- RPI installer using old version HOT 2
- usb_storage.quirks: string doesn't fit in 127 chars HOT 4
- (OVA) HA OS unable to be updated from 12.1 to 12.2 HOT 4
- Memory leak (outside home-assistant?) HOT 4
- Intel AX210 WiFi doesn't initialize in OS 12.2 HOT 9
- Entity ID Already in use regardless of if I've used it before HOT 2
- When I install home assistant operating system 12.2 update the oracle vm randomly abort HOT 5
- /dev/shm missing in 12.2 HOT 3
- `/dev/dri` is missing on the RPi 5 HOT 2
- BlueZ Bluetooth Mesh crypto kernel modules missing, bluetooth adapters without public address cannot be initialized.
- HAOS freeze randomly HOT 5
- RPI5 Ethernet port LEDs not turned off
- Downloading whl in v2.13-fix HOT 1
- Unable to update from version 12.1to 12.2 on raspberry pi HOT 1
- System errors - USB stack crashing? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from operating-system.