USB Boot on Raspberry Pi 3

Great work here. I wrote a blog post with a fuller step-by-step and screenshots if anyone is still struggling with getting this working. I found the modification of the cmdline.txt and config.txt to not be that straightforward for a relative Linux noob.

On a second note, what are the advantages of running from USB instead of SD-Card?

3 Likes

My understanding is that USB or SSD are generally believe to be (somewhat) less susceptible to data loss due to restarts/power loss and have a longer life-span. Iā€™m sure many people have multiple experiences and opinions on it. I had switch to SSD for this reason. I had back-ups just in-case but my family has become quite dependent on HA and I did not want to get a call about how the system has crashed :slight_smile:

However, since my last posting here I have found the the rPi3 was struggling too much with my config (not that it was terribly robust) so I have moved my set up over to a PC running Docker. All system related errors have vanished.

Itā€™s interesting. I was originally using a noobs card I purchased with the Pi (long story) but youā€™d think it was a pretty good quality card, 32gb class 10 etc. However I was finding HA was locking up and I could not access Hassio menu or update or do anything in ssh etc. Reboot and it would be OK for another day. Frustrating.

Then after reading a bit on the forums, I got a Samsung EVO 32gb and then had people saying they had seen these fail as well and also maybe smaller cards are betterā€¦ When the card arrived, I imaged it and restored my latest snapshot. (which was a brilliant experience much easier than expected) This was maybe a month ago and I have not had any problem with HA since. Not a single hang up or odd behaviour. I couldnā€™t believe it.

I also ran the hwtest exe on that old card and it reports as being flawless! SO I donā€™t know.

There is also considerable discussion and people saying they have multiple failures etc. So I decided to have a play with a USB stick for self interest. So at the moment Iā€™m just trying to decide if I should switch or not. I have a USB good to go and Iā€™ve automated shortcuts and syncing those with dropbox so if anything happens itā€™s a quick recovery anyway.

So Iā€™m interested in the community experiences and advice/recommendations.

My experiences could have been related to age of SD card or more recently with the SSD, the SSD being too slow. This was my 1st experience with an SSD on a Pi although I do not recall the issues/errors when I 1st switched to it. The interface for it connects to the Piā€™s USB bus so not sure if was stressing to to much as I also had my Z-stick and UPS (via USB) connected.

I still have the Pi with SSD but will apportion it to a task of lesser importance.

Is someone making or has made an easy to flash and run Hassio on a USB-drive on first boot?

yes see above. Thatā€™s the whole point.

Not all ā€œeasyā€ considering the hacks and fiddling needed to get it to work without errors from what Iā€™m reading here.

It sounds daunting but itā€™s pretty straightforward. See this post USB Boot on Raspberry Pi 3 for my link to a step by step with screenshots etc.

Itā€™s really not as difficult as you think.

So have you seen much improvement in performance with this setup? Iā€™m considering doing it, but not sure if itā€™s worth the effort.

I havenā€™t - but Iā€™m using a USB stickā€¦ Iā€™m planning on switching to a real SSD drive. I expect that will perform better.

Has anyone got this working with a zwave usb stick connected as well as the usb boot device?
I have followed all of the steps several times but cannot get my hassio to boot from usb and wondering if it is trying to boot from the zwave stick.

Thanks

Iā€™ve booting from a USB connected SSD, and have both a Zwave stick and a RFXtrx connected via USB. No problems at all.

1 Like

Thanks,
Must be doing something wrong.

Thanks for the instruction it seems to work as I have the Hassio splash screen.
Question. Why donā€™t we use all the available space when resizing the partition sda4 ?

I did:

  1. Get a small sd, 16Gb in my case.
  2. Burn and plug it in to the rpi. Let it finish.
  3. Shutdown and plug the SD in to your computer.
  4. Create a SD img to disk and burn it to your USB Drive 32GB in my case.
  5. Modify the sda as described above.
    Done.

You can also shrink the partition (itā€™s the biggest one) after step 3 with GParted if your SD card is bigger than your USB Drive.
You can also expand your USB drive with GParted if you want after step 5 (expand the biggest partition).
Step 4 is different depending on OS, ex. ā€œSD Cloneā€ works well on macOS.

Thought Iā€™d chime in a bit late, I followed the blog post here just today and the only thing that I had problems with was my Pi wouldnā€™t start the install process over WiFi even though I had made the changes mentioned in Step 3 of the install guide. I ended up hooking up a network cable and Iā€™m off and running now.

  1. WiFi setup only: open the file system-connections/resin-sample (from the resin-boot volume on the SD card) with a text editor. Change ssid to be your network name and psk to be your password. Note: When connecting to a 5 GHz-only network, make sure your device supports that. If you donā€™t know what that means, then you probably have nothing to worry about.

Iā€™ve been running hassio on pi 3B with external HDD for sometime. Since I tried a beta of 0.70 Iā€™ve had no end of trouble unfortunately. In the end I started from scratch again on 0.71 and all was running well, till one day it just completely died and wouldnā€™t respond. Iā€™m now trying to get the latest build on my HDD I started with the 32 bit pi image which the instructions above have always worked well for, however this time I got stuck on the ā€œpreparing home assistantā€ screen as some others have reported. I tried a fresh download and etch of the image to no avail.

So I then noticed there is a 64bit version which Iā€™ve been trying with. I noticed immediately this is different to the 32bit image as it uses a boot.bin and the partitions were slightly different in gparted.

Currently I donā€™t seem to be having much luck with this either, the pi isnā€™t even connecting to the network and there is no disk activity, which tells me itā€™s not booting.

Can I confirm Iā€™m doing everything right for the 64bit image to boot from a usb HDD.

Formatted to ext4 in gparted with a single primary partition.

Used etcher (Iā€™m on windows) to write the image

Back in gparted increase the resin data from 1gb to fill the drive (236gb)

No need to resize sda1 in this image it seems to allow you to go straight to resin data.

Attach the drive to the pi (which has already been set to boot from usb)

Everything should work?

Itā€™s not currently but I wonder if someone can point me in the right direction :slight_smile:

I just did a reinstall the other day to use.

I donā€™t know why you used gparted to format - etcher does all this automatically. I did use gparted to resize the data partition and then also resized a partition within that t full size as well. Nothing has changed with Hassio on ResinOS in that regard.

Hey Guys,

Is this still required with the new HASSOS?

Cheers Rob.

It was never ā€˜requiredā€™ with the old hassos