I am unable to mount a swap partition

Terminal code:

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048     7831551     3914752   82  Linux swap / Solaris
root@chrubuntu:/home/user# swapon -v /dev/sdb1
swapon on /dev/sdb1
swapon: /dev/sdb1: found swap signature: version 1, page-size 4, same byte order
swapon: /dev/sdb1: pagesize=4096, swapsize=4008706048, devsize=4008706048
swapon: /dev/sdb1: swapon failed: Invalid argument

Can someone help?


Output of sudo blkid

/dev/sda1: UUID="63dbf7c2-877c-4a5e-8281-8be811c60056" TYPE="ext4" 
/dev/sda3: LABEL="ROOT-A" SEC_TYPE="ext2" TYPE="ext4" 
/dev/sda5: UUID="2678643c-7148-427e-99b9-3af143dedcf3" TYPE="ext4" 
/dev/sda7: UUID="38794eb2-bdc4-4f2a-97fd-0100fa5600a0" TYPE="ext4" 
/dev/sda8: LABEL="OEM" UUID="e39a733b-31fd-48df-8645-0e64e14d3f10" TYPE="ext4" 
/dev/sda12: SEC_TYPE="msdos" UUID="7B3E-EAE9" TYPE="vfat" 
/dev/sdb1: UUID="a4637af0-b82f-4247-ace4-c1621d2fdb7a" TYPE="swap" 

2 Answers 2



sudo mkswap /dev/sdb1

and then swapon.

  • Maybe check the partition first, is it really a swap partition? If it really is then just remake swap as falconer suggests.
    – edoceo
    Dec 9, 2015 at 6:48

On some system, disk based swap is turned off by default. In order to enable, run,

sudo sysctl vm.disk_based_swap=1

Now sudo swapon <SWAPFILE_PATH> should work as expected.

Ref.: https://groups.google.com/d/msg/kubernetes-users/uhl5R24EOlY/o2kQSz2fBwAJ

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .