[SOLVED] Swap file testing

EVERY time i reboot my system seems to think that it needs to check the partition i want to use as for a swap file giving the following message:

A start job is running for UUID=ac527...etc swap

After it has finished, 1min 30secs later, it then completes the boot but without a swap file.


I am uploading, hopefully, files to show:

the fstab entry for the drive i thought was my swap drive
i even tried setting the last two fields to “0 2” to see if i’d gone completely mad.
the output from inxi
(hopefully with privacy on but with still enough data for you to assist)
inxi output
the output from the “swapon --show” command

  • it’s was “null”

what gparted thinks of swap the partition
I tried switching swapon in gparted and it certainly worked
it paused while it did the necessary then showed it as “swapon” plus
the cli “swapon --show” said it was on too.
a quick reboot after the above gparted actions and the swap file was again off (according to “swapon --show”)


Why is it doing this check EVERY reboot?
Is a swap file not the default in EOS?
What’s the easiest way to “retain” a swap file through reboots

swap0724 swapon show output EOS 20220724

Are you trying to create a swap partition or a swapfile?

No info is to be seen in your post.

Please run the following commands and post the output. Copy-paste-highlight and press Ctrl-E to format.

sudo parted -l

lsblk -fs

cat /etc/fstab

Also, if you have tried to create a swapfile, please explain the steps you took.


Your post gives a somewhat explanation of the problem but there is no pertinent information such as logs, hardware information and related output from commands specific to the issue. It would be much more helpful to provide specific information related to the problem. You can post output from specific commands and or upload the logs and provide a link using the methods outlined here in the wiki.

It would be helpful to show the output of your fstab. Maybe your hardware info and partition info. All of this can be done following the wiki.


if you use swapfile then you should also change /etc/fstab as follows.

/swapfile none swap defaults 0 0


1 Like

Hi again @pebcak

Sorry i was distracted and pressed post before i’d uploaded the files.
They should be there now as per the orig post.

sudo parted -l
lsblk -fs

swap0724 parted output 20220724
swap0724 lsblk output 20220724

and the fstab entry for the swap partition should already be uploaded.

Yes, i want a swap partition (as per the entry in the uploaded fstab).

The steps…
I normally set a swap partition during the install and with prev distro’s it’s just been there. This time i was surprised to see it wasn’t there - today!

So after changing the “0 0” entries to “0 2” for the swap in fstab and rebooting (rem this all started with me trying to stop this check).
Then changing it back to “0 0” and rebooting again …it’s around here that i “noticed” that it wasn’t using the swap partition.
After looking at fstab, shouting at it and generally getting frustrated, i took this positive step, i started gparted, looked, pondered then i set “swapon”. Gparted presumably wiped the drive (maybe reformatted it even though the part was already formatted before the install as type “swap”) then it showed as “swapon”. Before i closed gparted i cli’d a quick “swapon --show” command and i showed as on at this point.

When i set the swap as on in gparted it must have reformatted the partition as the UUID is now different.

A far i i was concerned it was job done but i wanted to make sure that it would still be there after a reboot. I also wondered if it was still going to do the check.
So i rebooted and the swap file vanished - after again doing the check i didn’t want.

Sorry @ricklinux
my arthritic fingers were faster than my brain tonight - i clicked “post” before i’d uploaded the stuff i’d intended to…DUH.
I’ll have to read your link tomorrow …sorry.
However, hopefully there should be enough details already uploaded (rather belatedly) .

Hi again @pycrk.
The fstab entry you show is what i am using except the i am using the UUID=<…> instead of /swapfile.
Isn’t UUID preferred in fstab? I had seen some posts using /swapfile but i had assume that, as the UUID was recommended for fstab generally then /swapfile was probably the “old” way of doing it.
TBH i’ve used the UUID for swap since i first started using UUID - all for one and one for all ’ :wink:
Attached is my previous distro’s fstab entry:
swap0724 previous distro fstab swap entry 20220724

Also, with the greatest respect, the link you posted shows this:
swap0724 fstab link you posted 20220724

Which is exactly what is in my fstab.

That Einstein moment:

As i was typing i realised that gparted changed the UUID then switched the swapon.
HOWEVER, i did NOT change the UUID to the new one that gparted had just created before i rebooted.
Therefore, after the reboot, as fstab showed what is now a nonexistent UUID then the boot process would not have been able to use it as a swap drive.

Maybe i’ve sorted that part of the problem… to be tested!!!

However, there is still the question of why the boot process is performing a check EVERY reboot.

Make sure that the UUID of the swap partition in your /etc/fstab matches the actual UUID of the swap partition on your disk.

And please, post the output of the commands as text and not screenshots for it to be possible to copy and quote etc.

Also, post the whole output as it will be useful in many cases to get “the whole picture”.

Nobody would ask you to post info that in any case would compromise your privacy and security of your system.

$ swapon --show
/dev/sda4 partition  32G   0B   -2

That Einstein moment would seem to have worked…
I again switched on the swap in gparted.
Cheched that:
swapon --show
showed it was on after gparted was closed.
I then use:
lsblk -fs
to get the “new” UUID (that gparted had just allocated/made).
I updated fstab with that newly created by gparted UUID.
Then rebooted and as you can see above, the swap partition was on.


It did NOT run that check during the boot process either

  • that i really do not understand why unless it didn’t like seeing a drive not being used … ’ :slight_smile:

Thanks for everyone’s replies.

1 Like

this section of text does not apply to the swapfile. the wiki page is about swap, but only the swapfile section is relevant.

Note this!

Hi @pebcak
it did matches … until gparted changed it (yes, i should have rechecked)

sorry, i grabbed a screenshot as i thought it looked more, er, “kosher”
(in case someone thought i’d prob mistyped it cos i’m an old duffer)

ok, i though i was just being more security minded by only posting what was essential

I’m sure they wouldn’t…

Thanks again to everyone

1 Like

You could just highlight and copy the terminal output as text.

Then in your reply, paste it, highlight it and press Ctrl-E to format.

This has several benefits: it will be possible to copy, search, quote etc by the helpers. Also it will make it searchable by forum’s search function and other search engines thus anyone looking for similar issue would find it more easily.

:enos_flag: :wave:t5:

but i’ m not trying to setup a swapfile
I am setting up a swap partition.
I thought we had resolved that earlier in the thread, viz:

Sorry, i know i did said “swapfile” on one occasion in my first initial post and although i certainly should not have done that, i use the phrase “swap partition” on all (i think) other occasions.

You only explained after my comment that you want a swap partition. was not previously apparent. but hey, you solved the problem :+1:

I will certainly do that in future, thanks.
I really did think that you you prefer screenshots as they were “real”, viz:

$ lsblk -l
This is not really my block devices, i lied to:  pebcak
$ cat /etc/issue
EndeavourOS Linux \r (\l)
$ uname -a
Linux pebcak 5.18.14-marv-1 #z SMP PREEMPT_pebcak_DYNAMIC Sat, 23 Jul 2022 11:46:17 +0000 x86_64 GUN/Linux

Yes, i know i am. Although i am well meaning.

Thanks again to everyone.

Sorry pycrk,
I thought i did clarify immediately pebcak asked in post #2 (see my post #5)

no problem,

as the saying goes, too many cooks spoil the broth. my question was if you use swapfile… it wasn’t the case with you{than ignore the comment}. :wink:

Comment #4

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