You are not logged in.

#1 2024-04-04 13:40:59

pal_bjartan
Member
Registered: 2022-11-13
Posts: 9

[SOLVED] Unable to boot kernel 6.8: "Failed to mount /swap"

After attempting to  upgrade my system after the release of kernel 6.8, I am unable to boot my system, and the computer is put in recovery mode instead. I get the following message when booting:

[FAILED] Failed to mount /swap.
[DEPEND] Dependency failed for /swap/swapfile.
[DEPEND] Dependency failed for Swaps.
[DEPEND] Dependency failed for Local File Systems

I have never encountered this issue before. I tried booting into the updated Linux LTS kernel after running the system upgrade, and this kernel works without issues. Apparently, the issue lies with kernel 6.8. For some reason it fails to mount my swap subvolume on /swap, but I cannot see what exactly. Any idea what's causing the issue and how it can be be resolved?

System info (prior to upgrading):

~> swapon --show
NAME           TYPE  SIZE USED PRIO
/swap/swapfile file 62,5G   0B   -2



~> cat /etc/fstab
# Static information about the filesystems.
# See fstab(5) for details.

# <file system> <dir> <type> <options> <dump> <pass>
# /dev/mapper/root LABEL=root
UUID=ee34c9c4-7093-428d-9bd1-cc8475c262e4/         btrfs     rw,noatime,compress=zstd:3,ssd,discard=async,space_cache=v2,subvolid=256,subvol=/@0 1

# /dev/nvme0n1p1
UUID=0FF3-0946      /efi      vfat      rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro0 2

# /dev/mapper/root LABEL=root
UUID=ee34c9c4-7093-428d-9bd1-cc8475c262e4/home     btrfs     rw,noatime,compress=zstd:3,ssd,discard=async,space_cache=v2,subvolid=257,subvol=/@home0 2

# /dev/mapper/root LABEL=root
# UUID=ee34c9c4-7093-428d-9bd1-cc8475c262e4/.snapshotsbtrfs     rw,noatime,compress=zstd:3,ssd,discard=async,space_cache=v2,subvolid=259,subvol=/@snapshots0 2

# /dev/mapper/root LABEL=root
UUID=ee34c9c4-7093-428d-9bd1-cc8475c262e4/var/cache/pacman/pkgbtrfs     rw,noatime,compress=zstd:3,ssd,discard=async,space_cache=v2,subvolid=260,subvol=/@pkg0 2

# /dev/mapper/root LABEL=root
UUID=ee34c9c4-7093-428d-9bd1-cc8475c262e4/swap     btrfs     rw,noatime,nocompress,ssd,nodiscard,noautodefrag,space_cache=v2,subvolid=258,subvol=/@swap0 2

/swap/swapfile      none      swap      defaults  0 0



~> btrfs subvolume list -p /                                                                                                
ID 256 gen 204871 parent 5 top level 5 path @_backup_20232002155420814
ID 257 gen 1218825 parent 5 top level 5 path @home
ID 258 gen 1218732 parent 5 top level 5 path @swap
ID 260 gen 1218640 parent 5 top level 5 path @pkg
ID 261 gen 25 parent 22410 top level 22410 path var/lib/portables
ID 262 gen 26 parent 22410 top level 22410 path var/lib/machines
ID 267 gen 1218802 parent 22410 top level 22410 path .snapshots
(...)



OS: Arch Linux x86_64
Host: 82JY Legion 5 17ACH6H
CPU: AMD Ryzen 7 5800H with Radeon Graphics (16) @ 4.463GHz [40.7°C]
GPU: NVIDIA GeForce RTX 3070 Mobile / Max-Q
CPU Usage: 5%
Memory: 3.24GiB / 31.20GiB
Disk (/): 839G / 954G (89%)
Resolution: 3840x2160 @ 59.94Hz
Kernel: Linux 6.7.8-arch1-1
GPU Driver: NVIDIA 550.54.14
DE: GNOME 45.4

Last edited by pal_bjartan (2024-04-08 08:05:32)

Offline

#2 2024-04-04 15:02:12

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,287

Re: [SOLVED] Unable to boot kernel 6.8: "Failed to mount /swap"

Try to comment the swap partition and file in the fstab, then uncomment and mount the swap partition when the system is live.
It's likely one of the mount options and mount might tell you which.

Offline

#3 2024-04-04 21:11:24

pal_bjartan
Member
Registered: 2022-11-13
Posts: 9

Re: [SOLVED] Unable to boot kernel 6.8: "Failed to mount /swap"

seth wrote:

Try to comment the swap partition and file in the fstab, then uncomment and mount the swap partition when the system is live.
It's likely one of the mount options and mount might tell you which.

This did the trick! I was able to boot kernel 6.8.2 after commenting these lines.
Subsequently, I was able to mount the swap partition manually after removing the nocompress mount option.

It turns out, nocompress is no longer present in the list of BTRFS mount options in the Arch manual, implying it's no longer a valid mount option. Presumably, subvolumes are uncompressed unless otherwise specified in the mount options. (Still, I did add the nodatacow option instead, as this requires no compression. This is likely redundant, since No_CoW has been set previously on the swap subvolume.)

Last edited by pal_bjartan (2024-05-08 09:42:11)

Offline

#4 2024-04-04 21:32:26

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,287

Re: [SOLVED] Unable to boot kernel 6.8: "Failed to mount /swap"

\o/
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

Board footer

Powered by FluxBB