Agreed @cogneato. However there was something that seemed to be related to having the old USB drive in place that once caused my former configuration with the Eluteng mSATA adapter and SSD drive to work. I don’t know if it was a timing issue involved with reading the USB drive or a drop back to an older protocol to support the old USB stick or what, but having the USB drive present seemed to enable my system, at least in the past, to boot from my mSATA. Can’t explain it, but that’s what I observed. Really wish I could get the mSATA solution to work on my RPi3b+
Looks like Pi4 USB boot is now out in beta… https://tynick.com/blog/05-22-2020/raspberry-pi-4-boot-from-usb/
Now as the USB boot is in beta, is there a way back to normal Installation?
Is it possible to shrink the filesystem on the SSD back and copy it to the SD card to make a complete clone of it on SSD?
When usb boot for pi4 is released, I plan on reinstalling hassos from scratch and restoring a snapshot. My guess is the official install method for usb boot with pi4 will be flashing the image to ssd using etcher, etc… and they probably wouldn’t add anything that breaks restoring snapshots along the way. So I am pretty confident this method will end up working well.
You are taking snapshots right? … and you have tested that they restore correctly? I have, and snapshots are working fine with the 'sd+ssd’s method. Don’t take backups for granted, especially if this isn’t a new system and there are many hours worth of configuration work to lose… never know what/when something might take out your drive.
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.
Answering to myself, the instructions seem to be here:
Time to invest on a suitable USB SSD adapter and a hard drive then :).
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
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.
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:
- Backup (Just in case!)
- Connect the SSD to Pi using the cable
- Login into Home Assistant CLI over SSH (needs to be via develop port 22222).
- Get to a host shell using the ‘login’ command.
- Check the new disk is seen using ‘fdisk -l’, it showed up as an un-formatted disk /dev/sda.
- Use the datactl command to move the data partition - ‘datactl move /dev/sda’.
- Reboot as advised by the datactl command output - ‘ha host reboot’.
- Wait a while - mine took maybe 15-20 mins for a 120GB drive - Home Assistant will eventually boot up.
- Profit?
At some point it would be interesting to further investigate a USB boot solution, but I’m happy enough with this for now!
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.