I have just installed SolydX (Debian based) onto a laptop with the following specs:

-Toshiba Tecra A4 -800MHz Centrino CPU -nVidia 6600 GPU -512MB RAM

After installing Conky to monitor my system, I noticed that there is no Swap space showing. I made a 2GB Swap partition on install. I have checked the fstab file and all looks good (it was populated by the installer).

Most answers I've found so far use the swapon command, however when I try these commands, I get a 'command not found' error.

How can I get my system to use the Swap space?

Below is my fstab file

proc                                        /proc       proc    defaults    0   0
UUID=49f4751f-4ad9-4f3e-baa8-853d3d43153c   /           ext4    rw,errors=remount-ro    0   1 
UUID=b4e77f64-86d7-4a72-888d-fbbcc5d1045c   /home       ext4    rw,errors=remount-ro    0   0
UUID=3b3aec73-825f-4ec0-96c5-f9c79d599f9e   swap        swap    sw  0   0
  • 1
    Are you root when you call swapon? swapon is in /sbin, a path normally only added to root's environment. – phemmer May 11 '14 at 18:36
  • 1
    use blkid as root (sudo blkid) to check that the UUID of your swap partition is the same as the one in fstab. – Darkhogg May 11 '14 at 19:56
  • I do prefix with sudo every time. I have also checked the UUID and they match – Andrew Heath May 12 '14 at 20:41

You ought to have the swapon command.

You would need to be logged in as root to use it; if you are not, then you probably don't have /sbin in your path, so you're not finding it.

Did you try

sudo /sbin/swapon -a 

For the swap not to be used automatically, there's probably a real problem, but that should show you the error.

If you still get 'command not found', something's really wrong with your system—you could maybe try reinstalling the mount package.

  • Told APT to reinstall mount to see if that fixed it and got an error suggesting I run 'sudo dpkg --configure -a '. After running that, the 'swapon -a' command now gives an error "swapon: /dev/sda3: swapon failed: Invalid argument". 'swapon -s' shows no swap partition mounted. Using GParted, I selected to make a new UUID, then ran 'sudo /sbin/swapon -U 767cd69b-dc33-4d5d-8d7e-b278d78ba9c8' with the same "Invalid argument" error. – Andrew Heath May 13 '14 at 6:23
  • Just tried GParted's option to turn swap on and got the following "swapon: /dev/sda3: found swap signature: version 1, page-size 4, same byte order swapon: /dev/sda3: pagesize=4096, swapsize=2147573760, devsize=2147565568 swapon: /dev/sda3: last_page 0x80016000 is larger than actual size of swapspace swapon: /dev/sda3: swapon failed: Invalid argument" – Andrew Heath May 13 '14 at 6:29

Using GParted, I deleted the swap partition and made a new one. After selecting swapon, swap activated and Conky mirrors this in it's display.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.