- First, grab an Ubuntu ISO burned in a CD/DVD or wrote on an USB pen drive. In plain English, take a bootable media containing the same version of Ubuntu that is installed on your system.
- Plug-in the bootable media and boot from it. You’ll be given two options, namely: try Ubuntu or install it. Choose to try Ubuntu.
- After boot into Ubuntu from the live media, open terminal. Execute the following command:
sudo fdisk -l
- You’ll see the partition where Linux (Ubuntu) is installed. An asterisk (*) sign would show you the partition where your system boot in. These two partitions aren’t the same for you. That’s why you cannot boot into your PC. You need to fix this.
- Your troubleshooting begins from here. Open terminal and execute the following command:
sudo mkdir /mnt/bootfix
Here we’ve created a directory named bootfix in /mnt to mount your Ubuntu partition. You can name it anything you like.
- Now execute this:
sudo mount /dev/sda1 /mnt/bootfix
Supposing your Ubuntu is installed in /dev/sda1 partition. Replace it with the partition name where Ubuntu is installed.
- Execute the following in terminal:
- Reinstall GRUB using the following command:
sudo grub-install –root-directory=/mnt/bootfix /dev/sda
- Now unmount the harddrive with the following command:
sudo umount /mnt/bootfix
Now remove the Ubuntu live media and restart your PC. Everything should be back to normal after a restart. You should be able to boot into your Ubuntu and/or Windows.