The officially official Devuan Forum!

You are not logged in.

#1 2022-06-17 20:46:32

eisabase
Member
Registered: 2022-06-17
Posts: 2  

[SOLVED] Zram in 4.0 ?

I was looking up if zram was avaliable in 4.0. I found something that said it wasn't available in 4.0 but was in earlier versions, but I don't understand why. So far I found.

1. There is a zram kernel object present in the default system.
2. regardless of if udisk2s-zram is installed, modprobing zram never mounts a zram disk.
3. I noticed in the sysvinit script that is provided by debian wiki, the script calls for modinfo from kmod. modinfo seems to be called with /sbin/modinfo, or it could be copied to /bin/ to make it work normally. However, modinfo always outputs an ERROR saying it's missing firmware. I read somewhere that you should install linux-headers, but this did not change/fix the error. So I'm assuming this is a separate problem.

So regardless of the modinfo bit. Why can't we just have zram working on the current kernel? Is there something hugely different in 4.0?

Last edited by eisabase (2022-06-17 20:47:01)

Offline

#2 2022-06-17 21:27:26

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 2,379  

Re: [SOLVED] Zram in 4.0 ?

Works for me:

root@devuan:~# cat /etc/devuan_version 
daedalus/ceres
root@devuan:~# modprobe -v zram
insmod /lib/modules/5.18.0-1-amd64/kernel/mm/zsmalloc.ko 
insmod /lib/modules/5.18.0-1-amd64/kernel/drivers/block/zram/zram.ko 
root@devuan:~# file /dev/zram0
/dev/zram0: block special (253/0)
root@devuan:~# echo 1G>/sys/block/zram0/disksize 
root@devuan:~# mkswap /dev/zram0
Setting up swapspace version 1, size = 1024 MiB (1073737728 bytes)
no label, UUID=0b9792b3-e7ce-4b5e-84f7-2f4dc3247db2
root@devuan:~# swapon /dev/zram0
root@devuan:~# cat /proc/swaps
Filename            Type      Size      Used      Priority
/dev/zram0        partition   1048572      0      -2
root@devuan:~#

If you have errors post them here in full.

EDIT: zram-tools is installed but udisks2-zram is not.

EDIT2: and yes, it also works in chimaera. I tried it there first then brought the system up to daedalus to confirm the 5.18 kernel also works.

Last edited by Head_on_a_Stick (2022-06-17 21:42:40)


To obtain a root shell use su -. Using just su will result in "command not found" messages.

Offline

#3 2022-06-17 23:31:50

eisabase
Member
Registered: 2022-06-17
Posts: 2  

Re: [SOLVED] Zram in 4.0 ?

Alright I got it working. I could have sworn that I set the disksize originally, but I might have gotten confused about it. Not sure what I did wrong the first time honestly. Solved!

Offline

Board footer