#StackBounty: #linux #arch-linux #swap #arm #swap-file swapon failed: Invalid argument with ext4 swapfile and swap partition

Bounty: 50

I’ve tried enabling swap both on a swapfile (on ext4):

# file /mnt/usb/swapfile
/mnt/usb/swapfile: Linux/i386 swap file (new style), version 1 (4K pages), size 1023999 pages, no label, UUID=9dfaa27a-d72f-4dad-ac97-ffead7e29845
# swapon /mnt/usb/swapfile
swapon: /mnt/usb/swapfile: swapon failed: Invalid argument

and a swap partition:

# parted /dev/sda2 print
Model: Unknown (unknown)
Disk /dev/sda2: 2934MB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags:

Number  Start  End     Size    File system     Flags
 1      0.00B  2934MB  2934MB  linux-swap(v1)

# swapon /dev/sda2
swapon: /dev/sda2: swapon failed: Invalid argument

system info:

# uname -a
Linux alarm 3.10.18-24-ARCH #1 SMP Sun Sep 17 21:03:56 CEST 2017 armv7l GNU/Linux

and swapon version:

# swapon --version
swapon from util-linux 2.31.1

I don’t see anything relevant in the man page or online. Can anyone shine light on what the issue is?


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.