PINE64
PostmarketOS - Why swap file not on at boot? - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=111)
+--- Forum: Linux on Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=114)
+--- Thread: PostmarketOS - Why swap file not on at boot? (/showthread.php?tid=14190)



PostmarketOS - Why swap file not on at boot? - stozi - 06-13-2021

I followed the standard arch wiki way to set up a swapfile, and based on 'Install to disk' in the Alpine wiki, which shows setting up a swap partition the normal way, it should work. It does work if I manually turn the swap file on, but it isn't automatically on at boot. I don't know how PmOS works in that there were no other entries in my fstab, but I guess that has something to do with it. any ideas?


RE: PostmarketOS - Why swap file not on at boot? - user526 - 06-16-2021

cat /etc/local.d/zram0.start
#!/bin/sh
modprobe zram
echo 2G > /sys/block/zram0/disksize
mkswap /dev/zram0
swapon /dev/zram0 -p 100


my solution

i realize that isnt what you want but you can just as easilly sneak in a /etc/local.d/swap.start script that swapons's your swap or call mount -a which should source fstab and try to mount everything therein why pmos doesnt do that and other distros do i couldnt tell ya


RE: PostmarketOS - Why swap file not on at boot? - lusk - 06-22-2021

If I understand it right then installing zram-init and zram-init-openrc packages might be an option for most users. What do you guys think?


RE: PostmarketOS - Why swap file not on at boot? - craftyguy - 06-24-2021

(06-22-2021, 01:59 AM)lusk Wrote: If I understand it right then installing zram-init and zram-init-openrc packages might be an option for most users. What do you guys think?

I think that's reasonable, and potentially useful for other devices that pmOS supports.

https://gitlab.com/postmarketOS/pmaports/-/issues/1133