Swapiness and Grub Delay

ok I recently formatted and reinstalled EndeavourOS
I want to set my Grub boot delay to zero (it’s my only OS)
and I’d like to set/reduce Swappiness to 10

but I forgot how to do it

Searching on DuckDuckGo produced way too many search results, most pointing to a systemctl.d folder, and creating a file, but they each use a different name for the file and I got all flummoxed

Please help?

For changing grub timeout type sudo nano /etc/default/grub in a terminal and set GRUB_TIMEOUT=0 .
And generate grub config file with the command sudo grub-mkconfig -o /boot/grub/grub.cfg .

1 Like

Thank you, worked like a charm

now to get swappiness set (yay NVME)

1 Like

Setting up swap on an SSD is not recommended :man_shrugging: . So only use it if you really need it .

I thought swap file was always recommended, or am I misinformed ?

i JUST re-isntalled, moments before posting this, is there a way to get rid of the swap file without re-installign again?

Getting rid of swapfile is easy . I assume you created the file /swapfile for swap .

  1. Turn off swap with the command sudo swapoff /swapfile
  2. Remove the fstab entry for swapfile .
    sudo nano /etc/fstab . Comment the line /swapfile none swap sw 0 0
  3. Reboot and see if there is any delay in booting .
  4. Delete the file /swapfile ( sudo rm /swapfile ) .

If it’s a partition don’t delete it . Just disable the swap with first command , replacing /swapfile with swap partition and remove fstab entry .
I had troubles with deleting a swap partition previously .

Edit : swapon --show this command will show you which file is used as swap .

/dev/nvme0n1p3 partition 8.8G 5.8M   -2

ok disabled swap file/partition command was sucessfull
removed the Swap partition from fstab, now reboot ?

Yep . Deleting a swap partition delayed my boot time 90s because the system was searching for that swap partition . This happened even after I remove the line from fstab . So don’t delete a swap partition unless you really know how to .

ok no delay in boot time but
swapon --show
insists there is still a swap file

Entry is NOT listed in fstab

sudo swapoff /dev/nvme0n1p3

is the command I used

Whats the output of swapon --show now ?

[james@James-EOS ~]$ swapon --show
/dev/nvme0n1p3 partition 8.8G   0B   -2

I’m not that far along in restoring my backups and such it almost seems like it might be quicker/easier to just re-install at this point lol

We need some more experienced users here . Please help man @Kresimir @keybreak @jonathon .

That maybe true :grimacing: . In my experience YES

1 Like

ok I’ll just do that lol Thanks very much for helping though, at least i learned a bit in the process

1 Like

Maybe someone who knows this stuff comes here and we both get to learn something new :smiling_face_with_three_hearts:

I’m not sure, if that is a good idea. It should be fine as long as no problems occur. You might get in trouble if there are problems with the latest kernel and you need to boot with another kernel (e.g. kernel-lts). I recommend to set the timeout to at least 1.

Just my 2 cent.


fair point

Even if your timeout is set to 0, you can still hit Esc key while booting, and the grub menu will appear. :stuck_out_tongue_winking_eye:


A swap partition gets activated by systemd no matter if you have an entry for it in fstab or not. You need to delete your swap partition or disable systemd “process” which activates it.

You don’t need to.