I also tried with “sw” instead of “defaults”.
When I reboot I only get the standard Zram swap, if i run:
sudo swapon -a
I get the desired swapfile mounted as can be seen with:
sudo swapon -s
Filename Type Size Used Priority
/dev/zram0 partition 8388604 8386532 100
/var/mnt/NVME/swaps/swapfile.1 file 8388604 967728 -1
What do I need to change for it to actually mount on boot instead of I having to remember to call it when I see my computer starting to freeze from lack of RAM?
You have created a swap file on a secondary drive mounted on /mnt/NVME
This mount point has users specified, this option specifies noexec, nosuid, and nodev
I can’t confirm, but I’d guess that would be the issue
An automatic activation of the swapfile cannot contain users in the options.
That option tells the system that any user is allowed to use the device without needing to use sudo, but does not automatically activate it at boot time. Remove that option from the fstab and reboot (though I would optionally add the nofail option just in case there are problems with the auto-mount.)
I suspect the file system type for a swap file should be swap and not btrfs, though I do not use a btrfs swapfile so cannot be certain.
Thanks for the suggestions, I tried adjusting the fstab line for the NVME for:
UUID=01a86fb9-5bf2-4f6b-be83-83442792b873 /mnt/NVME btrfs defaults,exec,nofail 0 2
NVME is mounting as expected but the swap still not mounting on boot.
In respected to the suggested post on how to make a swap, I believe this:
I did try to have a subvolume first (/mnt/NVME/swap), but I was not been able to mount it to its own path(like /swap or /var/swap) and still had the problem of the swapfile itself not mounting if just pointed to its full path.
I still could not find a tutorial to follow that worked, but most of those assume you are going to create it at / or /swap, but I cant do that on Kinoite.
Edit:
My mistake, the first time I cteated a subvolume and a folder for it and tried to mount it, that did not work, but the linked thread from 2021 did work.