/etc/fstab to make sure of the swapfile path. And note that it’s generally not perfectly safe to remove a swap partition and reclaim its space (removing it is easy, moving/expanding the main partition to use the space is less so). Generally better to avoid the swap partition in the first place if you don’t want one.
swapon/swapoff is runtime, you don’t even need to do that to rename the file (unlike win in linux open files are not implicitly exclusively locked).
Swap in fstab makes sense for a partition (because it is static) or for manual swap addition (when you know what you did and why). For the sneaky system making it on your behalf it would make more sense to make it a systemd unit with pre-start action to inflate and mkswap the file.
Ew… Who doesn’t rip systemd out by the roots the moment the OS is installed (if not before)?
But yes, if swapon shows some file not listed in fstab, it might be getting initialized by your init system (zram is, for example).
@lperkins2 @ruff i would be interested to follow a discussion here on the Purism forums regarding systemd and why many start religious wars because of it. i don’t believe it’s EVER been discussed here but i would like to learn … maybe others too …
Please don’t. Discussions on the merits of systemd strictly follow Godwin’s Law and will lead to the end of constructive discussion in the thread. There are other fora to dwell on these toxic topics ;-).
i meant to discuss this in a new thread. who knows maybe the fact that we have this discussion here on the Purism forum instead of Reddit or elsewhere will have a positive impact …
New thread started. If @ruff is willing to delete and recreate his post there, I think we’d do well to delete all systemd posts from the fork on (or at least edit with strikethrough).
let’s hope it won’t be necessary to use a thick black marker …