If you are sent to grub rescue, I assume you have only the one drive, then you can follow these steps;
Step 1. List the partition you have on the disk grub-rescue> ls
Step 2. The above command display some partition and from these partition find out which has /boot/grub, contains several files. For example;
grub-rescue> ls (hd0,msdos1)/boot/grub
hd0 is the harddrive number, msdos1 is the partition number. If you will find some files, it means this disk contains the grub file, else search in other partitions.
Step 3. set this partition grub-rescue> set prefix=(hd0,msdos1)/boot/grub
Step 4. Now insert module on kernel using insmod (install loadable kernel module) command. grub-rescue> insmod normal
Step 5. Restart the machine using normal command. grub-rescue> normal
Now after the machine boots in Linux update and install your grub Open a terminal and type below commands;
sudo update-grub
sudo grub-install /dev/sda
If none of this works, you may want to go with advanced options using a Live USB or CD.
In my case I was not getting grub at all. I was just getting the no OS found message. I had to use a live pen drive with LXLE 18.04.3 with persistency, which showed grub shell when 'c' key is pressed. And from there I followed your steps. The issue is now solved. Thank you very much
I forgot to mention that I first re-installed LXLE using the live pen drive. But I was still getting the no OS found message. Then I used the grub shell off the pen drive.