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

RPi4: No boot from USB at this moment, so use the workaround for now.

I moved from a 32gb Sandisk Ultra SD card to a 240gb Crucial SSD on a Pi 3B+ and performance is very similar.

Im moved from SD Card on a RPi4 to SSD.
Speed is better. Less stress because SDCard wonā€™t fail anymore. Its only used to boot first part rest goes to SSD

Thanks for writing down these instructions, but unfortunately, you have some mistakes in your description, that you shouldnā€™t publish to other ā€œnot-so-familiarā€ Rasbpian users.

  • You donā€™t need to format your SSD in FAT. It doesnā€™t do any good (fortunately it doesnā€™t harm either, but thatā€™s not the point, itā€™s not necessary), otherwise you wouldnā€™t reformat it with the next step.
  • You should never ever assume, that drives are always the same mount point in Linux. /dev/sdXY can be every usb drive. To know which mount is always correct, you should use a PARTUUID from exactly this drive (your SSD).
  • the rsync command is doubled, -v shows all activities regarding the sync, whereas --progress shows only the status of the copying. Either one, not both. :slight_smile:
  • In cmdline.txt itā€™s like the above. Without knowing, which mount point is which, you shouldnā€™t assume. The correct handling would be to find the correct mount point and PARTUUID with lsusb and blkid and set this. An example:
    root=PARTUUID=abcdefg1234 rootfs_type=ext4
  • Resize is an important part of the installation, otherwise you may end up with only a few GB of free space on your shiny, new SSD card (hint: the space, that your sd-card offers, so itā€™s easy to make a 2TB SSD into a 64GB SSDā€¦) :wink: On the other hand, if you donā€™t format your SSD, as said above, you wonā€™t have that problem, as your drive is already formatted with ext4ā€¦
  • You shouldnā€™t (and you donā€™t need to) use sudo -i. In this case itā€™s even contra productive, as you install docker as root. Thatā€™s not the way you should go, and itā€™s not the way, Docker explicity states. You should run the docker install command as normal user, root is not never ever a good idea.
  • If you run the docker install as user, you do have the right permissions set, but you need to add the docker user to your usergroup.
    sudo usermod -aG docker pi
    These two points are working hand in hand: if you do install docker with incorrect user permissions, you will later run docker as root, which will compromise your system on day!
  • And last but not least, youā€™re using the wrong image for HomeAssistant. Itā€™s either the RPi4 image, for this tutorial, or itā€™s the RPi3 image, then this whole tut is uselessā€¦
    Tbh Iā€™m impressed, that this image is running on a RPi4 without any errors. The forum is full of exactly this problem. Would be interesting to know, how yours is runningā€¦ :wink:

Again, thanks for writing this tutorial, itā€™s always great, that others contribute, but next time please check the content more thoroughly before you post it. Especially the wrong use of permissions and the use of a not correct image will lead others to problems. :slight_smile:

3 Likes

@paddy0174 Sorry for that. I posted because it worked for me. :wink: didnā€™t realise some things are not working for others. Beside some parts I found on the internet and used it.

For your last question: With this tut it works great on my RPi4! Rebooted many times because of adding new things in HA. No problems at allā€¦

I initially migrated from an RPI 3B+ with SD card (32GB Sandisk Endurance) over to a Crucial BX500 120GB SSD but didnā€™t notice any performance improvements. The biggest improvement was moving to a 4GB RPI 4B with the same 32GB Sandisk Endurance card, where I noticed 3 day history graphs (of room temps, humidity etc) were loading up at least 50% faster.

Iā€™m waiting for the Raspberry Pi Foundation to implement official USB boot support on the 4B before I switch back to the SSD to get the full benefits of USB 3 as well.

1 Like

Just to let everyone know.
Most of the USB to SATA cases use simple chips (ASTMedia usually) that run around 25 to 50MB/Sec.
The only USB 2.5" cases I know of that do run fact are the Zalman ZM-VE500 that use ARM chip. This one is expensive (around $70) but it runs 300MB/Sec or so. I did not check the lower models.
I use these and only these USB SATA cases. I have tens of them and all are OK for few years now.

