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

Hi
Keep in mind the power supply.
My first attempts running rpi3b, razberry, cooling fan and ssd failed with 2.5A power supply, getting a 3A “quick charger” fixed that.
My rpi4b with official power and ssd works fine.

Well, I guess I missed that part on the video. ( /etc/fstab)
My current setup is just a downloaded hass.io on a SDcard, and I never made any linux inputs on it. (with exeption of a txt file for the WIFI password).
Never connected a monitor or a keyboard. Just SSH to copy some files and that’s it.

After the last update (not sure if related or not) everything is working but I lost access to the pi. cannot SSH, or access by the hassio…:8123, nor by IP address:8123, or even by Nabu. So I assume something is broken and will start from zero with the SSD.

But honestly I just want the simplicity of the current setup.

Hello,
I would like to have feedback of SSD users with a Raspberry Pi 3B+:
I changed from a SD card (Sandisk Extreme, 64GB, A2 Class) to a SSD ( PNY SSD7CS900-120-PB 120GB), but I don’t find the interface particularly faster. I even changed for an official Rpi power supply.
My logbook and history takes up to 12-15s to display the last 24h (database is ~360MB), whereas I have read some post where people claim 1s for the same things. Reboot is as slow as before.
Any recommendation ? Was it expected with a SSD connected to the USB 2.0 ports of the Pi ?
Thanks

1 Like

just asking

we’re talking about hassos?!
You’re happy still? Reliable still?

Also 3b+ here and a bit confused if i should by a bigger pi for better performance aaaaand ssd or trying my old one with the ssd method.
I also want to stay at the hassOS solution because i want to be fast replacable if i have a problem in any future.

For a noob like me:
Downloading the actual hassos
Burn it on a ssd and plug it with an adapter into the usb 2.0 port
Plug it in into my 3b+ and with a good portion of luck and the right cable everything is good than?

thanks for this great video

I’m just wondering why this sd card boot trick is necessary?!?
–> https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/msd.md
On some place there is written:
grafik

Is this wrong than?

@ upwind_anderl
Based on my experience - the trick, besides the USB boot activation, is in the combination of the right cable and SSD (RPi-3b, Kingston SSD A400, 120GB + Sabrent adapter) and empty SD card (the smallest available) in the slot.
At he moment my HASSIO runs on Raspberry Pi 3B + X820 V3.0 2.5 inch SATA Storage Board + Kingston SSD A400 + safe and headless shutdown mod + APC UPS

RPi with SSD is more vulnerable against unexpected power cuts resulting in wrtiting failure and need of complete reinstal than uSD card => UPS is advised

In my case

  • host (HassOS) reboot from SSD is slower than from uSD card,
  • HA restart, config check and “history response” and generally all operations within HASSIO are notably faster than from uSD card
  • w/o empty uSD the whole system seems to be more laggy
1 Like

Hi, yes, as per what kajmaj mentioned. And if you watch my video, the instructions will ask RPI3 B+ owners to skip the part where we activate the USB booting for 3B and below owners.

2 Likes

@Don_Lim
so good! i thought you talked about B without extra mentioning the +
^^
my fault

@kajmaj
WOW
gooood points! Never thought about that powerproblem and in fact i makes sense! Maybe for a fast shutdown it’s also possible to make it with some smaller usv solution but i guess i’ve to do it aswell
What do you mean with:
‘trick…besides the usb boot activiation…’ ??!
I guess there is no trick? NO SD card -> usb boot expected?
But this crashes with your “empty sd card”
What do you mean with empty? Formated and clear?
Sorry i’m a bit confused now ^

@ upwind_anderl

  • RPi USB Boot activation => described in the link you’ve posted in 192 (one time used add program_usb_boot_mode=1 to the end of /boot/config.txt .
  • regarding uSD - technically there are 5 options => no card, empty card(formated and clear), with bootcode.bin, with timeout or with bootcode and timeout (there are plenty of explanations on the net available). In all cases there is no active writing from RPi side, it is used for boot only if I understood well. It looks like different SSDs and USB adapters requires different approach.

Well the raspberry pi foundation haven’t crack booting from the usb ports on a pi 4 yet.
The eft load is different from a pi 3’s
When they have that sorted you will be able to update the firmware and we can then look at what (if anything) is required to boot hassos from USB.

1 Like

I didn’t needed any sd card when booting from my USB stick on RPI3B+ but as I encountered problems after almost each new update (restart button stop the server…) I decided to go back with my old SD config, waiting for more stability.

1 Like

This worked for me perfect. Tried this couple of times to be sure this is working. Now running for 3 months Hassio on SSD on RPi. Only first boot part from SD

Flash on SD Card Debain Buster Lite Image put in RPi4 and bootup

Format SSD with FAT and connect to RPi4

Now do some things on command prompt of Buster on your Pi:

sudo mkfs.ext4 /dev/sda1 -L root
sudo mkdir /media/newdrive
sudo mount /dev/sda1 /media/newdrive
sudo rsync -avx --progress / /media/newdrive
sudo nano /boot/cmdline.txt

Copy the full line in the cmdline.txt so you have 2 same lines. command 1 out with #
Replace the second line the “root=“ see below.

root=/dev/sda1 rootfs_type=ext4 root_wait rootdelay=5

Save the file

reboot now

If you have something with resize, remove that part also.

Correct location and timezone

raspi-config

Install Docker

sudo -i
apt-get install software-properties-common -y
apt-get update
apt-get install apparmor-utils apt-transport-https avahi-daemon ca-certificates curl dbus jq socat
curl -fsSL get.docker.com | sh

Install Hass.io

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

After about 20 Min login via WebUI. Create account

1 Like

Thanks, what I said is that I was booting directly from USB, as this is supposed to work, out of the box (formated my USB with Balena Eatcher), without inserting an SD card. It worked perfectly, except in update situations.

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.