USB Boot on Raspberry Pi 3

Yes, boot from USB only is supported on Pi3. You can still boot from USB on older models but you must have the SD card in place.

Works great thank you :smile:

1 Like

FYI, Iā€™m having huge problems with this USB flash drive build and not sure what the problem is. Hassio does not restart well and if it does at all, it takes 10-15 minutes even with only a few entities. At the moment I cannot open the webpage even though hassio homeassistant check returns no errors. They log file simply says this:

2017-08-22 19:15:11 WARNING (MainThread) [homeassistant.setup] Setup of recorder is taking over 10 seconds.
2017-08-22 19:15:34 WARNING (MainThread) [homeassistant.setup] Setup of notify is taking over 10 seconds.
2017-08-22 19:15:36 WARNING (MainThread) [homeassistant.setup] Setup of media_player is taking over 10 seconds.
2017-08-22 19:15:37 WARNING (MainThread) [homeassistant.setup] Setup of device_tracker is taking over 10 seconds.
2017-08-22 19:15:39 WARNING (MainThread) [homeassistant.setup] Setup of tts is taking over 10 seconds.
2017-08-22 19:15:50 WARNING (MainThread) [homeassistant.components.media_player] Setup of platform cast is taking over 10 seconds.

Sometimes a reboot will help but restarting HA itself seems to kill it and the logs arenā€™t helpful. Running another build on a Pi2 using a MicroSD card and that instance is fine and restarts in a timely fashion. Oddly, Samba and SSH are working fine. Argh HA, the hours Iā€™ve spentā€¦

1 Like

What SATA SSDā€™s are you using? And more important what USB->SATA adapter did you find work well with the PI ?

Iā€™m using a ā€˜ADATAā€™ USB thumb drive. Going to try again tomorrow using the Lexar that was running my Hassbian image sweet as for the last 6 months.

Iā€™m lost. Where do you find the ā€œresin-rootA partition in resin-boot directoryā€? Iā€™m running Windows if thatā€™s the matter?

resin-boot should be available in Windows as a connected drive after youā€™ve flashed the image to the USB.
resin-rootA partition wonā€™t show up under Windows or macOS since itā€™s a partition formatted as ext4 which is a filesystem only Linux OSā€™s understand out of the box.

In order to modify anything on the resin-rootA partition youā€™d either need to:

  • Install some kernel extension for Windows or macOS that understands the ext4 filesystem
  • Boot from a gparted live distro (prob the easiest)
  • Connect your drive to a Linux VM like Ubuntu or in general just anything thatā€™s linux, has a shell and understands ext4 (my preferred way)

Hi guys,

Do you have any problem when you restart HA?
Form time to time when I restart the front-end, it doesnā€™t boot back and I need to unplug the raspberry from the power supplyā€¦

Hi @xbmcnut, did the Lexar solve the ā€œtaking over 10 secondsā€ issue?

@Klex1404 Sorry, never got around to trying it as didnā€™t want to stuff my ā€˜liveā€™ system. Sadly, my Hassio test system has now died and wonā€™t boot at all. Back to the drawing board.

I can comfirm this works for me as well. Tho like he said best to use Linux distro ( or in VM ) to partition this image and I also needed su to edit the files inside ā€œrootAā€ partition.

Would be nice if hass.io could perform boot from USB without all the needed steps performed above and simply just use the standard bootcode.bin from raspbian somehow to implent booting from USB. This way older raspberry piā€™s can also boot from USB as well too. But I am not sure if this works with Resin.OS.

Hi,

I canā€™t make it work :expressionless: can anyone who has it working help me with this? on private I guess.

I managed to boot raspbian via USB (external HDD), but i canā€™t manage to boot HassIO.

I tried this and now it works

https://community.home-assistant.io/t/usb-boot-on-raspberry-pi-3/20358/37?u=johan71

I followed your details closely and have limited success. It may be because Iā€™m running something newer than the version you were using when you worked the problem out.

Presently, I am able to boot and after a period of time, it does present me with a web based login (password only) and then the swirly circle that never ends. Sadly, they prevent console access so no one can attempt to debug anything and I canā€™t enable SSH until I get the thing configured, so how am I supposed to work it out without knowing whatā€™s going wrong?

I suppose I could shut down and move the USB drive back to my CentOS laptop to read logsā€¦

Why on earth are they making this ResinOS so ridiculously inflexible? They should just make it run on USB naturally. Thereā€™s no reason not to.

Anyway, can you indicate what release you were using when you hacked it successfully?

Omg yet another HASSBIAN image I can not boot from tried suggesting methods but gave up after a few days I know we are booting from USB but this is not a big deal . It would be nice if this can be tested or fixed before releasing as every time I lose days of trying to make it work and end up reverting to Raspbian image maybe one day the amazing USB technologies can be used lol

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