Let me start by saying Thank you to everyone that puts the time in around here. I use the forums a lot for help but have never posted. Without you guys/gals helping everyone there would be no HA.
Now the issue
Iām currently running HA on a raspberry Pi with an SD card and would really like to keep it on the Pi. I know some people complain about the slow reboot speeds etc. but honestly itās been so stable I hate to ever move off the platform.
However I do want to move away from an SD cardā¦ I feel like Iām playing with fire at this point and want to stop a problem before it happens.
So my options are USB or SSD. Can I have some opinions on which is better AND are there any guides to move a HASS.IO build from an SD card to either a USB or SSD? I think I would prefer an SSD, but interested to hear what everyone says.
I have a zwave stick and have read about people having problems when making a transfer from one HA build to another. Honestly since I donāt even know how to go about making the swap Iām not sure if this might even be a problem i encounter.
Thanks for any and all help.
You cannot currently boot HassOS from a USB drive - itās not supported.
What you can do is install Raspbian and then do a generic Linux install of Hass.io with docker and that runs really well from a USB.
If you make a snapshot of your setup via the snapshots addon, restoring that to a new Hass.io installation will restore all your config exactly as it was.
I bet we start to see some momentum around this now that the Pi4 has USB3 support. We should be able to get full speed from SSDs over USB3. Iāve burned through several SD cards at this point so Iām eager to make the jump
trutz, that method uses a non-hassos system, which is very different when it comes to usb boot.
A quick update on my progress:
So far my initial experiments have been successful. This is with a pi3b+, startech usb3.1 to SATA3 adapter cable, and a Kingston 120GB ssd drive, using the above mentioned dev image for rpi usb boot. Just flashing that image to the ssd and plugging it in, hassos boots and reboots just fine. Next Iām going to play with restoring a snapshot and see how it behaves with everything working.
On a side note, hope someone can help me on this OT matterā¦ When flashing a hassio image to a larger ssd (larger than 2GB I think) the system is not recognizing and therefore not using all the extra space. I tried to fix this with gpartedā¦ when I open gparted it warns me that it needs to āfixā the mbr so it can use the unallocated space. I click yes twice, then it opens the gui. Then I resize the data partition to fill out the rest of the room and hit apply. All seems to work fine (all files and file sizes look correct), but when I do this it doesnāt boot up. There must be something Iām doing wrong; I figure it must be possible to increase the size of the data partition without screwing it up otherwise. Any advice/suggestions on how to āexpandā the data partition in this case?
[edit: Exciting updateā¦ the snapshot restore worked and now my no-sd card hassos system is humming along well. WOOT!!! ā¦now I just need to make the data partition bigger so I can record 90days of data. :D!]
Look maā, no drives, LOL! Weird how the ssd isnāt showing up in the hardware gui. If you look close, you can see the edge where it says HassOS 3.4ā¦ woot! :D!
I followed your instructions and now, for the first time, am running on a SSD! My system is HassOS, RPi3 B+ with a Crucial 240 GB drive. No 2GB limitation experienced. Thanks for being the āguinea pigā
@Jefe, glad my post helped you get it going. I wasnāt the only guinea pig for sureā¦ in fact a few others claimed success with it months ago. I was a bit surprised to see nothing resembling instructions on how to do it on this site, so I posted about it to share. I know lots of folks have been waiting on this capability based on all the posts Iāve seen about in over the past 2 years all over the internet. I just hope these posts get around and more ppl try it (and please if you do, give feedback on github so rbray knowās if itās working or notā¦ help push this thing to release).
On the ā2gb limitationāā¦ already fixed itself and I didnāt even know it!
I just pulled the ssd from my pi, plugged it in my pc with gparted, and it showed the full 120GB is being used (~100GB for the data partition). I did it this way since the system monitor display on my ui shows only %, and I didnāt feel like configuring/rebooting to add non-% just to check. I saw that unallocated space in gparted before I booted up the drive (thus hassio isnāt yet installed automagically). So I think upon first bootup, besides hassos downloading and installing hassio, it must also do some drive prep, which resized the partition for me. This is exactly what I would expect from a ābeginnersā setupā¦ it works perfectly!
[edit: I just had a failed reboot today. Surprised me since it rebooted at least 10 times before without problems. I already solved the problemā¦ copy bootcode.bin from the boot partition of the ssd on to the root of a small sd card (formatted fat32), and also add a blank file named ātimeoutāā¦ put the sd in the pi and it reboots fine now. LOL, so now I canāt technically say āno sd cardā anymore, but of course the sd will not slow things down or die for a long time (just reads bootcode.bin once each bootup).
My understanding is this has to do with my specific usb sata adapter. There is a limited list of which ones will work flawlessly with pi usb boot. Theyāre cheap, so Iāll end up getting one off the list. Just wanted to mention this for those about to buy one for pi usage.]
Yes I hope it gets merged to the next release, if not soon after. One of the concerns the devs will have is dealing with user complaints due to incompatible hardware. They will probably need an easily accessible table of possible hardware they can point to that shows which specific adapter+ssd combos will and wonāt work. Of course, there is plenty of motivation among the devs to release USB ssd boot to solve the sd issue for the many folks running hassos.
A friendly reminder to those who are trying this outā¦ do not hit the āUpdateā button on the system page yet! This will pull the latest release, which at the time of this post (release 2.12) does not have the USB boot feature. āUpdatingā this way before USB boot is released will result in a failure to reboot.
Thanks for the write up - Im keen to replicate this myself, mainly so I can get setup correctly ahead of moving to a pi4 when they finally release the USB boot. Quick question - did you manage to find a list of devices that DO work well with uboot? Ive not been able to find out for sure and Im ready to buy my SSD.
Then, on boot without SD, it now detect the SSD and starts (else, without SD, it wouldnāt start at all except for the power light). but it stays on a black screen
Regarding a list of compatible hardwareā¦ I donāt think there is anything official yet, but the devs have been pointing to this as a starter:
That page also goes in to the how/why usb boot is compatible with some hardware but not others (has to do with uboot). The list so far only includes a limited number of 16 and 32gb usb drives. I think some work needs to be done with usb-sata3 adapters. Using such an adapter with a 2.5" ssd will be a popular choice, but my understanding is compatibility can be complicated. For example one particular adapter and ssd will work together, but use them with other parts (that also work with other combos) and they may not work. So itās not as simple as listing all adapters that work separately from ssdās that work. Each combo will have to be tested out. So I encourage all who have tested this (wait a few days, do some reboots to make sure you have accurate results) to report your results and hardware details to the github page so they can be added to the list (maybe I can actually contribute with a listā¦ my yaml/js skills suck lol).
@godinperson, I think the reason it required plug/unplug to work is we are using the sd card to program the USB boot bit on the pi3b OTP memory. This requires a power cycle to complete. Same if you are programming a ātimeoutā to the OTP memory; you first must power cycle for the the timeout to work.
OK, itās sloppy markdown (itāll look better on github), but hereās a table I compiled from the site linked above (includes reports from the comments). Iāll add more hardware as info becomes available. I havenāt had time to fill in some missing info for some setups, and some of the spots I took liberty to fill out may be inaccurate (like an ssd labeled as flash etc)ā¦ any suggestions are welcome. Note uX=usbX, aX=usbX sata3 adapter:
Since there are many flash drives on the list, I want to remind folks that a usb flash drive will be pretty much as failure prone as an sd card since they both use NAND type flash memory. There is really no point in moving from an sd card to a usb flash drive, other than it may be easier to access physically when it fails and needs replacement. For this reason, you should only look at ssd drives on the list.
[edit: @godinperson, since you got it working would you mind sharing the details of the hardware you usedā¦ so I can add it to the list? Thanks!]
@truglodite, I left out my adapter type. If you want to update my hardware on the list, with the Crucial BX500 my adapter is āOrico USB 3.0 to SATA 3.0ā.