Zram installation failed openhab2

  • Platform information:
    • Hardware: Rpi4
    • Openhabian 2.5.12

I tried installing Zram thru the openhabian-config menu and am receiving the following error:

$ git clone --recurse-submodules --branch openHAB2 GitHub - ecdye/zram-config: A complete zram-config utility for swap, directories, and logs to reduce SD, NAND and eMMC block wear. /opt/zram/zram-config
Cloning into ‘/opt/zram/zram-config’…
fatal: Remote branch openHAB2 not found in upstream origin
FAILED (clone zram)

Have searched for this issue but could not find a solution. Any help in pointing me in the right direction is much appreciated.
With kind regards,
Will van Gemert

Cannot tell with that little information you provided but you use an outdated openHABian branch (correct one would be ‘stable’). Change branch and retry.
The safest and most simple solution though is an openHABian reinstall (read the docs how to obtain OH2).

Hi Markus,
Thank you for your quick response, checked my branch to be the stable branch and ran it again but with the same result.

2022-04-19_13:14:10_CEST [openHABian] Checking for root privileges… OK
2022-04-19_13:14:11_CEST [openHABian] Loading configuration file ‘/etc/openhabian.conf’… OK
2022-04-19_13:14:11_CEST [openHABian] openHABian configuration tool version: [stable]patchday-20210119-1121(1c01b34)
2022-04-19_13:14:11_CEST [openHABian] Checking for changes in origin branch stable… OK
2022-04-19_13:14:19_CEST [openHABian] Switching to branch stable… OK
2022-04-19_13:14:31_CEST [openHABian] Updating Linux package information… OK
2022-04-19_13:14:34_CEST [openHABian] Installing ZRAM code…
$ mkdir -p /opt/zram

$ git clone --recurse-submodules --branch openHAB2 GitHub - ecdye/zram-config: A complete zram-config utility for swap, directories, and logs to reduce SD, NAND and eMMC block wear. /opt/zram/zram-config
Cloning into ‘/opt/zram/zram-config’…
fatal: Remote branch openHAB2 not found in upstream origin

To check for existing branches I ran:
$ git ls-remote --heads GitHub - ecdye/zram-config: A complete zram-config utility for swap, directories, and logs to reduce SD, NAND and eMMC block wear.

With this result:
c28bba016ecd00d5fa491886e3369de31c071deb refs/heads/main
395cee0520ac95853d45ea2e36d6f58e7e564312 refs/heads/openHAB

To me it seems that either the branch openHAB2 is missing or the config tool schould look for branch openHAB?
With kind regards,
Will van Gemert

As I said when that doesn’t work, reinstall latest openHABian with the stable branch.

Ok,
In that case I wil make the move to OpenHAB3 next month when we return to Italy. Have read almost all your posts on SSD versus SD also in relation to backup strategy. And you kind of convinced me that staying with sd combined with Zram and a backup strategy with Amanda and sd card mirroring is the way to go.
Amanda wil perform backup to ssd. I have, per your advice, all hardware as spare devices and by now an extensive installation manual and of course the rPi is behind a solid UPS.
This OpenHAB instance is is running remotely as we live in the Netherlands but I am sure the sd card will survive that month easily;)

Kind regards and thank you for all the work you guys have put in to OpenHAB,
Will van Gemert

You can reinstall openHABian independent of a migration to OH3 and I strongly suggest you do. An OH3 migration not necessarily is but can be painful and lengthy.