Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: [SOLVED] Swapfiles not automounting (Read 1339 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[SOLVED] Swapfiles not automounting

As I've said in another topic, I've migrated to 66 from runit. I had a setup consisting of a /dev/zram0 and a swapfile.

With these config files, I had zram and the swapfile working on boot:

Code: [Select]
# /etc/modules-load.d/zram.conf
zram
# /etc/udev/rules.d/99-zram.rules
KERNEL=="zram0", ATTR{disksize}="3G" RUN="/usr/bin/mkswap /dev/zram0", TAG+="systemd"
# relevant lines in /etc/fstab
/dev/zram0 none swap defaults,pri=0 0 0
/swapfile none swap defaults,pri=0 0 0

After the suite66 migration, though, the zram module isn't loaded automatically, and the swapfiles seem to be ignored. I have to type this in a root shell:

Code: [Select]
modprobe zram && swapon /dev/zram0 -p 20 && swapon /swapfile -p 0

Output of mount -av:
Code: [Select]
/                        : ignored
/home                    : already mounted
none                     : ignored
none                     : ignored
/tmp                     : already mounted

Re: Swapfiles not automounting

Reply #1
I figured out the "zram not automatically loading" part. The /etc/66/script/modules.sh didn't like the fact that the file had no terminating newline. Still need to figure out why mount ignores my swaps.

Re: Swapfiles not automounting

Reply #2
What does your 66 config look like? /etc/66/service/boot@

Re: Swapfiles not automounting

Reply #3
https://paste.artixlinux.org/view/070ec392

Apparently there's a SWAP= key I missed when setting up 66-env. D'oh. Will try setting it to yes and checking the results.

EDIT:
Code: [Select]
66-env -t boot -e vim boot@system && 66-enable -F -t boot boot@system

and setting SWAP to !yes solved the problem. Should've read the config file more carefully.

Re: [SOLVED] Swapfiles not automounting

Reply #4
BTW I've updated suite66-scripts in testing and used s6's script for module-load, in hope to avoid a possible issue like you had.

 

Re: [SOLVED] Swapfiles not automounting

Reply #5
The new script in gremlins/suite66-scripts indeed fixes the problem (tested removing the trailing newline in zram.conf and rebooting). Thanks!

Re: [SOLVED] Swapfiles not automounting

Reply #6
The new script in gremlins/suite66-scripts indeed fixes the problem (tested removing the trailing newline in zram.conf and rebooting). Thanks!
Thanks for confirming

Re: [SOLVED] Swapfiles not automounting

Reply #7
@capezotte Take a look at zramen for zram configuration - it is very nice  ;)