# \[solved\] Linux kernel 5.7 and swapfile problems

**URL:** <https://community.learnlinux.tv/t/solved-linux-kernel-5-7-and-swapfile-problems/55>\
**Category:** Arch Linux\
**Created:** [June 12, 2020, 11:17am UTC](https://community.learnlinux.tv/t/solved-linux-kernel-5-7-and-swapfile-problems/55 "2020-06-12T11:17:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rpol](https://community.learnlinux.tv/letter_avatar_proxy/v4/letter/r/ed8c4c/32.png) [@rpol](https://community.learnlinux.tv/u/rpol)\
**Post date:** [June 12, 2020, 11:17am UTC](https://community.learnlinux.tv/t/solved-linux-kernel-5-7-and-swapfile-problems/55/1 "2020-06-12T11:17:51Z")

</div>

Hi,

Since I originally installed Arch by following Jay’s guide at [1], I wanted to point out this problem I came across by upgrading to kernel 5.7, coming from 5.6.

```auto
Jun 12 10:03:22 osprey systemd[1]: Activating swap /swapfile...
Jun 12 10:03:22 osprey kernel: swapon: swapfile has holes
Jun 12 10:03:22 osprey systemd[1]: swapfile.swap: Swap process exited, code=exited, status=255/EXCEPTION
Jun 12 10:03:22 osprey systemd[1]: swapfile.swap: Failed with result 'exit-code'.
Jun 12 10:03:22 osprey systemd[1]: Failed to activate swap /swapfile.

```

Until the bug in [2] gets patched, looks like `dd` is a better way of creating a swapfile than `fallocate`.

I solved this problem by following the advice in [3]. Some more info in [4].

Additionally, I would like to ask whether there is any difference in putting `defaults` in the mount options in fstab, as opposed to `sw` as suggested in Jay’s guide. I suppose different fs types, like swap, have different defaults than `rw,suid,dev,exec,auto,nouser,async` for other usual mount points.

Thanks,  
R

–  
[1] [https://wiki.learnlinux.tv/index.php/How\_to\_Install\_Arch\_Linux#Create\_swap\_file](https://wiki.learnlinux.tv/index.php/How_to_Install_Arch_Linux#Create_swap_file)  
[2] [https://bugs.archlinux.org/task/66921](https://bugs.archlinux.org/task/66921)  
[3] [https://wiki.archlinux.org/index.php/Swap#Manually](https://wiki.archlinux.org/index.php/Swap#Manually)  
[4] [https://manpages.courier-mta.org/htmlman8/swapon.8.html#swapon-8\_sect3](https://manpages.courier-mta.org/htmlman8/swapon.8.html#swapon-8_sect3)

---

<div class="post-metadata">

**Author:** ![jay](https://community.learnlinux.tv/user_avatar/community.learnlinux.tv/jay/32/649_2.png) [@jay](https://community.learnlinux.tv/u/jay)\
**Post date:** [June 25, 2020, 5:32am UTC](https://community.learnlinux.tv/t/solved-linux-kernel-5-7-and-swapfile-problems/55/2 "2020-06-25T05:32:21Z")

</div>

Yes, there is an actual problem with newer kernels and the method of swap used. This is the main challenge of creating tutorials for a rolling distro, something is always changing. I’m a bit behind on recording, but I intend on creating a video on this as soon as I possibly can. Sorry for the delay.
