Thursday, November 6, 2014

Mint swap partition problem

To the point, installed Mint but when I do free I can see that the swap partition has zero blocks free or available. All zero... Checking sudo swapon -s shows also no swap. And if I do sudo swapon -a I get a "/dev/mapper/cryptswap1: stat failed: No such file or directory".

This is what I did. First make sure you got a partition that you can apply swap. Easiest for me was to use gparted . The partition was there but it was not linux-swap. I right click on it and format to linux-swap.

Also, right clicking on it and checking information one could see it didn't have a UUID. Not sure if you need to reboot somewhere around here, but I did.

After the reboot I believe I should have been able to see the UUID with gparted but don't remember checking. I used blkid and there it was. Wrote down the UUID. More on seeing UUIDs here.

Now edit fstab: sudo subl fstab (in /etc). Find what the computer things is the UUID for the swap partition and enter the real one. Save. Also, edit /etc/crypttab. Delete the contents. Save and exit. Found those steps here.

Now you should be able to do sudo swapon -a and after that -s and see the swap partition. Somehow the computer had the wrong UUID for that partition.

By the way, now you can use cat /proc/sys/vm/swappiness to see how much of the RAM we would like to move to swap disk. 100 is all of it. Default is 60 but when I do free, I can see it all empty. Maybe I am not doing much now? Check SwapFAQ to see how to change it. Truth is that in my case, with Firefox, LibreOffice and Gimp opened, still I don't seem to need the swap (free shows zero usage).

Hope it helps!

No comments:

Post a Comment