Run OpenHABian from USB hard drive on RPi

I know OpenHABian has an option to move the root from SD card to USB drive. I tried taking the OpenHABian image and writing it directly to a USB hard drive. The RPi3 has a OTP peripheral that can be used to set it to enable USB boot when the SD card is empty.

This works great for Raspbian images. But this doesn’t work with the OpenHabian RPi image. I think maybe during the ~20 minutes that it takes for the initial image to do whatever it does inititally to ready the SD card, it must assume something about running on an SD card? When I tried a straight-up USB drive installation, even after waiting a long time, it never boots up. If it’s making these assumptions, maybe we can improve the OpenHabian image to not make those assumptions?

I’ve also let it do it’s 20 minute thing on the SD card, then make an image of the SD card and then write that image on a USB drive. That works, but I’m stuck with a 1TB hard drive that’s only 16GB usable because the original SD card was only 16GB.

The current method of “move to USB drive” still requires an SD card. And if I want to do simple image backups as the method for backing up the entire setup, I would need to backup both the SD card and the HD…and I’m not sure if I later write the HD image on different brand/size USB HD’s, would the SD card still boot to the HD correctly?

Correct:

1 Like

Excuse the thread revival but I just moved root from a 16GB sdcard to a 32GB USB stick and it appears to have copied a 16GB image leaving 16GB unused. Were you able to find a way around this to make full use of the 1TB drive?

I think you would need to expand the filesystem. Try https://www.raspberrypi.org/documentation/configuration/raspi-config.md

or
https://elinux.org/RPi_Resize_Flash_Partitions

Thanks. The first option will not work because the utility expects an sdcard not a usb card. Will investigate the second option.