1

I have created swapfile at /swapfile and add following line to /etc/fstab (according to SwapFaq):

/swapfile                                 none            swap    sw  0  0

When I try to activate it with sudo swapon --all, everything is fine, but it does not activated after reboot, sudo swapon --show shows nothing. Again, activating it with sudo swapon --all works. What am I doing wrong? How to activate swap file on system start?

LLIax
  • 327
  • 1
    All looks right except for the failing auto-activation during startup. Double-check your fstab whether indeed you correctly entered that line in the correct file. – vanadium Apr 11 '21 at 10:35
  • Can you expand on how to do that? – salmmus May 24 '21 at 03:00
  • @salmmus Here: https://askubuntu.com/questions/126018/adding-a-new-swap-file-how-to-edit-fstab-to-enable-swap-after-reboot – klutt Jun 20 '22 at 06:43

0 Answers0