How-to: Create a swap file

It is possible to run UCS without a dedicated SWAP partition, but to use a SWAP file instead.

After the partitioning without a SWAP partition, do:

fallocate -l 4194304 /swapfile
chown root:root /swapfile
chmod 0600 /swapfile
mkswap -L SWAP /swapfile
swapon /swapfile
echo "/swapfile none swap defaults 0 0" >> /etc/fstab

to create a Swap file with a size of 4GB.

Remount with mount -a

https://wiki.archlinux.org/title/Swap#Swap_file

This topic was automatically closed after 24 hours. New replies are no longer allowed.

Mastodon