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

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
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

i’ll just have to rtfm and learn how to do that then.

i can’t agree more… i set it up like that for the (bad?) reason that it was (and still is) my very first time using btrfs file system and i followed @2000 guide, by laziness and lack of time… I realize i had done it from scratch it might actually have saved me some time in the long run as i would have known a bit more where i stood. (and i still don’t ^^)

when i first set it up (if i’m correct) it should have been sda2 > /boot/efi, sda5 > /boot, both unencrypted, and sda6 > / encrypted

Also, I might have rebuild the initrams in sda5 by mistake when i started to “investigate” the resume: no device specified for hibernation error… but i think it might even be a separate “problem” than the restoration of those snapshots that where pointing to different point in time than they should’ve (i dunno, again, the result of $ cat /proc/cmdline BOOT_IMAGE= was pointing to a snapshot before i started all this, kind of like that)

Most of my data looks fine, even the ones after the date of the snapshot we restored (which was one of the point of @2000 tutorial i guess). My last programs (thunderbird :’( ) are gone, and all the tweaks i did before messing up (i created one of my only manual snapshot at that occasion cause i was so happy with my perfect config… so long…)
Well, i think it is probably the best idea to reinstall, it would have save me (and you!!) some time i think. On the bright side, i do learn a lot and comprehend a little bit more as @ricklinux and yoda pointed out.

Wel… reinstalling the way might be…

I don’t think it is bad. Many people do it that way. It just isn’t my personal preference.

If you want to use an unencrypted /boot, I would recommend formatting it as ext4.

It is worth noting that it isn’t required to have an unencrypted /boot

1 Like

i should start a new topic if i reinstall, to see how to flag partitions in gparted and calamares (i.e. only one partition is supposed to be flagged boot if you read the manual, in gparted it is the case, and it even flag it esp at the same time.

But in calamares one can flag several partion with boot, if one use the existing windows efi partition (sda2 in my case) (mounted to /boot/efi) is it the one supposed to be flagged boot in calamares? or would it the /boot one (sda5 in this case)? or both?
What about ‘legacy_boot’ and ‘bls_boot’ flags? (in gparted)

Is all that relevant for grub or refind. I don’t recall how i flagged it (only how i mounted it) but that was working fine with grub and refind.

I maybe should install arch without the installer… at least i would have to set more bits myself (i.e. fstab, grub…) and comprehend more… or not !!!

is the only benefit not having to decrypt twice when you dual-boot w/ windows i.e. ?

If you are using UEFI than only your EFI partition needs to be flagged. Depending on what you are using to configure it, it should be flagged as esp and/or boot. No other partitions should need any flags and no other flags should be needed on the EFI partition.

It doesn’t matter which bootloader or boot manager you are using.

Why not try it in a VM first?

The benefits of an unencrypted /boot are:

  • Faster decryption
  • Ability to use alternate keyboard layouts for luks password
  • You can use plymouth to have an aesthetically pleasing decryption prompt
  • When you fail to enter your luks password properly you will get a better error message and the ability to try again

The benefits of an encrypted /boot are:

  • Slightly increased security since your initds will be encrypted

My personal opinion is that the benefits on either side are relatively small so it comes down to personal preference.

1 Like

Many thanks.

well, indeed…

Shall i just get rid of that separate /boot partition, just keeping the windows one to /boot/efi, and everything else encrypted in / ?
But then @ricklinux pointed out it might be too small (100MB) (and the Arch manual seems to point that the only way to make it bigger is to create it first and install windows AFTER linux, which ain’t my case)

Or am i just confused and creating the separate /boot doesn’t influence that fact?

EDIT: i guess i am

There is no right answer here. There are many ways to handle this but the way you are proposing is fine.

If you are using grub then it will probably fit in a 100MB efi partition with Windows.

The /boot partition is not your boot partition. It is the partition where /boot is stored. It is understandable that this would be confusing.

1 Like

many thanks again.

Do you know if refind seats in efi too?

Yes, on an EFI system refind installs components into the EFI partition(ESP).

I don’t know how big those are and if they would fit into a 100MB partition with windows and grub.

1 Like

i dunno i just installed it before and it worked (so w/ windows and grub)… so i guess it should

It was installed in your other, larger EFI partition last time.

You can tell that from this output:

1 Like

so was my /boot/efi in there the whole time or is it when i eventually messed up and mounted sda5 in /boot/efi the last time i chrooted… i’ll have to see how refind works :confused:

i’m trying to install on another machine (a real virtual one :p), i kind of follow this tuto (i did separate /boot unencryted though), pointed the alreday there windows efi to /boot/efi, and when i’m at point #08 i can’t

$ sudo mount /dev/nvme0n1p1 /mnt/chroot/boot/efi
mount: /mnt/chroot/boot/efi: mount point does not exist.

Which tutorial are you following?

1 Like

sorry just edited the link (spoiler… @2000 indeed ^^)

Shall i just

sudo mkdir /mnt/chroot/boot/efi

Edit: I guess… if so, @2000 should edit too :stuck_out_tongue:

That is your problem, if you change something, you can’t continue to cut & paste commands.

You first have to mount your /boot partition at /mnt/chroot/boot, then you can mount the efi partition.

1 Like