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

is that why ?

i uncommented the grub LUKS entry, and rebooting produce the same (unable to find the snapshot) but forcing the boot on the 4 choice of my bios, HDD: WDC grub decrypted the drive, showed GRUB menu, and i could boot (not sure if uncommenting changed anything, but i’m pretty sure i tried that entry before… but… well… am i?)

It still looks like when i first came back from restoring the first snapshot, all my last installed software are gone, but my last files are there. Which make me wonder if the snapshots worked at all ?

I am afraid to shutdown the computer now ^^
What shall i attempt to tidy up my mess:

  • am i able to restore a better snapshot than this one (does it exist)?
  • how to make sure /boot /boot/efi … is at the right spot and well “provisioned” (rebuild initrams?)
  • are mountpoints missing?
  • …well, being my level of (in)competence shall i backup and clean install (*@$!!!)
$ cat /proc/cmdline
BOOT_IMAGE=/@/boot/vmlinuz-linux root=UUID=84f7e9e8-2e40-4ad1-a9dd-616306520173 rw rootflags=subvol=@ quiet cryptdevice=UUID=709702e8-da92-4d9b-8d93-287f311a5a05:luks-709702e8-da92-4d9b-8d93-287f311a5a05 root=/dev/mapper/luks-709702e8-da92-4d9b-8d93-287f311a5a05 loglevel=3 resume_offset=1754961 nowatchdog
ls /boot
efi   initramfs-linux-fallback.img  intel-ucode.img    vmlinuz-linux
grub  initramfs-linux.img           refind_linux.conf
$ sudo ls /boot/efi/efi
boot  EndeavourOS  refind  tools
$ lsblk -l
NAME                            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
sda                               8:0    0 465,8G  0 disk  
sda1                              8:1    0   499M  0 part  
sda2                              8:2    0   100M  0 part  
sda3                              8:3    0    16M  0 part  
sda4                              8:4    0  88,2G  0 part  
sda5                              8:5    0   512M  0 part  /boot/efi
sda6                              8:6    0 376,5G  0 part  
luks-709702e8-da92-4d9b-8d93-287f311a5a05
                                254:0    0 376,5G  0 crypt /run/timeshift/backup
                                                           /var/cache/pacman/pkg
                                                           /home
                                                           /swap
                                                           /
$ df -k
Sys. de fichiers blocs de 1K   Utilisé Disponible Uti% Monté sur
dev                  8144672         0    8144672   0% /dev
run                  8155196      1540    8153656   1% /run
/dev/dm-0          394737668 145248112  249344608  37% /
tmpfs                8155196         0    8155196   0% /dev/shm
/dev/dm-0          394737668 145248112  249344608  37% /swap
/dev/dm-0          394737668 145248112  249344608  37% /home
/dev/dm-0          394737668 145248112  249344608  37% /var/cache/pacman/pkg
tmpfs                8155196      7632    8147564   1% /tmp
/dev/sda5             523248      2088     521160   1% /boot/efi
tmpfs                1631036        72    1630964   1% /run/user/1000
/dev/dm-0          394737668 145248112  249344608  37% /run/timeshift/backup

I’m not much help here on Btrfs setup. The output of lsblk -l looks correct me. So you have dual boot Windows 10 with EndeavourOS on the same drive sda. Which partition is windows installed on? sda4? and sda1, sda2, and sda 3 are Windows partitions. Correct? I’m assuming linux is on sda6 with /boot/efi sda5.

So does the rEFInd screen come up now with the Icons?

1 Like

i dunno i’m afraid to reboot lol

yes it is windows (don’t even know why i bothered…) on sda1,2,3,4 sda4 being the main.
sda5 and sda6 are linux

i am confused, shall /boot/efi be on sda5 or with windows one on sda2 ?

$ sudo fdisk -l
[sudo] Mot de passe de lmm : 
Disque /dev/sda : 465,76 GiB, 500107862016 octets, 976773168 secteurs
Modèle de disque : WDC  WDS500G2B0B
Unités : secteur de 1 × 512 = 512 octets
Taille de secteur (logique / physique) : 512 octets / 512 octets
taille d'E/S (minimale / optimale) : 512 octets / 512 octets
Type d'étiquette de disque : gpt
Identifiant de disque : 0AF75A10-2A9A-4A3A-A168-D40F7FCD9E75

Périphérique     Début       Fin  Secteurs Taille Type
/dev/sda1         2048   1023999   1021952   499M Environnement de récupération Windows
/dev/sda2      1024000   1228799    204800   100M Système EFI
/dev/sda3      1228800   1261567     32768    16M Réservé Microsoft
/dev/sda4      1261568 186245119 184983552  88,2G Données de base Microsoft
/dev/sda5    186245120 187293695   1048576   512M Système EFI
/dev/sda6    187293696 976773134 789479439 376,5G Système de fichiers Linux


Disque /dev/mapper/luks-709702e8-da92-4d9b-8d93-287f311a5a05 : 376,45 GiB, 404211375616 octets, 789475343 secteurs
Unités : secteur de 1 × 512 = 512 octets
Taille de secteur (logique / physique) : 512 octets / 512 octets
taille d'E/S (minimale / optimale) : 512 octets / 512 octets

before i messed up that was showing a timeshift/snapshot kind of like in here, which is kind of why i started to bother messing around.
And did i then incorrectly mount /boot/efi, inverting sda2 and sda5, did i then install kernel files where i shouldn’t have, running mkinitcpio when i shouldn’t have ? Kind of followed that but might have messed up even more (DID actually)

