Can't chroot - can't repair grub - can't boot - messed up big time BTRFSonLUKS timeshift dual boot

it’s very unfortunate that the 2 ones from before that i somehow try to restore got vanished in the process cause they’d be the ones with the last ‘work in progress’ :frowning:

the one before seems screwed to (which is weird as i didn’t engage in anything at that time, which make me believe that they’ll all be like that?)

sudo umount /mnt
[liveuser@eos-2021.04.17 ~]$ sudo mount -o compress=zstd,subvol=timeshift-btrfs/snapshots/2021-07-19_21-00-01/@ /dev/mapper/crypt /mnt
[liveuser@eos-2021.04.17 ~]$ ls /mnt/boot
ls: cannot access '/mnt/boot': No such file or directory
[liveuser@eos-2021.04.17 ~]$ ls /mnt
bin  crypto_keyfile.bin  lib  lib64  mnt  opt  root  sbin  srv  swap  usr

…or not !

sudo umount /mnt
[liveuser@eos-2021.04.17 ~]$ sudo mount -o compress=zstd,subvol=timeshift-btrfs/snapshots/2021-07-19_20-23-42/@ /dev/mapper/crypt /mnt
[liveuser@eos-2021.04.17 ~]$ ls /mnt/boot
efi   initramfs-linux-fallback.img  intel-ucode.img    vmlinuz-linux
grub  initramfs-linux.img           refind_linux.conf
[liveuser@eos-2021.04.17 ~]$ ls /mnt
bin   crypto_keyfile.bin  etc   lib    mnt  proc  run   srv   sys  usr
boot  dev                 home  lib64  opt  root  sbin  swap  tmp  var

That one looks better.

I would restore that one.

1 Like

shall i install timeshift (and cronie) ?

do i have to do

grub-mkconfig -o /boot/grub/grub.cfg
mkinitcpio -p linux
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=EndeavourOS

afterwards ?

You could do it that way, but you could also just do it with btrfs directly. It is only a few commands.

Just a head up that I will be away for about 30 minutes while I eat lunch.

Probably not. But if you do, I think you should install grub before you generate the config:

grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=EndeavourOS
mkinitcpio -P
grub-mkconfig -o /boot/grub/grub.cfg
1 Like

well, i should probably go have diner ^^
bon appétit !

thanks so much btw

ok, so i did restore, but didn’t rebooted yet

i guess there will be a problem cause /boot/efi get restore to /dev/sda5 (if my understanding is correct), but i think it should be /dev/sda2 (or should it? it’s the windows one?)

Continue with restore? (y/n): y
Mounted '/dev/dm-0 (sda6)' (subvol=@) at '/run/timeshift/restore/'
Mounted '/dev/sda5' at '/run/timeshift/restore/boot/efi'
Mounted '/dev/dm-0 (sda6)' at '/run/timeshift/restore/home'
Mounted '/dev/dm-0 (sda6)' at '/run/timeshift/restore/swap'
Mounted '/dev/dm-0 (sda6)' at '/run/timeshift/restore/var/cache/pacman/pkg'
******************************************************************************
Backup Device: /dev/dm-0
******************************************************************************
******************************************************************************
Snapshot: 2021-07-19_20-23-42 ~ {timeshift-autosnap} {created before upgrade}
******************************************************************************
Creating pre-restore snapshot from system subvolumes...
Created directory: /run/timeshift/backup/timeshift-btrfs/snapshots/2021-07-20_17-17-37
Moved system subvolume to snapshot directory: @
Created control file: /run/timeshift/backup/timeshift-btrfs/snapshots/2021-07-20_17-17-37/info.json
Created pre-restore snapshot: 2021-07-20_17-17-37
------------------------------------------------------------------------------
Restored system subvolume: @
Restore completed
------------------------------------------------------------------------------

well… i guess i’ll reboot and see what happen… how can i recover that very snapshot that i just restored if anything goes wrong (did i understand well that timeshift “got rid” of it)?

IMG_20210720_192602_tigr
well, this is unfortunate

i guess the same happens first times i tried

It looks like you either redid your grub config or your initramfs with the snapshot mounted. That won’t work.

Go back into the chroot and mount @ again.

1 Like

i didn’t touch grub config or initramfs this time

Maybe timeshift did?

Boot back into the chroot, mount @ and lets takea look at /etc/fstab

1 Like
 Static information about the filesystems.
# See fstab(5) for details.

# <file system> <dir> <type> <options> <dump> <pass>

The contents :slight_smile:

cat /etc/fstab
1 Like

^^ i’m tired
it’s soooooooo empty :frowning:

Did you forget to arch-chroot?

That looks like the contents of the /etc/fstab on the ISO.

1 Like

i dunno how you put up with me…

# Static information about the filesystems.
# See fstab(5) for details.

# <file system> <dir> <type> <options> <dump> <pass>
[liveuser@eos-2021.04.17 ~]$ sudo arch-chroot /mnt
[root@archiso /]# cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=99BB-CD47                            /boot/efi      vfat    umask=0077 0 2
/dev/mapper/luks-709702e8-da92-4d9b-8d93-287f311a5a05 /              btrfs   subvol=@,defaults,noatime,space_cache,autodefrag,compress=zstd,compress=zstd 0 0
/dev/mapper/luks-709702e8-da92-4d9b-8d93-287f311a5a05 /home          btrfs   subvol=@home,defaults,noatime,space_cache,autodefrag,compress=zstd,compress=zstd 0 0
tmpfs                                     /tmp           tmpfs   defaults,noatime,mode=1777 0 0
/dev/mapper/luks-709702e8-da92-4d9b-8d93-287f311a5a05 /var/cache/pacman/pkg btrfs subvol=@var-cache-pacman-pkg,defaults,noatime,space_cache,autodefrag,compress=zstd,compress=zstd 0 0

/dev/mapper/luks-709702e8-da92-4d9b-8d93-287f311a5a05 /swap          btrfs   subvol=@swap,defaults,compress=no 0 0
/swap/swapfile none swap defaults 0 0

That all looks fine to me.

Mount your efi partition if you haven’t already and then run

grub-mkconfig -o /boot/grub/grub.cfg
1 Like

timeshift

Mounted '/dev/sda5' at '/run/timeshift/restore/boot/efi'

but i think mine is /dev/sda2
…or am i just wrong?

Can we see the output of lsblk -o name,type,fstype,size,uuid

1 Like

I think you had 2 fat32 partitions, sda2 and sda5.

1 Like