The partition table scheme is GPT and UEFI with Secure Boot enabled is used instead of legacy BIOS.
Below is the partition layout of my hard disk drive:
536.9MB EFI system partition 511.7MB /boot (unencrypted) 100GB encrypted logical volumes (contains 99GB of / partition, 1GB of swap area.Debian Buster was installed on this partition) 16MB Microsoft reserved area (automatically created by Microsoft Windows' installer) 100GB Microsoft Windows 10
Debian Buster's 64bit installer (version 10.10) was used to create the EFI System Partition, the /boot partition and the encrypted logical volumes. Installation was successful and I was able to boot into the GRUB menu with a blue background. It had an entry named Debian GNU/Linux.
Next I installed Microsoft Windows 10 and the installation was successful.
I rebooted into Debian and used sudo os-prober to add the Microsoft Windows' entry to GRUB followed by sudo update-grub
Dual-boot of Debian and Windows was possible
Problem(s) happened after I did the following:
With a USB stick containing Debian Testing (Bullseye), I booted into the Debian's installer screen and deleted the 100GB encrypted logical volumes.
As a result 100GB of free space was made available. I configured it to have two encrypted logical volumes: 99GB of / partition, 1GB of swap area.
Debian Testing was installed on the 100GB partition. Installation was successful.
However, I am now unable to boot into the GRUB menu with the blue background. Instead all I have is a black screen with the word grub> _ (The underscore is actually the position of the cursor)
After reading some stuff on the internet, my understanding is that Grub's UEFI Stub is located in EFI System Partition (ESP) while its second stage modules are in the /boot partition. /boot also contains Grub's config file. It would appear that the bootloader in ESP was not updated to match the modules in the /boot partition or it could be that /boot/grub/grub.cfg was missing.
Below's my attempt:
A. I used Debian Bullseye's installer to boot up my machine and chose Rescue mode.
B. After inputting the encrypted passphrase, below were some relevant messages on the screen:
Enter a device you wish to use as your root file system. Device to use as root file system: /dev/perfect-vg/root /dev/perfect-vg/swap /dev/dm-1 /dev/dm-2 /dev/mapper/sda3_crypt /dev/sda1 /dev/sda2 etc, etc.... Assemble a RAID system Do not use a root file system
I highlighted /dev/sda1 and pressed Enter.
I was given four choices one of which was to Execute a shell in the installer environment. I highlighted it and pressed Enter.
There was a message on the screen stating that /dev/sda1 would be mounted as "/target", that the tools of the installer environment would be available for use and that I could use chroot to "chroot /target".
There was a small grey box at the bottom of the screen.
I tried the following options:
~# "chroot /target" /bin/sh: "chroot /target" not found ~# chroot /target chroot: can't execute "/bin/sh". No such file or directory ~# apt install --reinstall grub-efi /bin/sh: apt: not found
I am now stuck with the above and do not know how to proceed as my technical knowledge of Linux in general and Debian in particular is limited.
I thank you for your time and effort in helping me out.