You are not logged in.
Dear All,
this is my first post, so please let me explain why I wanted to restore to an old kernel by timeshift and the research I have done so far:
The last kernel upgrade lead to Steam Games not starting with Proton anymore. I figured the fastest way to get it to work again was restoring to fix it fast so I wouldn't miss my game round with friends.
What I found out is that a restore can only be done if all snapshots are within the same kernel version. The reason for that is that the /boot and/or fstab is rewritten but upon restore is does not point to the correct kernel and/or /boot anymore.
While I tried fixing that manually, I had difficulties checking a few things like if fstab is correct or /boot is correct because I was not able to get terminal access. I launched the terminal from install medium but I found that I was unable to find the correct information without access to a PC (thats my only one).
So I just did a reinstall of Arch completely and setup after that was fast.
Now I cannot stop thinking about that. I believe there should be an easy fix for that problem but I tried researching it and did not really get a complete picture of what was happening there. It seems to be related to how BRTFS handles things, even though /boot and fstab are contained within the Snapshot. So a restore like this should work on ext4, right?
So I am currently thinking about reinstalling again to switch to ext4 to avoid these things in the future but I do not know if that works. I feel that it should but probably one of you guys knows better.
Please excuse me if these questions seem a little dumb.
Offline
ext4 doesn't have direct snapshots in the first place so no you wouldn't fix this by switching there.
How sure are you your /boot is actually btrfs and not the ESP which needs to be vfat? If that is the case, you need to manually and explicitly rerun mkinitcpio -P after restoring the snapshot (... assuming it can still mount the ESP) or install/downgrade the kernel to the intended version ahead of time.
In general knee jerk rollbacks like these are seldom fruitful. Chances are whatever made your games fail to launch wasn't even related to any updated component (proton prefixes tend to get wonky/corrupted for a variety of reasons)
Offline
No idea about Timeshift but I don't have a line for the root partition in /etc/fstab because otherwise I would have to modify that in the snapshot to point to the correct subvolume. If there's no root partition line in fstab then the options are set by the bootloader so only that needs to be changed to boot into the old snapshot.
Jin, Jîyan, Azadî
Offline
ext4 doesn't have direct snapshots in the first place so no you wouldn't fix this by switching there.
How sure are you your /boot is actually btrfs and not the ESP which needs to be vfat? If that is the case, you need to manually and explicitly rerun mkinitcpio -P after restoring the snapshot (... assuming it can still mount the ESP) or install/downgrade the kernel to the intended version ahead of time.
In general knee jerk rollbacks like these are seldom fruitful. Chances are whatever made your games fail to launch wasn't even related to any updated component (proton prefixes tend to get wonky/corrupted for a variety of reasons)
The fstab states that /boot is vfat:
# /dev/nvme0n1p1
UUID=A364-1E30 /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iochar>
Maybe thats the issue here, but I wonder because the Snapshot does include the /boot, so it should be restored right?
Anyhow, after the problem occured, I did not get terminal access anymore. So mkinitcpio -P wouldn't be an option in this case right?
Last edited by Ownanierer (2022-12-30 12:06:33)
Offline
By which logic are you inferring that /boot is included (note that /boot the "directory" will likely be "included", but since it's a mount point the underlying path on your root fs will simply be empty)? "Btrfs snapshots" in Timeshift mean just hat: Your BTRFS file system will be snapshotted and presented as restore points, everything else needs to be handled seperately, by i.e. making explicit backups of /boot to some other place via rsync or so and I somewhat doubt timeshift is intelligent enough to do this automatically/without more complex configuration that handles this special case properly.
As for restoring, since you will be in the situation that your kernel modules are logically outdated in relation to the initramfs contents, you'd have to boot into your "current" snapshot that doesn't have the issue, install the kernel version you are going to snapshot back to, and then run mkinitcpio -P so that the initramfs images are in sync with the kernel module snapshot you are going to end up on.
The "proper" way to avoid this raindance is to mount the ESP somewhere else like /efi or so, install the kernel files and initramfs into /boot (which will now be the same FS as your / and thus snapshottable) and then using a bootloader that can read btrfs snapshots and boot into them, like grub or refind (... and the optional helper utils grub-btrfs/refind-btrfs for example)
Even faster than that - assuming you are certain the kernel was at fault - would've been to simply downgrade the kernel without worrying about snapshots in the first place.
Last edited by V1del (2022-12-30 12:31:43)
Offline
By which logic are you inferring that /boot is included (note that /boot the "directory" will likely be "included", but since it's a mount point the underlying path on your root fs will simply be empty)? "Btrfs snapshots" in Timeshift mean just hat: Your BTRFS file system will be snapshotted and presented as restore points, everything else needs to be handled seperately, by i.e. making explicit backups of /boot to some other place via rsync or so and I somewhat doubt timeshift is intelligent enough to do this automatically/without more complex configuration that handles this special case properly.
As for restoring, since you will be in the situation that your kernel modules are logically outdated in relation to the initramfs contents, you'd have to boot into your "current" snapshot that doesn't have the issue, install the kernel version you are going to snapshot back to, and then run mkinitcpio -P so that the initramfs images are in sync with the kernel module snapshot you are going to end up on.
The "proper" way to avoid this raindance is to mount the ESP somewhere else like /efi or so, install the kernel files and initramfs into /boot (which will now be the same FS as your / and thus snapshottable) and then using a bootloader that can read btrfs snapshots and boot into them, like grub or refind (... and the optional helper utils grub-btrfs/refind-btrfs for example)
Even faster than that - assuming you are certain the kernel was at fault - would've been to simply downgrade the kernel without worrying about snapshots in the first place.
Thank you very much that was a good explanation. You are right, I assumed that since there is the /boot in the Snapshot that also the files were there. But they are not. Now all of that makes sense to me. Since I use systemd-boot btrfs /boot will not be an option (I know I can change the bootloader and I used grub before, but for now I want to keep it simple). I think I will go ahead and just keep track of when the kernel is upgraded and mark it in the snapshots.
Last edited by Ownanierer (2022-12-30 13:37:23)
Offline