Usb device not recognized on boot

  • Platform information:
    • Hardware: raspberry pi 4g
    • OS: openhabian: openhab 3.2; linux kernel 5.15.30v71+; Raspbian GNU/Linux 11 (bullseye)
    • Java Runtime Environment: Zulu11.52+13-CA
    • openHAB version: 3.2.0
  • Issue of the topic: I’m running everything from a microsd, which is not the recommended setup. Everything is working fine, but I thought of moving to a usb-hd based system before the microsd fails. I rescued a couple of hdd from an old NAS and a Renkforce Cloner+Eraser which I was not really using. I put the hdd in the Renkforce and connect this to a usb 3 port in my raspberry pi. Everything works fine: I see both hdds, I can format them using vfat, I can store data. However, once I reboot the Pi, the usb is not detected any more. The Renkforce is self-powered. ‘lsusb’ does not list the device. I need to unplug, power it down and plug/power it up again in order to see the hdds. In the pi boot screen there are no errors, apart from an occasional failure to start rpi-eeprom-update.service: the status log seems ok: “Dec 19 23:18:38 openhabian rpi-eeprom-update[362]: Skipping automatic bootloader upgrade. current 1619712685 >= min 1599135103”

Using old hdds for boot/openhab might make it too slow, but I would like to still try and, if too slow, just use them for auto backups.
Any idea about what’s going on? Alternatively, any command to force the OS to recheck usb ports after boot?

Thanks!

You’ve got that backward. a MicroSD card is the recommendation for openHABian, and is the only supported storage format. You can use other formats, and hopefully someone who does will chime in knowing how to get it working. “Supported” just means that we might not be able to help you, since there are so many untested variables in play.

If you haven’t already done so, you might also want to check RPI forums (since this sounds like more of a hardware/Raspbian issue than an openHAB issue).

I get wanting to use equipment that you already have. If you don’t have any luck, my personal recommendation is to:

  1. Swap out your MicroSD card once a year
  2. Put your RPi on a UPS.

Sudden power loss is the biggest killer of SD cards, particularly since openHABian uses ZRAM to reduce writes.

Good luck!

As Russ already wrote: SD Card is the recommendation.
From my experience: I ran openHAB for some years from a “move root to USB” and it worked kinda. But I also struggled with the needed power for the external HDD and did also run into some back-feed problems into the Pi and as it finally ran I didn’t even know why… :wink:

Since an upgrade I went with the SD Cards - and now that specific Pi runs from a SD Card since three years (on a remote cottage - summer: up to 35°C and winter: up to -15°C) without a problem. But regular backups via amanda make me not lose any information on my setup.

Docs are written to be read.

It’s a quibble and perhaps a little off topic, but this statement isn’t quite right. It reads that openHABian is more prone to this power loss problem beacuse of the ZRAM. But it’s quite the opposite. The problem with power loss is if a write is ongoing to the SD card when power is lost, you lose not only that file but any parts of files that share that sector. Because of wear leveling that could be anything resulting in corrupt file systems or failure to boot and the like.

In truth, ZRAM mitigates the power loss problem because it reduces the likelihood that a write will be ongoing when the machine loses power, since so many of the writes are moved to RAM. Of course you’ll lose what’s in RAM but you are less likely to corrupt your SD card.

Also, an SD card corrupted in this fashion is not ruined. It can be wiped and used again safely.

Agreed. Thanks for clarifying, Rich.

Thanks a lot for the info. My sd card has been working well for three years, since openhab 2. Somehow I remember reading that openhab would do a lot of writes and would damage the sd card fast, so I got an endurance sd card. I get it now that having an external drive is for automatic backups and not to run the system. Iiuc it seems it is preferable to have two things:

  • a sd card reader to clone the main sd
  • another external storage for regular backups

It is unfortunate that my existing hardware is somehow not compatible with the pi boot process.

Thanks again!

1 Like