Skip Navigation

swap partition problems

Hello everybody! here's the problem: In my EndeavourOS laptop I had a /swapfile, but couldn't take snapshots with snapper because of it (if I understood correctly). So, I created a 16Gb swap partition using GParted from a live USB. Then, I edited /etc/fstab to remove the line about the swapfile and to add the newly created swap partition:

 undefined
    
UUID=506d48e6-1cc0-4136-ba55-6f2f187bcdb1   swap           swap    defaults   0 0
# /swapfile                                   none           swap    sw         0 0

  

I took the UUID from

 sh
    
$ sudo blkid  
/dev/nvme0n1p3: LABEL="swap" UUID="506d48e6-1cc0-4136-ba55-6f2f187bcdb1" TYPE="swap" PARTLABEL="SWAP" PARTUUID="b4543e4e-4623-4317-99aa-086b0e62836e"
...

  

if I run sudo swapon -a it gets enabled correctly and it all works fine. The problem however is that when I reboot the machine, it gets stuck in the systemd screen saying "a job is running for /dev/disk/etc..." forever, and the only way I have to log in is to boot from a live USB, modify /efi/loader/entries/somethingverylong.conf to add these kernel options:

 undefined
    
systemd.swap=0 noresume

  

and then reboot, and manually enable the swap.

I'm not understanding very well what's happening here. why is the system stuck if I don't add these parameters? how can I solve it?

thanks in advance!

5 comments