why I can't mount swap partition using kernel 4.15.0-32-generic #35~16.04.1-Ubuntu

Asked by Lucian Ion on 2018-08-15

using 4.15.0-30-generic #32~16.04.1-Ubuntu everything works fine
free:
              total used free shared buff/cache available
Mem: 1021900 235536 302604 15452 483760 618944
Swap: 1047548 0 1047548

dmesg:
[ 11.097508] Adding 1047548k swap on /dev/sda2. Priority:-2 extents:1 across:1047548k FS

fdisk -l /dev/sda
Disk /dev/sda: 64 GiB, 68719476736 bytes, 134217728 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x3b3af224

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 132120575 132118528 63G 83 Linux
/dev/sda2 132122624 134217727 2095104 1023M 82 Linux swap / Solaris

fstab:
# swap was on /dev/sda2 during installation
/dev/sda2 none swap sw 0 0

now when I boot using latest kernel 4.15.0-32-generic #35~16.04.1-Ubuntu
free:
              total used free shared buff/cache available
Mem: 1022492 235032 327000 15396 460460 620136
Swap: 0 0 0

swapon --all -v
swapon /dev/sda2
swapon: /dev/sda2: found swap signature: version 1d, page-size 4, same byte order
swapon: /dev/sda2: pagesize=4096, swapsize=1072693248, devsize=1072693248
swapon: /dev/sda2: swapon failed: Invalid argument

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu linux Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
2018-10-03
Last query:
2018-10-03
Last reply:
2018-08-24
Lucian Ion (lucianio) said : #1

Anyone else have this issue?
There is no swap in the latest kernel 16 4.15.0-33-generic #36~16.04.1-Ubuntu, for now I'm going back to last good known kernel 4.15.0-30-generic #32~16.04.1-Ubuntu

free
              total used free shared buff/cache available
Mem: 1021852 233328 366432 15412 422092 621644
Swap: 0 0 0

swapon --all -v
swapon /dev/sda2
swapon: /dev/sda2: found swap signature: version 1d, page-size 4, same byte order
swapon: /dev/sda2: pagesize=4096, swapsize=1072693248, devsize=1072693248
swapon: /dev/sda2: swapon failed: Invalid argument

Best Manfred Hampl (m-hampl) said : #2

It seems that this problem has already been reported as Bug #1788321

Lucian Ion (lucianio) said : #3

is back working in 4.15.0-36
Linux pcname 4.15.0-36-generic #39~16.04.1-Ubuntu SMP Tue Sep 25 09:00:45 UTC 2018 i686 i686 i686 GNU/Linux
$ free
              total used free shared buff/cache available
Mem: 1022124 244104 112896 14520 665124 594404
Swap: 1047548 4616 1042932

Lucian Ion (lucianio) said : #4

Thanks Manfred Hampl, that solved my question.