openhab / openhabian

openHABian - empowering the smart home, for Raspberry Pi and Debian systems
https://community.openhab.org/t/13379
ISC License
822 stars 251 forks source link

ZRAM Installation failed (make overlayfs) #1894

Closed bks29b closed 1 month ago

bks29b commented 1 month ago

Issue information:

ZRAM installation is failing in a fresh openhabian setup. Both during first-boot and in manual installation via openhabian-config.

Debug information:

Use Raspberry Pi Imager for a new flashed image of openhabian. 64bit on RPI4 or 32bit on RPI doesn't matter. Branch OPENHAB or OPENHAB3 doesn't matter. During first-boot installation will fail:

2024-07-29_19:06:19_CEST [openHABian] Installing zram… FAILED

Full output with debugmode=maximum (relevant rows at the end):

whiptail --title ‘Install zram’ --yes-button Continue --no-button Cancel --yesno ‘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 [ZRAM status](https://community.openhab.org/t/zram-status/80996) before proceeding.’ 10 80
has_lowmem
local totalMemory
++ awk ‘/MemTotal/ {print $2}’ /proc/meminfo
totalMemory=3883064
[[ -z 3883064 ]]
[[ 3883064 -lt 900000 ]]
return 1
dpkg -s make
install_zram_code /opt/zram
local zramGit=[GitHub - ecdye/zram-config: A complete zram-config utility for swap, directories, and logs to reduce SD, NAND and eMMC block wear.](https://github.com/ecdye/zram-config)
++ timestamp
++ printf ‘%(%F_%T_%Z)T\n’ -1
echo -n '2024-07-30_21:31:18_CEST [openHABian] Installing zram code… ’
2024-07-30_21:31:18_CEST [openHABian] Installing zram code… + cond_redirect mkdir -p /opt/zram
[[ -n ‘’ ]]
echo -e ‘\n\033[90;01m$ mkdir -p /opt/zram \033[39;49;00m’
$ mkdir -p /opt/zram

mkdir -p /opt/zram
return 0
[[ -d /opt/zram/zram-config ]]
cond_redirect update_git_repo /opt/zram/zram-config openHAB
[[ -n ‘’ ]]
echo -e ‘\n\033[90;01m$ update_git_repo /opt/zram/zram-config openHAB \033[39;49;00m’
$ update_git_repo /opt/zram/zram-config openHAB

update_git_repo /opt/zram/zram-config openHAB
local branch
local path
branch=openHAB
path=/opt/zram/zram-config
++ timestamp
++ printf ‘%(%F_%T_%Z)T\n’ -1
++ basename /opt/zram/zram-config
echo -n '2024-07-30_21:31:18_CEST [openHABian] Updating zram-config, openHAB branch from git… ’
2024-07-30_21:31:18_CEST [openHABian] Updating zram-config, openHAB branch from git… + cond_redirect git -C /opt/zram/zram-config fetch origin
[[ -n ‘’ ]]
echo -e ‘\n\033[90;01m$ git -C /opt/zram/zram-config fetch origin \033[39;49;00m’
$ git -C /opt/zram/zram-config fetch origin

git -C /opt/zram/zram-config fetch origin
return 0
cond_redirect git -C /opt/zram/zram-config fetch --tags --force --prune
[[ -n ‘’ ]]
echo -e ‘\n\033[90;01m$ git -C /opt/zram/zram-config fetch --tags --force --prune \033[39;49;00m’
$ git -C /opt/zram/zram-config fetch --tags --force --prune

git -C /opt/zram/zram-config fetch --tags --force --prune
return 0
cond_redirect git -C /opt/zram/zram-config reset --hard origin/openHAB
[[ -n ‘’ ]]
echo -e ‘\n\033[90;01m$ git -C /opt/zram/zram-config reset --hard origin/openHAB \033[39;49;00m’
$ git -C /opt/zram/zram-config reset --hard origin/openHAB

git -C /opt/zram/zram-config reset --hard origin/openHAB
HEAD is now at 2347238 Add openHAB specific changes
return 0
cond_redirect git -C /opt/zram/zram-config clean --force -x -d
[[ -n ‘’ ]]
echo -e ‘\n\033[90;01m$ git -C /opt/zram/zram-config clean --force -x -d \033[39;49;00m’
$ git -C /opt/zram/zram-config clean --force -x -d

git -C /opt/zram/zram-config clean --force -x -d
return 0
cond_redirect git -C /opt/zram/zram-config checkout openHAB
[[ -n ‘’ ]]
echo -e ‘\n\033[90;01m$ git -C /opt/zram/zram-config checkout openHAB \033[39;49;00m’
$ git -C /opt/zram/zram-config checkout openHAB

git -C /opt/zram/zram-config checkout openHAB
Already on ‘openHAB’
Your branch is up to date with ‘origin/openHAB’.
return 0
echo OK
OK
return 0
echo OK
OK
++ timestamp
++ printf ‘%(%F_%T_%Z)T\n’ -1
echo -n '2024-07-30_21:31:19_CEST [openHABian] Setting up OverlayFS… ’
2024-07-30_21:31:19_CEST [openHABian] Setting up OverlayFS… + cond_redirect make --always-make --directory=/opt/zram/zram-config/overlayfs-tools
[[ -n ‘’ ]]
echo -e ‘\n\033[90;01m$ make --always-make --directory=/opt/zram/zram-config/overlayfs-tools \033[39;49;00m’
$ make --always-make --directory=/opt/zram/zram-config/overlayfs-tools

make --always-make --directory=/opt/zram/zram-config/overlayfs-tools
make: Entering directory ‘/opt/zram/zram-config/overlayfs-tools’
make: *** No targets specified and no makefile found. Stop.
make: Leaving directory ‘/opt/zram/zram-config/overlayfs-tools’
return 2
echo ‘FAILED (make overlayfs)’
FAILED (make overlayfs)
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 [openhabian/docs/openhabian-DEBUG.md at main · openhab/openhabian · GitHub](https://github.com/openhab/openhabian/blob/main/docs/openhabian-DEBUG.md) how to proceed.’ 14 80

System information:

OS: openhabian 64bit or openhabian 32bit HW: RPI4 or RPI3

cat /etc/os-release and uname -m.

openhabian@openhabian-2024:~ $ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

openhabian@openhabian-2024:~ $ uname -m
aarch64
ecdye commented 1 month ago

Yes, this is expected behavior. I'm working on a new image release that will resolve the issue.

This is due to upstream breaking changes that need a new release to solve. I'll try to get that published in the next day or two.

bks29b commented 1 month ago

Perfect, thanks! Would have been helpful to disable zram in openhabian.conf when it is obvious that it will fail. But anyways. When you need a test-client, let me know.

bks29b commented 1 month ago

Will I need to reinstall the system, once you published the new image release? Or can I update ? Just asking because I am scripting some OS stuff and could stop that when new installation is necessary…

ecdye commented 1 month ago

Probably a reinstall, however in theory, you should be able to just use the menu to install zram config now and I think it should work correctly. I'm so sorry I haven't released the image yet. This completely slipped my mind. I'll get on that today

ecdye commented 1 month ago

OK, try the latest release and let me know if that works

bks29b commented 1 month ago

Done. Works perfectly. Thanks for your work!

mstormi commented 3 weeks ago

@ecdye will someone with an existing OHian ZRAM installation get the latest overlayfs code (or at least working code?) when we does uninstall/reinstall via openhabian-config menu?