Fstab: no swap but tmpfs

installed minimal plasma on a laptop
in calamares I selected manual partitioning ans created a swap partition

lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
nvme0n1     259:0    0 931,5G  0 disk 
├─nvme0n1p1 259:1    0   512M  0 part /boot/efi
├─nvme0n1p2 259:2    0 866,6G  0 part /
└─nvme0n1p3 259:3    0  15,6G  0 part [SWAP]

but in fstab it does not shows up, instead there is a tmpfs

# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=F5F4-70E6                            /boot/efi      vfat    umask=0077 0 2
UUID=74927008-117f-44f9-b107-ac1964bbd685 /              ext4    defaults,noatime 0 1
tmpfs                                     /tmp           tmpfs   defaults,noatime,mode=1777 0 0

is this intended? should I live fstab as it is or insert also the swap?

SWAP doesnt necessarilly need to be listed in fstab since systemd
(and neither does tmpfs)
But can be put there if you want to configure specific options.

systemd activates swap partitions based on two different mechanisms. Both are executables in /usr/lib/systemd/system-generators . The generators are run on start-up and create native systemd units for mounts. The first, systemd-fstab-generator , reads the fstab to generate units, including a unit for swap. The second, systemd-gpt-auto-generator inspects the root disk to generate units. It operates on GPT disks only, and can identify swap partitions by their type GUID, see systemd#GPT partition automounting for more information.

Mine is:

/swapfile               none            swap            defaults,pri=-2 0 0

(note of course it is a swapfile)

Years ago when I installed manjaro, I also chose manual partitioning, I had to add my swap partition myself.
This is an example of what mine looks like:

# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=Your existing partitions...
tmpfs                                     /tmp           tmpfs   defaults,noatime,mode=1777 0 0
UUID=yourUUIDforSWAPgoeshere none           swap    defaults 0 0

Be aware that an fstab entry is still needed for disks with DOS/MBR partition scheme.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.