The solution worked for me is to install ubuntu trial version and use Boot-Repair out of the box.
To do so:
- Prepare an Ubuntu USB key
- Boot on this usb, go through the first steps of the Ubuntu's wizard, then select the "try mode"
- Open a terminal and run those commands to setup Boot-Repair:
- sudo add-apt-repository ppa:yannubuntu/boot-repair
- sudo apt install -y boot-repair && boot-repair
- Click on "Recommended repair" and simply wait :)
Reboot, and voila, Grub is back with your original Ubuntu !
Note: It doesn't matter if the bootable Ubuntu Usb key has the latest Ubuntu version and your broken Ubuntu version is older. It still works well. For example, my broken Ubuntu is on v22.xx.xx whereas the bootable Ubuntu USB key that I made is using 24.04.1