Set up use of swap partition with systemd
I just installed Fedora 20ß. I have a swap partition, but I forgot to tell the installer that I want to use it. Fedora 20 booted without the swap, so I ran:
swapon -L SWAP-sda2
to get it started.
I want to have it used automatically every time I boot the system. The old way it to put a line into fstab; the new way is to do some stuff with systemd files.
Just tell me how to do it in plain English. Read the manual is not an answer. Eg., link this file here, or create a file with exactly these contents, or edit such and such a file with these new contents, or run these commands, etc.
man systemd.swap
?Somewhere in the manual, it also says that systemd will automatically create an fstab entry when none is present. This is partly true, in that an entry is created, but the entry that is created is false. The entry was: UUID=<alphanumericstring> swap. This is incomplete and when I rebooted, an error occurred: findmnt: fstab parse error line X. There was no swap after rebooting. I corrected the erroneous line by appending 'swap defaults 0 0' to the line in fstab and rebooted and now there is swap being used. But this does not answer my question: How can I get systemd to use swap automatically?