USB Boot on Raspberry Pi 3

Omg same issue on rasbian os stuck on Preparing HASS grrrrrrrrrrrrr
If I didn’t love HOME ASSISTANT so much I would burn my raspberry pi in a supper hot fire . I need to take a few days off driving me crazy lol

Out Of Frustration Ive Made a you tube video on how to apply this and make it boot hope it helps someone as its driven me mad lol this works and gets home assistant up and working after about ten minutes but!!!
so far I can not enable ssh or make any changes as when conected directly to raspberry pi it has just a black screen.
maybe its still doing some upgrades in the back ground but without ssh or access to the dash / terminal i am stuck again OMG any ideas

I have tried this below but not working grrrrrrrr

Solution 1: File “ssh” in the boot partition
If you do not have the option to use the Raspberry Pi via keyboard, mouse and screen, you can create an empty file named “ssh” on the SD memory card in the boot partition. If you do that with Windows, then you have to make sure that no file extension is added.
When Raspbian is started, SSH is activated and the file is deleted automatically.

@Jullimullins and @xbmcnut

Thanks to both of you I have my existing Hassio setup working form USB. It seems to take a bit to full boot up and a had a problem with MQTT not starting and mariadb not starting but once I reset those and rebooted everything came in with my existing config.

  1. Made backup of existing HASIO microSD card with win32diskimager
  2. Installed Gparted live on a small USB drives
  3. Installed Raspbian8 Lite (2017-04-10) on a MicroSD card and followed the instructions here32 to enable USB boot mode.
  4. Rebooted Pi then shut down a few minutes later.
    5, Burned backed up hassio14 Pi3 image to a 64GB USB drive.
  5. Booted PC into Gparted live to re-partition hassio image.
    a. Increased /dev/sdb4 from 1GB to around 4GB (must do first otherwise you can’t expand the resin-data partition).
    b. Increased /dev/sdb6 from 1GB to pretty much whatever was left.
  6. Rebooted to windows, put in new HASSIO USB and change the cmdline.txt and config.txt files as suggested

Put USB in RP3 and booted. I took a bit and had issue with MariaDB and MQTT but last reboot work fine and now my existing Hassio is up and running off the USB.

1 Like

Just wanted to say thanks! One I figured out I was missing step 7 this worked great with my SSD using the Pi Desktop Kit. I completely missed the part of changing to sda2 the first 2 times I tried.

Also wanted to note 2 things:

  1. I copied my existing set up from a 32GB microSD to a 32GB SSD and really did not need to use Gparted. I did anyways but only gained about 4MB of unused space as it has already filled the SSD.
  2. I did not need to add ‘program_usb_boot_mode=1’ to config.txt for it to work, or at least it booted up fine without it.

If you haven’t seen it yet, here is the Desktop kit. The case has a little extra room so I might add a fan just to make me feel better:

Just had another SD card die on me.

With this was an included option for Hassio, don’t like hack changes that might introduce errors I’ll be hunting down in the future.

1 Like

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.