How to fix empty grub.cfg with luks encrypted drive

Hello everyone,

yesterday after updating packages and rebooting, I suddenly wasn’t able to boot into Manjaro like before.
I’m running Manjaro with KDE and encrypted my drive during the installation process.
When booting I still get the prompt to enter the passphrase for decrypting the drive.
After entering the passphrase I am presented with a grub shell.
From there I can see all my files on drive (crypto0), so decryption is working.
When booting a Manjaro live system from a USB and mounting my drive there, I noticed that /boot/grub/grub.cfg was empty.
I have access to a timeshift backup from the day before, where that config seems to contain the necessary configuration for grub.
I wasn’t able to just copy that file back, because I don’t have write permissions.
I would provide some images, but I am not yet able to post images or links.

Maybe someone more knowledgeable than I can tell me how to restore that config so I hopefully can Boot properly again. Thank you!

this looks like the update was interrupted … so boot into live usb of manjaro, chroot - since you are using encryption, look on how to chroot encrypted disk - then rerun update again:
pacman-mirrors --fasttrack 5 && pacman -Syyu

It wouldn’t hurt to rebuild the initramfs with mkinitcpio -P and update-grub afterwards to be on the safe side. (Depends on where the update was interrupted.)

Thanks for the fast suggestions.
Just after posting here I found this thread: forum.manjaro. org/t/solved-can-not-mount-partition-to-manjaro-chroot-from-live-usb/46119
(remove the whitespace before “org”)

After running

cryptsetup luksOpen /dev/nvme0n1p2 nvme0n1p2_crypt
mount /dev/mapper/nvme0n1p2_crypt /mnt
mount /dev/nvme0n1p1 /mnt/boot/efi
manjaro-chroot /mnt

in the newly opened shell I executed

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

Then exit the shell and unmount the partitions we mounted at the beginning

umount /mnt/boot/efi
umount /mnt

The grub.cfg was no longer empty and I was able to boot just like before .

Should I still rebuild initramfs and update-grub?

you updated grub with:

rerun the update again, just to be sure, if no errors and is up to date you can do again this:

if there are no errors here, you can exit chroot and reboot