System not bootable after restore timeshift on btrfs

You use chroot.

Here’s an example of how I did it in a virtual machine. You have different names for the hard disks. Change your own names to the commands. And you probably have a different number of subvolumes, take all these into account. So those commands are not directly applicable to you.

  • Boot from EndeavourOS LiveISO

  • Open XFCE Terminal

  • Find your non bootable root: lsblk -f

  • Decrypt that disk: sudo cryptsetup open /dev/vda2 levy
    And enter that passphrase.

    Mount it:

  • sudo mount -o subvol=@ /dev/mapper/levy /mnt

  • List all subvolumes from /mnt sudo btrfs su li /mnt

Summary

ID 256 gen 87 top level 5 path timeshift-btrfs/snapshots/2022-02-17_09-42-54/@
ID 257 gen 110 top level 5 path @home
ID 258 gen 90 top level 5 path @cache
ID 259 gen 111 top level 5 path @log
ID 260 gen 29 top level 5 path @swap
ID 261 gen 27 top level 256 path timeshift-btrfs/snapshots/2022-02-17_09-42-54/@/var/lib/portables
ID 262 gen 28 top level 256 path timeshift-btrfs/snapshots/2022-02-17_09-42-54/@/var/lib/machines
ID 263 gen 52 top level 5 path timeshift-btrfs/snapshots/2022-02-17_08-35-24/@
ID 264 gen 85 top level 5 path timeshift-btrfs/snapshots/2022-02-17_08-37-42/@
ID 265 gen 121 top level 5 path @

  • Mount rest of subvolumes:
sudo mount -o subvol=@cache /dev/mapper/levy /mnt/cache  
sudo mount -o subvol=@log /dev/mapper/levy /mnt/log  
sudo mount -o subvol=@home /dev/mapper/levy /mnt/home  
sudo mount -o subvol=@swap /dev/mapper/levy /mnt/swap
sudo mount /dev/vda1 /mnt/boot
  
and so on...

Then chroot:

  • sudo arch-chroot /mnt

    Now you can example do this and that

  • journalctl -b -0

  • sudo timeshift --restore

When you are done:

  • exit

  • sudo umount -l /mnt

  • sudo poweroff (or sudo reboot)

1 Like