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

Yes, I do.

No, not until now. But I think it is the time to do it.

I will look into a Howto to see how a snapshot is restored and what it all restores! Thank you, I also think that this is the better way.

New 5.4.42 Kernel is out!!! Time to try the SSD boot again on RPi4.

Since I have direct boot from SSD working on my RPi4 on Raspbian 5.4.42 kernel, I am pretty sure this should now be working on Home Assistant with 5.4.42.

EDIT: No joy. Still not working even with new 5.4.42 kernel.

So, with with HassOS rel 4 being now officially out (and after a successful update on my RPi4), has anyone tried the “move the data partition” feature in HassOS rel 4 yet? Any good guides available anywhere?

Of course the full SSD boot option would be an even better solution but I would be happy with boot partition being in SD and everything else being in SSD as well.

https://github.com/home-assistant/operating-system/pull/651

4 Likes

Answering to myself, the instructions seem to be here:

Time to invest on a suitable USB SSD adapter and a hard drive then :).

4 Likes

Did you found the datactl command? I’ve upgraded to hassos 4.8 but datactl is not available.

Same issue here. I SSH into port 22222 as root. Tried to execute datactl command, but returns

ha > datactl
Error: unknown command "datactl" for "ha"
Run 'ha --help' for usage.
FATA[0000] Error while executing rootCmd: unknown command "datactl

you need to login to the os first

Welcome on Home Assistant command line.

For more details use 'help' and 'exit' to close.
If you need access to host system use 'login'.

ha > login
# datactl 

2 Likes

@grunjol, you da’ man!

@Blueman2 So did you get hass.io booting and working without sd card in the Rpi4?

So you can only do that when connecting to the host system?
Is there an easier way? Because to connect to the host system, one has to plug-in another USB-Stick formatted and with that authorized_keys file, ai?

Would love to see a step-by-step guide to move data partition to USB stick.
ha login does not exist for me either.

→ ~ ha login
Error: unknown command "login" for "ha"
Run 'ha --help' for usage.
FATA[0000] Error while executing rootCmd: unknown command "login" for "ha"

No joy with direct boot from USB drive. But I am now able to access the datactl command and today plan to move my data partition to a USB SSD. It will still require I keep the MicroSD card in my RPi4, but this is a step closer!

I am planning on doing the same thing this evening. I have a USB3 to sata cable and SSD arriving in the post and will try and use datactl to move the data partition across to the external drive.

Let us know how you get on @blueman2 and I’ll hopefully post an update later.

Sorry, I got side tracked on a small roofing project for a shed in back. Hopefully I will have the couple of hours to devote to this today or tomorrow and will report back as well. @benmarshall, one of the things I was going to do was to run tests on 2 different USB3 to SATA adapters I have to make sure which works best. From what I have read there is a lot of variation in what works and what speeds you get based on the adapter.

There is a great guide to testing and adjusting USB-STAT adapters here:

I saw this link somewhere else previously and have bought the Startech adapter at the top of list. Hoping to get to try this out after work today.

1 Like

Well I can confirm that the datactl method has worked perfectly for me on a Raspberry Pi 4B.

My set up now consists of the Pi 4B connected to a Kingston A400 SSD using a Startech USB3 to SATA cable (USB3S2SAT3CB). The Pi is still booting from the sdcard but the data partition is on the SSD. I am running the full Home Assistant (standard install). Home Assistant reports the disk space metrics correctly and I have confirmed the partition has been moved across correctly.

All I had to do was:

  1. Backup (Just in case!)
  2. Connect the SSD to Pi using the cable
  3. Login into Home Assistant CLI over SSH (needs to be via develop port 22222).
  4. Get to a host shell using the ‘login’ command.
  5. Check the new disk is seen using ‘fdisk -l’, it showed up as an un-formatted disk /dev/sda.
  6. Use the datactl command to move the data partition - ‘datactl move /dev/sda’.
  7. Reboot as advised by the datactl command output - ‘ha host reboot’.
  8. Wait a while - mine took maybe 15-20 mins for a 120GB drive - Home Assistant will eventually boot up.
  9. Profit?

At some point it would be interesting to further investigate a USB boot solution, but I’m happy enough with this for now!

14 Likes

I just noticed that my system is asking me to revert to the old OS, 3.13. Did they pull the updated 4.0 OS? That would impact my attempts to get native boot since that requires the 5.4.42 kernel.

1 Like

@Blueman2 I have an update available for 4.9 (currently on 4.8). No message about reverting.

I likewise have an update available for 4.9 (currently on 4.8). No message about reverting. Running rpi4-64.
https://s3.amazonaws.com/hassio-version/stable.json
https://dev.azure.com/home-assistant/Operating-System/_build?definitionId=58

I’m having trouble getting to the datactl command. There are multiple flavours of ssh server. Which one did you use

  • Terminal & SSH std one from Official add-ons
  • SSH & Web Terminal from Home Assistant Community Add-ons
  • the SSH configuration for developer via port 22222

@brucek1642 I found I had to ssh in via the developer port 22222 method.

I also have the community add-on SSH & Web Terminal configure but this didn’t allow access to datctl command for me. I’ll add that to my post above!

Starting to make sense… thanks