I have created a swapfile after installation by following a guide on Arch Wiki https://wiki.archlinux.org/title/Btrfs#Swap_file
It worked until I have restored a snapshot after a failed driver install and I get a error on each boot until I commented out the fstab entry
[FAILED] Failed to activate /swapfile
[DEPEND] Dependency failed for Swap
Here is the chain of commands I was following and the fstab entry:
Now the /swap directory is just empty and doesn’t have the swapfile
I just don’t know how to proceed further. Do I just create another swapfile? How do I prevent it from breaking again? Do I need to swapoff somehow, because it doesn’t let me if the file isn’t there
timeshift --restore then chose the one before I updated.
And just in case, before you ask, I have created swapfile like a month before this happened, so no, I didn’t restore before it’s creation
ID 256 gen 205022 top level 5 path timeshift-btrfs/snapshots/2023-11-03_01-42-15/@
ID 257 gen 205091 top level 5 path @home
ID 258 gen 205006 top level 5 path @cache
ID 259 gen 205091 top level 5 path @log
ID 260 gen 25 top level 256 path timeshift-btrfs/snapshots/2023-11-03_01-42-15/@/var/lib/portables
ID 261 gen 26 top level 256 path timeshift-btrfs/snapshots/2023-11-03_01-42-15/@/var/lib/machines
ID 262 gen 205022 top level 5 path timeshift-btrfs/snapshots/2023-08-07_20-37-55/@
ID 305 gen 205022 top level 256 path timeshift-btrfs/snapshots/2023-11-03_01-42-15/@/swap
ID 343 gen 205022 top level 5 path timeshift-btrfs/snapshots/2023-10-31_19-00-01/@
ID 344 gen 205022 top level 5 path timeshift-btrfs/snapshots/2023-11-01_19-00-02/@
ID 345 gen 205022 top level 5 path timeshift-btrfs/snapshots/2023-11-02_19-00-01/@
ID 346 gen 205022 top level 5 path timeshift-btrfs/snapshots/2023-11-03_01-56-56/@
ID 347 gen 205022 top level 5 path timeshift-btrfs/snapshots/2023-11-03_17-34-11/@
ID 348 gen 205022 top level 5 path timeshift-btrfs/snapshots/2023-11-03_17-20-54/@
ID 349 gen 205091 top level 5 path @
ID 350 gen 205022 top level 5 path timeshift-btrfs/snapshots/2023-11-03_17-44-39/@
This is the output.
Probably related to this, but the root folder in Dolphin “endeavouros” opens a weird folder with that contains @ @cache @home @log timeshift-btrfs Pretty sure it opened “/” before
Any way to restore a snapshot properly, or it’s already bad if created with timeshift?
If you want to use timeshift, you can move this to the root of the partition and then mount it in /etc/fstab. After that it should work fine going forward.
So do I just move timeshift-btrfs/snapshots/2023-11-03_01-42-15/@/swap to /run/timeshift/3830/backup? That’s where everything else is stored. How do I refer to it in fstab? seems weird
Edit: nvm, it only does that when timeshift is open
You need to mount the root of the btrfs partition. Then you can move it from there. You can mount the true root by passing -o subvolid=5 to the mount command.
In fstab, you should have several btrfs mounts already. Copy one of them and replace the subvol name with subvol=swap.
Perhaps it broken when you moved it? If you moved it across filesystems instead of within the filesystem you probably need to delete the swapfile and recreate it.