HASS.IO -> transfer from SD card to SSD or USB

or, if easier, how do i upgrade the SSD which has v4x on it, to the latest v5x, without doing a format of the data? just the upgrade only?

I am using the above comments to move all the data to an SSD drive, still booting from the microSD card. I have a Kingston 120GB drive, and the startech cable. I use the HDMI output to get to the system command line (login using root, then login to get #). I use fdisk -l to see the unformatted /dev/sda. Then try datactl move /dev/SDA and reboot. It sits for a long time on HassOS data partition, while the cable blinks red. When it is done rebooting there is no sign it uses the SSD. It is slow as ever, Dr doesn’t show I, and HA does not show it in hardware. I try again, and see that the SSD is still not formatted. It still sits for order one hour on data partitioning.

Any ideas?

did you took snapshot ?

not sure about other os but on windows you can extract it via “diskinternals linux reader” software
explore little bit and search for you snapshot

1 Like

try to delete all partition and try again , to check ha is using SSD or not type “df” command

That’s the thing, after three attempts HassOS never formats the drive. It never shows up. After the datactl command, df never shows it. There is never a partition to delete.

Yeah, I have a snapshot, but how is that even relevant here?

champ! this did the job

I give up. I have tried this four times, and one single line “datactl move /dev/sda” never formats my unformatted disk.

So, I pulled out another RPi4 and tried the 64bit image with the beta HassOS. That worked fine. Everything was quick. So I got samba working, and copied over a snapshot from the other RPi.
That is not going at all smoothly. It just hung for hours. I eventually just SSHed into it and did a reboot. It hung there for a couple more hours, except now I couldn’t even SSH into it. So, I just powered it off, and powered it back on.

Now, I can get into the web server, and see that lots of things were transferred over. However, there are lots of problems. Node-red, file editor, SSH&Web terminal, Grocy, ESPHome all just return 401:Unauthorized errors. No state history found. No logbook entries found. The logs show lots of errors, too. For example, recorder complains:

Error saving events: This Session’s transaction has been rolled back due to a previous exception during flush. To begin a new transaction with this Session, first issue Session.rollback(). Original exception was: (sqlite3.DatabaseError) database disk image is malformed [SQL: INSERT INTO events (event_type, event_data, origin, time_fired, created, context_id, context_user_id, context_parent_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?)] [parameters: (‘state_changed’, ‘{}’, ‘LOCAL’, ‘2020-09-05 22:18:42.729044’, ‘2020-09-05 22:18:42.735627’, ‘c1cd7ac4efc511eabbd113af6c4dd48e’, None, None)] (Background on this error at: Error Messages — SQLAlchemy 1.3 Documentation) (Background on this error at: Error Messages — SQLAlchemy 1.3 Documentation)

SQlite is corrupted:

Error adding event: (sqlite3.DatabaseError) database disk image is malformed [SQL: INSERT INTO events (event_type, event_data, origin, time_fired, created, context_id, context_user_id, context_parent_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?)] [parameters: (‘state_changed’, ‘{}’, ‘LOCAL’, ‘2020-09-05 22:18:42.729044’, ‘2020-09-05 22:18:42.735627’, ‘c1cd7ac4efc511eabbd113af6c4dd48e’, None, None)] (Background on this error at: Error Messages — SQLAlchemy 1.3 Documentation)

Should I just give up on HA? I get so many problems with this software.

dont give up :slight_smile:

this evening i managed to rebuild my entire RPI4 (8GB) on an SSD.

i did a clean build (<45min) and then i just imported my old backup onto it, however that was the same version overall.

The other thing to do, is build a new, clean version, they add back in and turn on the things you want again? its not ideal but doing it that way ensures you have everything you need and is maybe only 2-3hours effort, copy and paste?

But something in that setup is breaking things. So the idea is to add them back one at a time until it breaks again?

Fresh install doesn’t work either. I still get 401: Unauthorized errors for Node-Red, ESPhome, etc.

I can confirm USB boot works as suggested above.
My hardware RPI4 4GB and an Intel SSD 330 180GB.

I wish I knew why mine is not working. I use the SSD: Kingston 120GB A400 SATA 3 2.5" Internal SSD SA400S37/120G, with the cable: StarTech.com USB 3.1 to 2.5" SATA Hard Drive Adapter - USB 3.1 Gen 2 10Gbps with UASP External HDD/SSD Storage Converter (USB312SAT3CB) attached to a RPi4B (4GB). I follow the recommendations from Carsten_H. Everything goes perfectly smoothly. I now have a fresh install booting off the SSD.

Then I install the Samba and confirm that I can move files to and from the SSD. Next, I install Node-red (or ESPhome or File Editor or Visual Studio Code). It installs and configures without error in the logs. Yet, when I try to open the interface I get “401: Unauthorized” error. It happens reproducibly.

But no one else sees this?

1 Like

So when running from SSD via USB 3 a few of my sonoff devices that are a bit far away won’t connect, even though they did just fine running from SD. Also my two z-wave GE switches will not work, and I am getting MQTT errors.

This is a know problem with USB3 https://www.intel.com/content/www/us/en/products/docs/io/universal-serial-bus/usb3-frequency-interference-paper.html

You can find enough info about this on google. The resolution is to use a extension cable for youre z-wave/ zigbee dongle. see also https://youtu.be/2PK3TrOGWNs

Ordered an extension :crossed_fingers:thank you!

Images for 5.2 have been posted for RPi4.

Here are links to the 32 Bit version, the 64 bit versions are not ready yet but maybe ready soon:-

The 64 bit version is now online.
I have just updated from 5.2 via USB and it seems to run a bit smoother than 5.1. However this could be due to the system running in a 8gb USB2 stick.

So for 20 minutes and counting 5.2 have proven stable…

Easiest way I have found to update is from terminal or SSH

ha os update --version 5.2

5 Likes

thanks - just the command i needed.

seems to have worked.
before
image

after

3 Likes