Alternate method of running swapon?
Valentin Vidić
vvidic at valentin-vidic.from.hr
Wed Jan 8 13:42:34 EST 2020
On Wed, Jan 08, 2020 at 01:33:21PM -0500, Jeffrey Walton wrote:
> I believe this is the relevant part from the Pastebin:
>
> readlink("/swapfile", 0x7ffefb4c0810, 4096) = -1 EINVAL (Invalid argument)
> stat("/swapfile", {st_mode=S_IFREG|0600, st_size=2147483648, ...}) = 0
> open("/swapfile", O_RDONLY) = 3
> read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
> 65536) = 65536
> close(3) = 0
> swapon("/swapfile", 0) = -1 EPERM (Operation not permitted)
Yes, the swapon call fails with this error. You can check the kernel
name with uname -a, but it probably runs a custom build and you can't
reboot with a different one to enable swap functionality.
--
Valentin
More information about the Kernelnewbies
mailing list