OpenHAB2 on separate USB (Raspberry Pi)

I’m new here so please excuse me if I missed something.

I have set up a Raspberry Pi (Raspian Lite image) with a 16GB SDCard. I also have a 16GB USB stick and would like to install OpenHAB2 on the USB stick separate to the system on the SDCard. I’m guessing the manual installation method for OpenHAB2 is needed for this. Are there are guides or specific instructions to direct the OpenHAB2 install process to use a USB stick (and not install on the SDCard)? .

If it matters, I will later install the Z-Stick Gen 5 Z-wave controller.

Hi Michael

Search for raspbian. It is a full image with oh2 pre-installed. If you prefer your own image, I recommend the package installation.

Hi new to this, more than one year ago, I took time to install OH1, and now I’m impressed with the easy SD installation procedure, thanks for the people engaged in this project!
As not very experimented with Raspeberry and Linux word, I have almost the same question as Michael, I’ve seen that the Point of Failure of the installation is the SD Card. I’ve seen that the latest version of Raspian has an optimized OTP, in order to easily replace the Boot with an USB device. I have an mSATA SSD with USB3 interface, seems more reliable than SDCard, so my question is:
Would it be possible

  1. to modify an existing installation OH2 (19.12.2017) to move everything from SD to my USB mSATA?
  2. (if point 1 not possible) to have a prodedure to install the SD image with Etcher direct on the mSATA?

Thanks, Chris

1 Like

Hello Chris

Did you install the RPI with openhabian?
If yes, openhabian does the Job for you.

Call openhabian-conf and find the menu point…
Works like a charm.


Thanks Michael, yes, but as I was not aware that this option was already available in the Standard SD image, I didn’t try… So if I understand correctly, I just have to write the image on my USB msata drive and it will boot from my USB? Or do I need to insert an SD card? Sorry, I’m very dummy, but will improve…

Hey Chris

Nobody is dump, when he asks something ^^ There are no stupid questions, only stupid answers.

Write the openhabian Image to your SD Card of the RPI. As far as I know, the boot “Things” Need to be on the SD Card. After the basic boot (driver loading …) the RPI can Access the USB Device and boot the OS from it.

The main Problem with SD Cards is, that the get damaged sectors from many writes. With this solution you place the IO intensive parts to the USB device and your SD is safe. And if it dies, your data is at the USB device.

Detailed information can be found here. Tom Dietrich can answer you every question to his baby ^^


1 Like

Thanks very much Michael for good support! Will try, A nice day, Chris

Procedure for Raspberry Pi2 (BCM2835):

  1. format a FAT32 SD, copy a bootcode.bin file from there:
  2. copy it on the SD card
  3. boot from the SD card, wait a littlebit,
  4. switch off the RPI2
  5. boot from the USB hard disk (SSD for me) with the Openhabian image

And it works, hope it helps someone.


Ok, for me this procedure worked only once. When I switched off (removed power) and I tried to reboot for the second time, just have the “colorized” start screen and nothing seems to be booting. Any suggestions would be appreciated!


AFAK you Need always a SD for booting…

The Raspberry Pi 3 is able to directly boot from USB, after some change to cmdline.txt. You don’t need an SD Card anymore.

I moved my existing openHABian (1.3 with all updates, so basically a 1.4) easily from SD card to USB device a few weeks ago.

If i recall correctly, i cloned my SD card to an USB stick, changed the one option to boot from USB, restarted and removed the SD card since then.

Ok, so on the SD will have only the bootcode.bin file? Or other commands? thanks, Chris

Thanks for info, in detail, I should edit config.txt? Do you have the exact syntax of the line you modified?

Here is the exact description.

Basically you edit the config once, and after that, your pi stays in usb boot mode.


Raspberry Pi 3 is technically able to boot from USB directly (no SD card needed). So this is my long story short:

It depends very hard of which USB device you’re using (I read about that anywhere on GitHub… will send you the link if I’m able to remember it :wink: ); I tried with a Kingston USB stick, and it worked when I wrote the OS image directly on this stick; it didn’t work when I tried to move an existing system to this stick (including FAT partition, editing config.txt, cmdline.txt and so on); it didn’t work at all with another USB stick, and I was not able to get my SSD in a state stable enough for production use (rainbow screen - or simply nothing at all).

I’ll leave the SD card in; I moved all but /boot to my SSD, so the root file system comes from there. That’s enough for me (at least for the moment). Just for my interest: why are you doing this USB stick magic? I see no advantage, it’s flash just like the SD card, isn’t it?


Thanks, for info, at this time still running RPi2. Now modifiing the file cmdline.txt, with this:
I was able to boot from my mSATA drive connected via USB3 adapter, very happy. Then openHabian script seems to run, but I have an error:
Installing git package… OK
Cloning myself… FAILED
Initial setup exiting with an error!
Try to reboot, but error always there…

hi Marianne, just for reliability, hope my mSATA will have a longer life than my SD CARD.

I had two reasons. First, I regularly create backup images of that Pi, using Win32Diskimager. The speed of an USB3 stick is much faster than any SD card i’ve ever seen. The second reason is plain and simple, i wanted to try this. :wink:

ok, I modified my cmdline.txt with this: root=PARTUUID=mypartuuid, it’s booting from mSATA drive, and the installation process always stops at

[openHabian] Cloning myself… FAILED
[openHabian] Initial setup exiting with an error!

What’s wrong?