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

Doesn’t he want to boot from rEFInd?

1 Like

hi @ricklinux !
i know you have (had?) the same install than me.
Thanks for participating :slight_smile:

I tried before to boot from all the options i had (not this time, so i will now) without success. (only windows can boot…)

cheers

1 Like

Try going back into the chroot and mounting /dev/sda2 as /mnt/boot/efi and re-running grub-mkconfig

1 Like

shall i not worry doing

grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=EndeavourOS
mkinitcpio -P

so

$ sudo cryptsetup luksOpen /dev/sda6 crypt &&
sudo mount -o compress=zstd,subvol=@ /dev/mapper/crypt /mnt
Enter passphrase for /dev/sda6: 
[liveuser@eos-2021.04.17 ~]$ sudo mount /dev/sda2 /mnt/boot/efi
[liveuser@eos-2021.04.17 ~]$ sudo arch-chroot /mnt
[root@archiso /]# grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found theme: /boot/grub/themes/EndeavourOS/theme.txt
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/intel-ucode.img /boot/initramfs-linux.img
Found fallback initrd image(s) in /boot:  intel-ucode.img initramfs-linux-fallback.img
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings ...
Detecting snapshots ...
Info: Separate boot partition not detected 
Found snapshot: 2021-07-20 05:12:16 | timeshift-btrfs/snapshots/2021-07-20_05-30-20/@
Found snapshot: 2021-07-20 04:37:37 | timeshift-btrfs/snapshots/2021-07-20_04-37-37/@
Found snapshot: 2021-07-20 04:22:48 | timeshift-btrfs/snapshots/2021-07-20_04-22-48/@
Found snapshot: 2021-07-19 20:23:42 | timeshift-btrfs/snapshots/2021-07-19_20-23-42/@
Found snapshot: 2021-07-19 20:04:49 | timeshift-btrfs/snapshots/2021-07-19_20-04-49/@
Found snapshot: 2021-07-19 20:01:44 | timeshift-btrfs/snapshots/2021-07-19_20-01-44/@
Found snapshot: 2021-07-19 17:50:27 | timeshift-btrfs/snapshots/2021-07-19_17-50-27/@
Found snapshot: 2021-07-18 14:00:02 | timeshift-btrfs/snapshots/2021-07-18_14-00-01/@
Found snapshot: 2021-07-11 13:46:43 | timeshift-btrfs/snapshots/2021-07-11_13-46-42/@
Found snapshot: 2021-07-11 13:18:36 | timeshift-btrfs/snapshots/2021-07-11_13-24-34/@
Found 10 snapshot(s)
done

i had 19 snapshots when i started :’(

let’s reboot…

The first line installs grub but grub seems to installed already.

The second line rebuilds your initrams. That may need to be done but let’s see what the exact error you are getting now is.

1 Like

so when i reboot it shows
IMG_20210720_192602_tigr
if i then go in the BIOS i can choose to boot on reFind, which has more entries than before,
one produce the same result (obviously) and the other one:
IMG_20210720_204322_tigr
that would be bios and reFIND entries
IMG_20210720_205507_tigr
IMG_20210720_204505_tigr
IMG_20210720_205532_tigr

Can you not boot into these entries on rEFInd?

1 Like

It looks like grub is booting a snapshot instead of your main OS. Is that how btrfs-grub works?

What are you choosing from the grub menu?

actually it start on a grub invite, without booting on refind, i have to change the boot in the bios to go thru refind (before all that it was booting directly on refind obviously)

their ain’t no grub menu
it start directly on the first picture (of the last post with pictures :p)

Can we see /etc/default/grub?

1 Like

What i"m asking is if you boot from the (WDC) which EndeavourOS is installed does the rEFInd menu come up? And did you try to boot into one of the entries Boot EFI\EndeavourOS\grubx.64?

1 Like

no no the menu doesn’t show up, i have to ask to boot to reFind Boot Manager manually, then it shows up, and yes i tried both the entries, one is delivering the same behavior and the other another, both without success ^^
see here

Follow what @dalto tells you as you need to deal with the btrfs setup. rEFInd is only a boot manager and launches grub from the icon. That part can be fixed easily by reinstalling rEFInd if necesary after you get the btrfs setup working so it boots into the system properly.

Edit: I have the Btrfs setup on mine with Luks and snapshots with timeshift also but I’m not an expert on Btrfs. I just use it as set up via the wiki.

1 Like
# cat /etc/default/grub
# GRUB boot loader configuration

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="EndeavourOS"
GRUB_CMDLINE_LINUX_DEFAULT="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"
GRUB_CMDLINE_LINUX=""

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable booting from LUKS encrypted devices
#GRUB_ENABLE_CRYPTODISK=y

# Set to 'countdown' or 'hidden' to change timeout behavior,
# press ESC key to display menu.
GRUB_TIMEOUT_STYLE=menu

# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console

# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=auto

# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep

# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper
# modes only.  Entries specified as foreground/background.
#GRUB_COLOR_NORMAL="light-blue/black"
#GRUB_COLOR_HIGHLIGHT="light-cyan/blue"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/path/to/wallpaper"
GRUB_THEME=/boot/grub/themes/EndeavourOS/theme.txt

# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"

# Uncomment to make GRUB remember the last selection. This requires
# setting 'GRUB_DEFAULT=saved' above.
#GRUB_SAVEDEFAULT="true"
GRUB_DISABLE_SUBMENU=y
GRUB_ENABLE_CRYPTODISK=y
# lsblk -o name,type,fstype,size,uuid
NAME      TYPE  FSTYPE        SIZE UUID
loop0     loop  squashfs      1.7G 
sda       disk              465.8G 
├─sda1    part  ntfs          499M A4AC25A5AC25734A
├─sda2    part  vfat          100M 1A26-42F7
├─sda3    part                 16M 
├─sda4    part               88.2G 
├─sda5    part  vfat          512M 99BB-CD47
└─sda6    part  crypto_LUKS 376.5G 709702e8-da92-4d9b-8d93-287f311a5a05
  └─crypt crypt btrfs       376.5G 84f7e9e8-2e40-4ad1-a9dd-616306520173
sdb       disk  iso9660       3.7G 2021-04-17-11-08-44-00
├─sdb1    part  iso9660       1.9G 2021-04-17-11-08-44-00
└─sdb2    part  vfat           68M 0749-E1B8

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