0

I have a 27.8G swap partition; though I have no swap space, I'd like to change that.

Here is the pertinent output from top.

KiB Swap:  0 total,  0 free,  0 used

I believe I may have turned it off with the swapoff --all. That being said the swapon --all exits with swapon: /dev/sda6: swapon failed: Invalid argument.

Here is the swap entry in my /etc/fstab

# swap was on /dev/sdb6 during installation
UUID=aa0cdc90-ef01-446b-a6a2-fac368d16aca none swap defaults 0 0

I affirmed the UUID of my partition with the one in /etc/fstab. Below is the output from blkid.

sudo blkid /dev/sda6
/dev/sda6: UUID="aa0cdc90-ef01-446b-a6a2-fac368d16aca" TYPE="swap" PARTUUID="6ddd3267-3895-40e5-9acc-56bfbc58039b"

My swap partiton is on /dev/sda6 not /dev/sdb6. I presume /dev/sdb6 was the bootable USB I used to install the system. This is a dual-booted, single-drive system.

Thanks in advance for your help.

2 Answers2

0

I think the swap space may have never been turned on since initialising the OS.

The problem was solved by running mkswap and then swapon on the partition.

-1

Have you ever changed it? Maybe you didn't set your swap. Personally, I recommend you use Gparted to edit your swap again.

You can install Gparted in your terminal or I have written an answer here - How to install Gparted(iso). After that, the swap won't show up because it is not active.

Type:

sudo gedit /etc/fstab

add:

/swap/swapfile  swap      swap    defaults   0       0

reboot, and see if it is all right:

cat /proc/swaps
Pang
  • 373