I had set up zram which worked well previously. After the upgrade to zen kernel I realized that the module is not loaded. Trying to load it in a terminal results in:
FATAL: Module zram0 not found in directory /lib/modules/5.8.5-zen1-1-zen
Neither lsmod does list zram. Is it no longer included in Linux kernel? Does anyone knows what has happened?
On EndeavourOS and possibly Arch based distros, I have observed that when the kernel is updated /lib/modules/<previous-kernel-directory> is removed. So any attempt to load modules after that fails.
I hit this when I migrated on my work box from Ubuntu to EndeavourOS. FTR this doesn’t happen on Ubuntu, I guess they tidy-up on the next boot cycle.
I guess the lesson is reboot after the kernel is updated, and for me in particular - update the work box at the end of the work day.
What was surprising to me was that this happened after a reboot. I saw in htop that the swap was not there. That was the strange thing about it. Upon loading the module manually and rebooting again, it did work.
@pebcak oooh, that is surprising. As I said I have fallen foul of this before, and it appears that the problem went away after rebooting which is weird (at least to me). I don’t think manually loading the module in a prior iteration should have an effect. For that one should add the module to a file under /etc/modules.d for example I created /etc/modules.d/terraform with
Arch has one kernel package whereas Ubuntu has a package for every kernel version. When the Arch kernel package is upgraded the files are removed from disk so it’s not possible to load modules for the old but running kernel (because they’re not on disk any more). When an Ubuntu kernel package is installed the old and running version still has files on disk.
Yeah that makes sense, I forgot that Ubuntu doesn’t remove previously installed kernels and associated packages, one has to explicitly remove or IIRC use apt autoremove
Yes, that was a bit of oddity. I do reboot almos always after updates as a matter of course. After updates to kernels I always reboot. So I can’t explain what happened.
zram needs actually to be added like that but in /etc/modules-load.d.