HA OS will not boot from SSD

I have two RPI 3’s. One model B and one B+.
On both program_usb_boot_mode=1 has been set.

On the B+ I’m running HAOS on a 2,5“ SATA SSD, connected to USB, which most times boots HAOS 7.1 or now 7.2 ok’isch.

On the model B, I’m having the same setup with an SSD on USB.
I used Balena to write the latest HAOS image, but no matter what I try, at boot it shows it finds USB devices, but then there are 0 storage devices found.
Yesterday it suddenly found 1 Storage device and it started HAOS, but at the first reboot same issue again and no luck since.

Also tried a bootcode.bin-only sdcard, but that doesn’t change anything.

Tried both 64 and then 32 bit HAOS, doesn’t make any difference.

I have now used Raspberry Pi Manager to write the latest Raspbian OS 32 bit to the same SSD. When I plug that in, the Raspberry boots immediately from the SSD without a glitch.

So the issue must lie somewhere in HAOS.

Is there any setting or file that I could use from Raspbian to copy to HAOS to make it boot from USB SSD?
Perhaps parts from cmdline.txt or config.txt?

The ones from raspbian look different, but I’m not sure if it makes sense to copy from it.

Running out of ideas here…

It’s as if my RPI3B is stuck in DWC2 mode instead of host or OTG.

No matter what I try, at boot I’m seeing bus scan and then “dr_mode not set” error, followed by “USB DWC2” and “0 Storage devices” found.

Also, only on 1 out of 4 USB ports it is booting. If I stick the SSD in any other port it doesn’t even get this far.

On this RPI3B, I had another HAOS install on another SSD at first. Might that have set something in the rpi board that has messed something up?

Again, with exactly the same hardware, Raspion OS boots fine on all 4 USB ports.

Hmmm… Now Raspbian also won’t start anymore and it also will not boot anymore from the other SSD that runs fine on the 3B+.

I think my RPI is fekked.

Are there ways to reset the motherboard to factory settings? Of any other things that might help?

It still works flawlessly from an sdcard.

You could try resetting the eeprom.

https://forums.raspberrypi.com/viewtopic.php?f=28&t=58151

Resetting eeprom is RPI 4, not 3.

Thanks for the link. I’ve read it and I guess I’ll need to check how the LED’s act from startup.

So doing another test, it now boots Raspbian again from the SSD. Both LED’s blink normal. Also checked from the command line for power issues, but none were registered.

Still strange and very annoying that Raspbian boots from SSD and HAOS will not.

I have this exact same issue. What’s even more frustrating is that it’s not a USB booting issue. I put the SD card with HA on it in a USB SD card reader and that boots up without a hitch. Raspbian can boot up the SSD over USB without a problem, yet HA doesn’t work at all. This seems like poor boot kernel builds by HA for RPi3.

I ended up selling my old RPI 3 and got a latest version 3B+ and a 4. Both work flawless with HA on USB SSD.

Mine is a 3B, and the fact that the latest Raspbian boots just fine with no issues on the USB SSD seems to me that HA is behind on kernel update compared to Raspbian or something. I have a StarTech SATA to USB 3.0 cable and it seems as though HA doesn’t want to work with it right.

Everything older than a 3B+ won’t work. I have no idea what the cause is, but after spending way too many hours on it, like I said, I gave up on it.
I think it indeed is a kernel related issue and I also tried to use other kernels, but couldn’t get it to work.

I got a RPI 4 2GB for just €20 more than for what I sold the 3B from 2012. Best decision :wink:

Yeah, I’ve thought about getting a RPi4 but they seem to be in short supply right now, and I wasn’t aware that my RPi 3B would even be worth anything. I’m almost inclined to just setup Raspbian with Docker and use the Docker setup of HA. I’m very familiar with managing a Linux server in general so that’s not out of my realm of comfort.

So I was hopeful after seeing that the latest HassOS 8.0rc3 had additional USB booting fixes in it but alas it didn’t resolve my issue. I did also find a long standing GitHub issue that pointed to the difference between Raspbian and their boot firmware and the boot firmware that HassOS is using.

it is the bootloader U-Boot HAOS is using which causes problems. In Raspbian the Raspberry pi firmware boots Linux directly, and bypasses the U-Boot.

Now U-Boot is crucial to HAOS as it enables fallback in case of failed updates etc. a feature Raspbian doesn’t has (if you apt-get fails, you will have to manually investigate).

But of course the automatic fallback relies on a working U-Boot :see_no_evil:

The problem is that the USB stack is complex. Linux and Windows have many work arounds for buggy hardware etc. U-Boot just isn’t as widely tested in USB boot scenarious. That is why HAOS recommends to not boot from USB SSD directly, instead using a SD card to boot the OS and use the data disk feature to offload all data, the Core and all Add-ons to the USB SSD. This is much more reliable as only Linux will need to talk to the USB SSD (U-Boot will boot from the SD card directly).

So there you have it. I’m going to consider this matter closed and at least I have a partial, officially supported, solution now. I just completed the data move process and my system has rebooted. I can put to rest this until I can upgrade my hardware to no longer need an SSD card at all.

1 Like

Hello there, just wondering how you got on with this? My Pi 3b+ has stopped booting from SSD, so I’m try to recover my install and then take steps to improve stability moving forwards. My plan is to:

  1. Somehow restore HAOS to get running again.
  2. Move boot loader to SD card - as per your suggestion above.
  3. Take steps to improve the stability of the filesystem on the SSD (increase swap, etc)

I also have Raspian booting from a USB which I use to repair HAOS when it goes down (it happens more frequently than I would like) so in the ideal world I would like a bootloader that can dual boot to help me recover HAOS by default, or Raspian as needed.

Anything you can add based on your experience would be really helpful, otherwise I’ll be posting a new topic shortly. Thanks!

To get rid of any instability: Buy a RPI4 and sell the 3B+. It’s only a small investment, which will save you a lot of time and annoyance.

1 Like

So that was essentially my experience where I had initially seemed to have it all working booting off of my SSD then it wouldn’t work anymore.

So far I’ve had 100% stability with just running data off of the SSD and the boot is still in my SD card. I take daily backups and send them to Google drive so in the event that something does die I should be able to recover quickly.

I do really need to get myself some backup hardware to have on hand so I’m not completely down for until new hardware arrives.