My Armbian Bullseye system insists on setting up swap space on /dev/zram0. I don't want it to, as I have created a swap partition that I would prefer to use.
But I can't find how to permanently remove the swap space /dev/zram0. It can be removed temporarily with swapoff but returns on reboot. There is nothing relevant in /etc/fstab or anywhere else that I can find.
Installing zram-tools didn't help as the service failed.
Searching gives lots of pages that say something about swap or zram, but nothing appears to answer this apparently simple question! Any suggestions please?
Added following the answer below: The command
systemctl --type swap
after masking and reboot, shows:
dev-disk-by\x2duuid-1e389607\x2d8cdf\x2d4ce7\x2dacfb\x2dccb7426a336b.swap loaded active active /dev/disk/by-uuid/1e389607-8cdf-4ce7-acfb-ccb7426a336b
● dev-zram0.swap masked active active /dev/zram0
The first line is the swap partition. Unfortunately the zram swap has not gone according to swapon --show:
NAME TYPE SIZE USED PRIO
/dev/sda2 partition 2G 0B -2
/dev/zram0 partition 995.2M 0B 5
swapoff /dev/zram0
before the steps in my answer. Does zram0 still show up as swap?