Installing Home Assistant on a RPi 4b with SSD boot

Why don’t you try to boot from that drive and see what happens?

I think I could, now I can see the SD card has the same partition structure, however the SD shows the large partition as the bulk of the SD card (32GB), but this SSD only shows 1GB.

I suggest you clone the SD card to the SSD using the free version of Minitool Backer Upper (under the tools option) and select exact copy. You will get exactly that.

“All theory is gray, my friend. But forever green is the tree of life.”
Johann Wolfgang von Goethe, Faust, First Part

That darn image has to contain a standard partition pattern that fits on any medium and that is later modified to use the whole. Will you now please plug that thing in and get happy? :crazy_face:

PS: I have to say that watching you two discussing yourselves into abyss is also quite entertaining. But I’m afraid that others might read and follow you.

Installed 5.11 and I did not experience any problems :slight_smile:

I’ve been working on this for 3 hours and cannot get it working. I followed the instructions step-by-step twice with loading HA on my SDD and the Pi OS on the SSD, then updating Pi OS and setting the boot order, etc. I’ve done this twice in case I had missed a step.

My results are:

  • Booting Pi OS on SD with SSD attached: boots from SD, regardless of if I put the SSD on the USB 2 or USB 3 ports
  • Remove SD and boot only from SSD (according to what I’ve read this should work by default on the latest Pi 4’s, which I have): nothing loads at all
  • Remove SSD and boot only from SD and set boot loader to default (again, since the Pi 4B should already allow USB boot by default) then remove the SD and boot from SSD: nothing loads at all
  • Try an older method of adding program_usb_boot_mode=1 to the /boot/config.txt: boots from SD

I have a WD Blue drive and used the USB dongle recommended for use with the Pi, but if I boot into the Pi OS and run df I don’t see the SSD drive, so I’m assuming that could be the problem, perhaps the dongle isn’t compatible or the SSD isn’t compatible:

Filesystem     1K-blocks    Used Available Use% Mounted on
/dev/root       30450024 3092952  26067516  11% /
devtmpfs         3900048       0   3900048   0% /dev
tmpfs            4032144       0   4032144   0% /dev/shm
tmpfs            4032144    8680   4023464   1% /run
tmpfs               5120       4      5116   1% /run/lock
tmpfs            4032144       0   4032144   0% /sys/fs/cgroup
/dev/mmcblk0p1    258095   49582    208514  20% /boot
tmpfs             806428       0    806428   0% /run/user/1000

But my dmesg shows that it found the drive:

[    2.046185] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    2.046202] usb 1-1: Product: USB2.0 Hub
[    2.048349] hub 1-1:1.0: USB hub found
[    2.048637] hub 1-1:1.0: 4 ports detected
[    2.194290] usb 2-1: new SuperSpeed Gen 1 USB device number 2 using xhci_hcd
[    2.226018] usb 2-1: New USB device found, idVendor=152d, idProduct=0578, bcdDevice= 2.09
[    2.226040] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    2.226057] usb 2-1: Product: USB to ATA/ATAPI Bridge
[    2.226075] usb 2-1: Manufacturer: JMicron
[    2.226091] usb 2-1: SerialNumber: 0123456789ABCDEF
[    2.252906] scsi host0: uas
[    2.254484] scsi 0:0:0:0: Direct-Access     JMicron  Generic          0209 PQ: 0 ANSI: 6

So I’m kind of at a loss for what to do next.

I’ve done this and my knowlwdge is slightly above idiot level, and it worked fine.

So have you read the instructions from the beginning?

Do you have the CURRENTLY recommended USB to SSD adapter?

Tony

Not according to this, I guess not. This is a moving target, I’m wondering if using a Pi was the right way to go, everything about it seems it is ill suited to be a good long-term HA device (hack after hack and this specific part or that one, SD might fail and is slow, etc, etc):

I’m using the starTech, Tried both 3.0 and 3.1 both have freeze issues on OS above 5.4. Not sure why it works for some and not for others. C

Bill, could you rule out your SSD type? And did you check your power supply? Possible that your SSD asks for peak currents that your supply can not provide? Any other loads on that power supply, like additional hats or USB clients connected to the Pi?

