Can HA run from USB?

My first post!
I have successfully installed HA on a laptop using Ubuntu and virtualbox.
But it seems a waste of a good laptop.
I have an older HP250 without a harddrive. It will boot HA from the USB stick and I get the normal screen once everything has started up telling me the IPV4 address etc.
HA Observer tells me connected, supported, healthy.
But port 8123 tells me that HA refused to connect?
I tried this on another laptop (the first one with the successful install) and I get the same result.
Can HA run from a USB? Do I need to change something?
Help - please.

Probably. I have run some five years ago HA from a USB stick on a Pi. Be prepared to replace your USB stick very often, they break faster then a SD card.

4 Likes

Why would they break?
But the main question is why can I not connect?

Same reason as SD-cards break: excessive writing to the database. USB sticks are not made for continues writing.

Without logs, impossible to say.

Enter

ha core logs

on that screen

1 Like

They’re also usually an order of magnitude slower. Usb 2 (assuming because older hp250) maxes at 480 Mbps whereas Sata maxes out at 6Gps - Unless the USB stick was intended for ultra fast transfers and extended wear. It could just simply not be finished with first boot yet. But, without logs? Who knows.

1 Like

Does it not have space & connectors inside for a hard drive?
If yes, it’s a pretty simple job to install and a 64GB drive from a decent brand is pretty cheap nowadays.

Save yourself the hassle and time trying to fix a crashed system and do it right the first time.

1 Like

Next question - how do I get the log off the server to show here?
I was going to ssh in but that doesn’t seem to work.

Is my system not working because it is a read-only file system?

No? What gives the impression anything is read only?

when I try to write the log to a text file it informs me.

ha core logs > corelog.txt
/bin/ash: can’t create corelog.txt: Read-only file system

Without any logs we can’t tell you any more except that 99.999% of all garden variety usb sticks are simply not suitable for running HA. (I personally don’t consider SD cards suitable either because they’re not designed for high volume writes. But it’s not a USB stick) It will be slow at best and error prone and crash a lot at worst.

The install image has 8 partitions inside it when it comes up it pulls the latest version down from github, expands it and fires it up. If your stick has issues. This won’t go well…

Beyond that we’re all guessing. (you’re fighting to pull logs off of something so it can tell you not to do that thing)

Attached is a photo of the log - I hope. not much to see.

USB will be a temp solution.
I have been booting this laptop from USB for a while now - using Ubuntu. Just convenient for some stuff like streaming media to the TV. As you can see the screen has problems.

Signal 7 is usually indicative of an error accessing the bus. (what you’d see if it was having trouble accessing the stick)

Time to go get a drive.

1 Like

Thank you Nathan.
I have so much PC hardware lying around I am trying to NOT buy anymore.
Would a USB hard drive work better? Bit clumsy.

Where are you in the world? I am not keeping you awake?

Yes a usb HDD or SSD will do. You won’t have great transfer rates but it should at least work if you’re not having issues with tree usb bus itself (still possible - you haven’t ruled it out, but knowing how this stuff works I’m almost positive it’s the stick itself)

USB sticks and SDs (not SSDs) aren’t appropriate because fundamentally ha is running a database. Constantly pounding the heck out of the disk that DB lives on with constant writes. The way USB sticks and SD cards work each of those writes Wears out the solid state memory - they have lifetimes and when they quit… Well. Now I just said HA is CONSTANTLY (no joke, even on systems with well optimized databases) writing to the disk… Sooooo.

(this is why it’s so different from a basic Ubuntu…)

You can get by with an SD. Just understand at some point I the future it WILL fail - be ready with its replacement.

HDDs (spinning) and SSDs (not SDs) each work in a fundamentally different way - avoiding the type of issues with an os hammering the disk. (poor quality SSD may however have limited lifespans)

And the sun is up in the states…

1 Like

And I have found a use for my old 40GB HDD!!!
Onboarding as we speak.
Thank you.
It all seems to be working.

Now just need to find out how to make my Yamaha play more than one track at a time and to make my electricity meter talk to it and the TV too and the Kodi and the Tuya stuff and and and…

You must be on the East coast. Almost lunch time here in South Africa.

1 Like

Make sure you have some sort of backup in place. I have it backing up to my NAS every night.

1 Like