System won't boot after removing swap

I have this problem
i wanted to remove swap entirely so i followed those steps :

  1. using swapoff command.
  2. booted to gparted and removed the swap partition.
  3. commented the drive in fstab.

now the system won’t boot its stuck on :

a start job is running for /dev/disk/by-uuid/f98d2464-518e-45ba-bd4e-5e700edb5f02 (timer / no limit)

as its no limit it keeps counting for ever for a drive that doesn’t exist.

i assume thats because of systemd automount
as its said the priorty is for fstab first so i don’t know what is happening
i am still somewhat a newbie

what i tried :

  1. remove the entry from fstab
  2. using noauto in fstab entry for swap
  3. restore backup from timeshift

i have no idea how to stop automounting from a live cd and i don’t want to reinstall the entire system.

Appreciate any support for this issue :smiling_face:

Hello, and welcome to EnOS :enos_flag: community.

When you boot from liveiso, chroot into your system and then run

systemctl --type swap --all

That command should show all swap units on your system.

Then you can mask the problematic unit with

systemctl mask <problematic-unitname>.swap

as far as I know, the swap partition is also contained in the boot command, if you use systemd-boot it is in /etc/kernel/cmdline, if you use grub it is in /etc/default/grub
The relevant part would be resume=UUID

you can temporarily edit it directly in the screen where you select which kernel/OS to boot


when trying that’s what i get

I am using systemd, when i open the file that’s what i see

nvme_load=YES nowatchdog rw root=UUID=39d39afd-78d3-47d3-ba0c-3bdafd09795b resume=UUID=f98d2464-518e-45ba-bd4e-5e700edb5f02

do i just remove it ?

yes, but you can also press “e” when selecting the entry you want to boot in systemd-boot and remove resume=UUID=f98d2464-518e-45ba-bd4e-5e700edb5f02 to see if it makes a difference (if I remember correctly you can boot with either hitting Return or F10 from the edit menu). If it does, you can edit /etc/kernel/cmdline accordingly and run sudo reinstall-kernels to propagate the change.

1 Like

Thank you that did the trick :smiley:


Should have used arch-chroot instead of plain chroot there. That would bind mount /sys /proc and do some additional setup, exposing resolv.conf, etc.

Anyway, glad it’s fixed :slight_smile:

1 Like

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