Upgrade to OpenHAB3 using openhabian fails trying to set ZRAM dependency

I am trying to migrate to OpenHAB3 on a Pi4B running openhabian [main]v1.6.3-1186(dcc2b04).

While executing menu item 03 Install OpenHAB, I get the following error:

2021-02-05_08:58:07_MST [openHABian] Adding openhab to zram service dependencies... + cond_redirect sed -i -e '/^Before/s/$/ openhab.service/' /etc/systemd/system/zram-config.service
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ sed -i -e /^Before/s/$/ openhab.service/ /etc/systemd/system/zram-config.service \033[39;49;00m'

$ sed -i -e /^Before/s/$/ openhab.service/ /etc/systemd/system/zram-config.service
+ sed -i -e '/^Before/s/$/ openhab.service/' /etc/systemd/system/zram-config.service
sed: can't read /etc/systemd/system/zram-config.service: No such file or directory
+ return 2
+ echo 'FAILED (sed add dependency)'
FAILED (sed add dependency)
+ return 1
+ return 1
+ '[' 1 -ne 0 ']'
+ whiptail --msgbox 'There was an error or interruption during the execution of:\n  "03 | Install openHAB"\n\nPlease try again. If the error persists, please read /opt/openhabian/docs/openhabian-DEBUG.md or https://github.com/openhab/openhabian/blob/main/docs/openhabian-DEBUG.md how to proceed.' 14 80
+ return 0

I tried to add ZRAM using openhabian menu 38 (hoping that would give it what it was looking for), but that yields an error saying that ZRAM is already installed

+ choice2='38 | Use zram'
+ '[' 0 -eq 1 ']'
+ '[' 1 -eq 255 ']'
+ wait_for_apt_to_finish_update
++ timestamp
++ date +%F_%T_%Z
+ echo -n '2021-02-05_09:40:13_MST [openHABian] Updating Linux package information... '
2021-02-05_09:40:13_MST [openHABian] Updating Linux package information... + [[ -z 22975 ]]
+ tail --pid=22975 -f /dev/null
+ echo OK
OK
+ case "$choice2" in
+ init_zram_mounts install
+ is_arm
+ is_armv6l
+ [[ armv7l == \a\r\m\v\6\l ]]
+ case "$(uname -m)" in
++ uname -m
+ return 1
+ is_armv7l
+ [[ armv7l == \a\r\m\v\7\l ]]
+ return 0
+ return 0
+ local disklistFileAWS=/etc/amanda/openhab-aws/disklist
+ local disklistFileDir=/etc/amanda/openhab-dir/disklist
+ local 'introText=You are about to activate the zram feature.\nBe aware you do this at your own risk of data loss.\nPlease check out the "zram status" thread at https://community.openhab.org/t/zram-status/80996 before proceeding.'
+ local 'lowMemText=Your system has less than 1 GB of RAM. It is definitely NOT recommended to run zram (AND openHAB) on your box. If you proceed now you will do so at your own risk!'
+ local zramInstallLocation=/opt/zram
+ [[ install == \i\n\s\t\a\l\l ]]
+ [[ -f /etc/ztab ]]
+ [[ install == \u\n\i\n\s\t\a\l\l ]]
++ timestamp
++ date +%F_%T_%Z
+ echo '2021-02-05_09:40:15_MST [openHABian] Refusing to install zram as it is already installed, please uninstall and then try again... EXITING'
2021-02-05_09:40:15_MST [openHABian] Refusing to install zram as it is already installed, please uninstall and then try again... EXITING
+ return 1
+ '[' 1 -ne 0 ']'
+ whiptail --msgbox 'There was an error or interruption during the execution of:\n  "30 | System Settings"\n\nPlease try again. If the error persists, please read /opt/openhabian/docs/openhabian-DEBUG.md or https://github.com/openhab/openhabian/blob/main/docs/openhabian-DEBUG.md how to proceed.' 14 80
+ return 0

When I try to remove it, I also get an error

+ choice2='   | Uninstall zram'
+ '[' 0 -eq 1 ']'
+ '[' 1 -eq 255 ']'
+ wait_for_apt_to_finish_update
++ timestamp
++ date +%F_%T_%Z
+ echo -n '2021-02-05_09:42:26_MST [openHABian] Updating Linux package information... '
2021-02-05_09:42:26_MST [openHABian] Updating Linux package information... + [[ -z 25604 ]]
+ tail --pid=25604 -f /dev/null
+ echo OK
OK
+ case "$choice2" in
+ init_zram_mounts uninstall
+ is_arm
+ is_armv6l
+ [[ armv7l == \a\r\m\v\6\l ]]
+ case "$(uname -m)" in
++ uname -m
+ return 1
+ is_armv7l
+ [[ armv7l == \a\r\m\v\7\l ]]
+ return 0
+ return 0
+ local disklistFileAWS=/etc/amanda/openhab-aws/disklist
+ local disklistFileDir=/etc/amanda/openhab-dir/disklist
+ local 'introText=You are about to activate the zram feature.\nBe aware you do this at your own risk of data loss.\nPlease check out the "zram status" thread at https://community.openhab.org/t/zram-status/80996 before proceeding.'
+ local 'lowMemText=Your system has less than 1 GB of RAM. It is definitely NOT recommended to run zram (AND openHAB) on your box. If you proceed now you will do so at your own risk!'
+ local zramInstallLocation=/opt/zram
+ [[ uninstall == \i\n\s\t\a\l\l ]]
+ [[ uninstall == \u\n\i\n\s\t\a\l\l ]]
++ timestamp
++ date +%F_%T_%Z
+ echo -n '2021-02-05_09:42:27_MST [openHABian] Removing zram service... '
2021-02-05_09:42:27_MST [openHABian] Removing zram service... + cond_redirect zram-config stop
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ zram-config stop \033[39;49;00m'

$ zram-config stop
+ zram-config stop
/opt/openhabian/functions/helpers.bash: line 31: zram-config: command not found
+ return 127
+ echo 'FAILED (stop zram)'
FAILED (stop zram)
+ return 1
+ '[' 1 -ne 0 ']'
+ whiptail --msgbox 'There was an error or interruption during the execution of:\n  "30 | System Settings"\n\nPlease try again. If the error persists, please read /opt/openhabian/docs/openhabian-DEBUG.md or https://github.com/openhab/openhabian/blob/main/docs/openhabian-DEBUG.md how to proceed.' 14 80
+ return 0
+ true
+ show_main_menu
+ local choice
+ local version

So it seems like I’m stuck in a loop. The upgrade fails trying to set a dependency for something I’m not using, and I can neither install nor remove the related item.

I’m not sure what to try next and appreciate any suggestions.

Thanks,

George

I found this post Error uninstalling ZRAM - #2 by lwolfs that explains how to manually remove ZRAM. Of the files to be removed, the only one I found on my Pi is /etc/ztab:


# swap  alg     mem_limit       disk_size       swap_priority   page-cluster    swappiness
swap    lz4     200M            600M            75              0               90

# dir   alg     mem_limit       disk_size       target_dir                      bind_dir
dir     lz4     150M            500M            /var/lib/openhab2/persistence   /persistence.bind
# do not enable as long as you make substantial config changes
#dir    lz4     30M             100M            /var/lib/openhab2/jsondb        /jsondb.bind

# log   alg     mem_limit       disk_size       target_dir                      bind_dir                oldlog_dir
log     lzo     150M            500M            /var/log                        /log.bind

I’m thinking I might try deleting this file (or renaming it) and seeing what happens.