I am trying to mount swap partition in etc/fstab
on Amazon Linux 2, but it doesn't work on the boot-up process.
here the steps I have followed:
- create swap file:
dd if=/dev/zero of=/swapfile bs=1024 count=1048576
- change permission to 600:
chmod 600 /swapfile
- setup swapfile:
mkswap /swapfile
- add swap to fstab:
UUID=90c0668b-6bca-4dd7-bdca-b62c19e2a911 none swap sw 0 0
- reboot
After reboot, nothing happened...
I have also tried to mount it with:
/swapfile none swap sw 0 0
but still not working.
Manually, using swapon
command it's working perfectly...