@Jpsy I use a kingston 120 g ssd. Power supply is 3 A ( the recommended one, came in the kit). I have the wyze sense usb hub. Not sure why either would be an issue only on os versions above 5.4? There are many users in different Github issue reports with with the exact same issue but with different controllers and SSDs. There is a spreadsheet in the 1119 freeze report,
https://github.com/home-assistant/operating-system/issues/1119
which lists the many different variations. Looks like the official developer’s position is boot from the SD and use the SSD for storage.

So I’m back with an update. I installed HA back on an SD card, and ran the update and it worked! I’m now on 2021.02.03. Did some tidy up, and took a new snapshot. Does this mean there was space issue with my SSD? I use balenaEtcher to flash the image, and I notice it creates more than one partitions, is this normal. I’m using Mac.

After struggling for more than 5 hours, I have succeded at using SSK M.2 NVME SSD enclosure SHE-C325 with JMS583 chipset.
Initially, it was only working with USB 2.0 interface. After hunting around forums, I found a particular firmware update for this chipset. That was the key. Now I am good to go.
This video helped along. Plus a firmware update for the enclosure.

For those of you interested, the folks over there have that update
2.0.9 JMS583

The list here is also very helpful:

yeah… make sure you get USB enclosure that support linux else it wont be detected unless you are doing it following James Chambers guide.

I have had many communications with the developers and they are now (for many months) recommending not booting from the SSD but to use this method:

https://github.com/home-assistant/operating-system/blob/9ba4dd552402b9825b15448c1874d26110ef6cc2/Documentation/partition.md#data-disk 

I can’t understand why this method will eliminate the freeze issue but the claim is that it will. There are many open issues on github with system issues booting from SSD. One of them,

https://github.com/home-assistant/operating-system/issues/1119

has a spreadsheet showing many of the users setup. Not sure why some identical hardware is rock stable and others are not. Most people on this github issue are using the claimed working controllers and SSD devices. I don’t understand why most users in 1119 can find a version of the OS that works, but can’t update to later version? I believe that no one there that has a freeze issue can get Home Assistant to work above 5.4 (when the kernel was updated). This would make me believe it is kernel related and not hardware, but who knows until it is resolved.

I don’t know if you looked at the partition method as this eliminates most of the issues with the SD failures as the SD is used to boot only and everything else is on the SSD. If I go this way, I’ll post here with directions for going from SSD to SD & SSD. I believe I have many steps to get there.

1 Like

Supercool topic!
I had my pi running from ssd in no time using your instructions. Many thanks.

Just a small hitch I had while using a clean cli only install:

  • Before changing the default to latest, make all the updates and reboot.

  • Then change the eeprom file to latest and update / reboot again.

  • Also I had to change the bootloader andset it to reboot using deafults (select Yes)

  • After reboot go into config again and change the boot order.

the rest was like a walk in the park

1 Like

when the system asks to “Reset boot ROM to defaults” select No (!!!) to use the latest boot ROM

I selected yes to this question (Before i read this guide). Is there a way to revert that ?

I am getting just a black screen when trying to boot of my SSD

Interesting enough…that is my dog…

A month ago or so, a HA update crashed or messed up my SD card. Being pretty frustrating, it killed my enthusiasm to get back on it for weeks.

Anyway, I’ve now been reading how to use more reliable media with Raspberry 4, gotten a SSD (Intenso 128 Gb) and so on. Following these instructions (thank you!) I’ve managed to change Raspberry 4 to boot from USB, flashed newest HA 5.12 64bit image to SSD and got it to boot it from USB3 port just fine. So far, two times, that is…

The problems seem to come in two flavours:

  1. restoring the HA backup ends up in some kind of freeze, so I’m not going to try it anymore, but start configuring the whole thing from scratch…, and
  2. after the second try, attaching a Conbee stick (with extension cable) messed up things right away, and HA did not survive.

Now, while HA is, once again, preparing itself, having freshly flashed image in SSD, which is now attached to USB2 port my question is: Does this make any difference with SSD <-> Conbee interference matter? Any advice how to proceed safely?

I too experienced “freezing” when trying to restore a recent backup.

I found that some processes were working full out doing something (monitored using “top”, and my case was very warm). I once gave them overnight to try to complete but they were still going, so I stopped it.

Anyone have ideas what would cause this, or what to look for?