Actually it's my issue for not checking the boot logs, the scripts setup the zram.service. Whether Raspberry OS uses zram is not related to our images, as we use Debian.....as of course you know.
The zram.service is part of the image builder, I've modified the process so the service shouldn't be enabled and later on install systemd-zram-generator and create a config that will use 1GB on a 4GB system, this can be modified if required.
Code:
cnc@raspberrypi:~$ dpkg --list | grep "zram"
ii systemd-zram-generator 1.1.2-2+b2 arm64 Systemd unit generator for zram devices
ii zram-tools 0.3.3.1-1.1 all utilities for working with zram
As you can see zram tools are installed, this is whether or not systemd-zram-tools are installed.
The issue is because Bookworm uses systemd the package systemd-zram-generator is required, this is the missing piece of the puzzle. During the build the a different script is used to zram0 which fails.
As you can see from below zram0 is used for swap.
Code:
cnc@raspberrypi:~$ sudo swapon
NAME TYPE SIZE USED PRIO
/dev/zram0 partition 1010M 0B 100
Without the mods I've describe above there is no swap. Whether it's need or not, but on a typical debian x86_64 install usually a 1GB swap partition is created.
As you can see it really doesn't affect the total free memory when it's not in use.
Code:
free -h
total used free shared buff/cache available
Mem: 3.9Gi 474Mi 2.5Gi 17Mi 1.1Gi 3.5Gi
Swap: 1.0Gi 0B 1.0Gi
And BTW it not caching memory nor mamory glands, but is creating a swap partition that is compressed in memory.
The simplest option is just to mark zram.service as masked and have no swap.
So at the moment I'm building an image with the mods.....and make sure I've done it right.
Rob