I've got a swap partition, but the System Monitor in Linux Mint says, 'Swap not available'. I guess I've forgot to set 'Use as: swap' on install.
How to fix this?
I've got a swap partition, but the System Monitor in Linux Mint says, 'Swap not available'. I guess I've forgot to set 'Use as: swap' on install.
How to fix this?
You can simply add a line declaring your swap partition to /etc/fstab
. So, if your swap partition is /dev/sdaX
, add this entry in fstab
:
/dev/sdaX none swap sw 0 0
If your swap partition wasn't properly formatted as such, you can initialize it (make sure you put the right partition name for this command as you might easily destroy the contents of another partition):
sudo mkswap /dev/sdaX
To enable the newly declared swap partition, just use:
sudo swapon -a
(or reboot).
EDIT: if you have an encrypted swap partition, instead of /dev/sdaX
, you will have to use its name (/dev/mapper/something
), look in /etc/crypttab
, the name is on the first column.
/dev/mapper/cryptswap1 none swap sw 0 0
gparted
automatically edit fstab
?
I had a similar problem.
I used the "GUI way" posted by ansgri to change the format for the swap partition from unknown to linux-swap.This didn't solve the problem, but may have helped.
I found that the UUID shown in /etc/crypttab was incorrect.
I ran blkid to find the correct UUID for the swap partition.
Modifed /etc/crypttab to read the correct UUID.
and swap is now loaded correctly.
Hope that helps.
I did the GUI method as well but also changed the UUID in both /etc/crypttab and /etc/fstab to match the info displayed by blkid, i restarted and it worked, as a side note with my SWAP being at 36gb and my RAM being 32gb my hibernation button works now, since the SWAP is larger than the RAM.