My mSATA with the x850 didnā€™t work. So got a sata drive with a cheap usb cable and now Iā€™ve finally switched everything. Even got a 3d printed case, but might go caseless cuz noticed the cpu temps got higher.


1 Like

Hi,

what RPi du you have? As far as I know itā€™s not possible to boot from USB on a RPi4. Correct me, if Iā€™m wrong.

Take a look here:

Yep, Pi4 is only bootable from USB, if you leave a microSD in it. :slight_smile:

Well, I have a Raspberry pi 3.

I flashed a sd card with raspbian and added program_usb_boot_mode = 1 to the test file config.txt to boot from ssd.

but I have a problem, only sometimes it starts by ssd.

canā€™t always boot from ssd.

would appreciate help

Im using the suggested a3ssdā€“|--Kingston A400 120GB SSD (SA400S37)ā€“|--Startech USB3-SATA3 adapter (USB312SAT3CB)ā€“|--Yā€“|--Yā€“|--bootcode.binā€“|----|ā€“

And i am able to boot raspbian from my SSD just fine on my pi3, with an sd card with bootcode.bin on it.

However when I flash my hassos image, I just get nothing. Nothing on the IP address, and nothing on my monitor. Iā€™ve waited for half an hour. Absolutely nothing.

Does anyone seems to know what I am doing wrong?

2 Likes

Check my post above: HASS.IO -> transfer from SD card to SSD or USB

I ended up purchasing a new SSD for 25ā‚¬ and Iā€™m now a happy camper running off an SSD :slight_smile:

1 Like

this 194 might be a reason.
All it depends on the way how RPi with SSD is shut down.

@jelle2503, Iā€™m not 100% sure what might be causing your problem, but that also happened to me the first time upgraded hassos when I converted to ssd. I think it was due to the new firmware that comes on new hassos installs. If your pi has older firmware (likely if you havenā€™t yet installed hassos >=3.4), the install process will involve a reboot after flashing firmware. Not sure, but I suspect that if you donā€™t have a newer firmware yet, the first flash to the new firmware may require an extra reboot or 2 before it runs properly (perhaps the hassos install isnā€™t handling the initial firmware upgrade properly, or thereā€™s something in that firmware that requires a power off afterwards to setup properly).

All I know is Iā€™ve updated hassos several times since with zero issues. At least 2 of those recent updates also included updated pi firmware. So if you have troubles at first, sometimes persisting to install again, or rebooting the pi when it appears to become unresponsive during install, may complete the firmware install after which it will work fine.

Just a noteā€¦ it doesnā€™t actually flash anything. The firmware is in the ā€˜imageā€™ it does not write to flash on the RPi itself. If you boot the Pi with an old SD-Card hey presto you are back to old firmware again.

Thanks for the insight; excellent info to know. Iā€™m used to the world of arduino with ā€˜real firmwareā€™, softbricking, etcā€¦ so this is new to me. So then it must have been some other random problem that went away after a couple tries.

Someone is working on an automated solution for all this soon, in the meantime Iā€™ve documented the manual steps (tested on RPi 4) here: https://github.com/home-assistant/operating-system/issues/164#issuecomment-602145682

I note that there is still no Raspberry Pi 4 option for direct boot to SSD, and it doesnā€™t look imminent either. You have to use an SD+SSD configuration. Raspberry Pi 3 can direct boot to USB, no SD card required: https://github.com/home-assistant/operating-system/blob/2e7e0398996c5fb39e566e9d6d72df2975ac9f39/Documentation/boards/raspberrypi.md

2 Likes

The last command:

curl -sL "https://raw.githubusercontent.com/home-assistant/hassio-installer/master/hassio_install.sh" | bash -s--m raspberreypi3

returns:

bash: line 1: 404:: command not found.

If I go to the site, there are no files there. Can someone tell me what Iā€™m doing wrong?
Thanks

Because you have the wrong link. You can find the correct link on the installation page.

The problem is, if the links get updated by home assistant, the tutorials mostly donā€™t get updated (understandable).

And you didnā€™t used the correct writing for raspberrypi. So in the end, it should be:

curl -sL "https://raw.githubusercontent.com/home-assistant/installer/master/installer.sh" | bash -s -- -m raspberrypi3