I would think it would be sda5 the original windows efi is sda2. I have mine install on a separate ssd and my windows is on an m.2 drive. But the /boot/efi is also on the ssd.

Edit When you install Linux on dual boot you can use the windows efi but i just let it create it’s own on linux. Windows efi is too small in my opinion at 100 mb.

1 Like

let’s see… (i’m just sad timeshift delete (or does it) snapshots and creates new ones each time i reboot, making it less and less probable to restore a good image if i mess up more (does such an image exist to begin with…)

I think (again… ^^) that i pointed it to sda2 when i first installed… but hey… or not…

Well i don’t know what you did?

Edit: You’ll have to reboot it at some point.

1 Like

…maybe more than i do :upside_down_face:

[quote=“ricklinux, post:68, topic:15977”]
Edit: You’ll have to reboot it at some point.

Edit2:

yoda-quotes-on-failure

reboot i shall !

Sorry … I think i just edited your post. Didn’t mean to do that. :grimacing:

1 Like

…well, anytime ! nice edit ^^
if only i would learn anything !

so rebooted produce the same behavior, see here

the 4th entry on the bios boot menu is then the only one that leads to grub menu once entered the passphrase… (was it “working” the whole time or uncommenting #GRUB_ENABLE_CRYPTODISK=y did change something…?

At that point i wonder if i should bother try restoring that hypothetical better snapshop (how does it come that the one we just restored leads to missing programs and updates, it look like one from way earlier),
if i should just try repairing my boot mess (btw, rebooting just now took and incommensurate long time), (would reinstall refind do the trick…?)

i’ll have to sleep on it i guess
thanks so much @ricklinux and @dalto for so much of your time and efforts btw, i can’t express my gratitude enough

I wish i could be more help but @dalto has the knowledge on this. The only good part about it all is even if you don’t end up fixing it which you still could you’ll have learned more doing what you’ve done to get there.

1 Like

which is very true. Maybe, at that pace, in 10 years i’ll be able to help someone copy and paste a file from the cli :stuck_out_tongue:
i will rtfm again and more…

when i’ grow up i’ll be like @2000

I’m already grown up and I wanted to be like Linus but I’m not ever going to be! :sob:

1 Like

So how do you change it to sda2 then now? On my set up i have Linux on a separate SSD with /boot/efi. I also have a 4 TB hard drive not being used currently and my Windows is on the nvme drive.

[ricklinux@eos-xfce ~]$ lsblk -l
NAME                                      MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
sda                                         8:0    0 465.8G  0 disk  
sda1                                        8:1    0   512M  0 part  /boot/efi
sda2                                        8:2    0 465.3G  0 part  
sdb                                         8:16   0   3.6T  0 disk  
sdb1                                        8:17   0   3.6T  0 part  
sr0                                        11:0    1  1024M  0 rom   
luks-a209e59c-bdbd-43ec-a367-17786b03066c 254:0    0 465.3G  0 crypt /var/cache/pacman/pkg
                                                                     /home
                                                                     /swap
                                                                     /
nvme0n1                                   259:0    0 447.1G  0 disk  
nvme0n1p1                                 259:1    0   529M  0 part  
nvme0n1p2                                 259:2    0   100M  0 part  
nvme0n1p3                                 259:3    0    16M  0 part  
nvme0n1p4                                 259:4    0 446.5G  0 part  
[ricklinux@eos-xfce ~]$ 
1 Like

and your bootloaders are happy with it?

i wish i knew ^^

So, yes i went back to the Arch wiki here, as well as this (very nice) tutorial, and, indeed, i did mount sda2 (from the windows install) to /boot/efi when i first install (well… i didn’t do nothing actually, i flagged it in gparted and/or calamares i suppose)

So, my bootloaders are still messed up (grub and/or refind), and i don’t understand timeshift. When i “restored” the last knew “good” image, it then vanishes it from the choices, so i “burned” two of those images in the process before i came here begging for help, and then we restored the third “good” one (which clearly isn’t from the date it says it is… why…), and it wasn’t in the choices anymore when i finally succeed to boot it (that i guess is normal behavior), and now that i rebooted (remember i was afraid), all the previous images (auto, manual, all) are gone and some newly created images are there (auto i guess then, one marked "Before restoring ‘2021-07-2019’). That is very unfortunate as i did manually take a snapshot 2 days ago after having done a lot of “work” (and again, the one we restored is suppose to be “after” that point, but clearly it is not). Was timeshift messed up the whole time ? Will it function as it supposed to now ? I wish I knew too…

I dunno where I should start…

Edit: are we agreed that my wonderful snapshots from the past are now forever gone ? they couldn’t have duplicate and hide themself somewhere? mooooahahah… (which is exactly what, even if i end up trusting timeshift and autosnap, I should do on a regular basis… duplicate and hide… you ain’t go no data if you ain’t got no backup, indeed… have to get that hard drive, router and some cables i’m dreaming of, and make myself a sort of nas)

well, this option is only needed if the boot partition is encrypted… which is not the case… so…

I can help you with btrfs, grub and general linux topics but my knowledge of timeshift and btrfs-grub is limited because I have no use for such tools. Timeshift is easy to setup but it is far too limiting for my needs.

For me, personally, there is no value in the ability to boot into btrfs snapshots and it take two simple commands to roll a snapshot back manually so the idea of needing a program to do that it pretty alien.

That being said, everyone is different. I value control over ease of setup/automation but that is not true for everyone.

In this case, the “boot partition” refers to the partition where you initrams and kernels live, /boot. From reading the above, it does seem like that is encrypted.

1 Like

Is reinstalling an option? How about your personal data?

1 Like