Home Computer Linux How to Fix Grub Bootloader after Deleting Ubuntu Partition?

How to Fix Grub Bootloader after Deleting Ubuntu Partition?

MashTips is supported by its audience. When you purchase through links on our site, we may earn an affiliate commission at no extra cost to you.

You ever setup dual boot OS on the laptop with Ubuntu and Windows. This Dual Boot System seemed fine until you for some bizarre reason decided to delete Ubuntu Linux partition from Windows. Oh boy, now you are left with no way to go as you just can’t find a way to boot into your windows system. You find the grub rescue prompt when you restart the laptop and basically your Grub Bootloader is all messed up. Don’t worry, you’ve come to the right place.

We can solve this by fixing the Grub Bootloader Configurations. This solution has been tested numerous times to make sure that it would work on most devices. There are usually two situations that you man end up with the Bootloader error.  Let’s see one by one and you can jump to the right solution listed below.

Can’t Boot into Windows on Ubuntu& Windows Partition

There might be cases where even when you still have both OS on your laptop. In this case, both Ubuntu and Windows 10 partitions are intact. Still, you may face the problem, since the Grub menu doesn’t show the Windows boot option. In such cases, there is quite a simple fix to bring back Windows Boot Option into the OS Selection menu:


  • Both Ubuntu and Windows Partition exist on the hard disk.
  • Both OS are not corrupted.
  • Not Showing Windows boot option in the bootloader list.


  • Turn on laptop and boot into Ubuntu OS
  • Launch the command Terminal(Ctrl+Alt+T) from Ubuntu.
  • Type in the command in the terminal window: sudo update-grub
  • Hit Enter Key
  • Type in your sudo password when prompt to execute your command.

Linux Update GrubYou can see in the terminal window, generating the grub configuration file again. After few seconds, once it found Windows (10) bootloader, you will get the prompt again.

Boot Loader with Windows

Now close the terminal and restart the laptop. When the system boots up again, you will see the option to boot into Windows.

Deleted Ubuntu Partition, Can’t Boot into Windows

Dual booting is a great way to increase productivity as you can have the best of both worlds. Most users use this to their advantage as this can help you to get your work done even when one OS fails you. However, it is easy to get into trouble if you accidentally or intentionally delete the Ubuntu Linux partition. This will mess up the Windows Boot Manager that overwritten Ubuntu with the Grub Bootloader. Hence, when you delete Linux partition from hard disk and restart the laptop, you will end up in a grub rescue prompt. Let us see how to solve this bootloader corrupted issue;


  • Dual boot laptop or desktop.
  • Deleted Ubuntu partition from Windows OS.
  • Not Booting into Windows OS now.
  • Showing grub rescue> on the start screen.

ubuntu grub rescue

When you encounter this issue, you will boot straight into grub rescue with an error showing no such partitions.

What you need:

  • A bootable Ubuntu USB or CD drive.
  • Enough battery power on a laptop or live power connection.
  • A working internet connection (Laptop WiFi (missing driver files) may not work at this point. You may need an ethernet cable directly connected to laptop for live internet connection)


  • Insert Ubuntu boot CD or USB on the laptop
  • Reboot your system
  • Enter into System Bios Settings(Ctrl+Alt+Del or F9 depends on your system manufacturer.)
  • Select Ubuntu CD or USB to boot from on Bios Setting.
  • Wait to boot Ubuntu from USB/CD.Try Ubuntu without Installing
  • Select to Try Ubuntu without Installing Option (You don’t necessarily have to install the Ubuntu OS. There is an option in most Linux distros to try them first without installing. This can help you run the operating system directly from USB.)
  • Launch the Terminal (Ctrl+Alt+T) from Ubuntu
  • Type in the following command sudo apt-get install lilo and press Enter (This will attempt to download the package from the internet and install it).
  • Hit Enter to the following dialog box that appears.
  • Now, Enter the second command sudo lilo -M /dev/sda mbr and press Enter.

Master Boot record update

This command will create a backup of the current configurations in a boot backup folder, and there will be a successful completion message on the Ubuntu terminal “The Master Boot Record of /dev/sda updated”.

That’s it, now you are good to go and shut off your PC and remove the Ubuntu CD or USB from the system. Now power up (start) the laptop/desktop and the system will boot right into Windows as default.

Also Read: How to Edit GRUB with GRUB Customizer

How to fix Grub Bootloader after Deleting Ubuntu Linux partition

Most of us (including our team) using a Windows 10 / Ubuntu Linux dual boot setup in our PC might have run into this issue. We tested this GRUB Bootloader fix with various systems and configurations and had that it does well enough to be recommended for all different cases for issues.

We know how hard it can be to spend your valuable time regretting and trying workarounds to get your PC back in working condition. That is why we presented the simplest way to Boot into Windows After Installing/Deleting Ubuntu Linux.

Hope this method helped you. If there are any other Linux problems you would like us to help you with, do share in the comment section below.


  1. Like seriously !!
    It worked like magic,I’m really impressed and happy cause I searched all over I couldn’t find an answer that worked for me.
    I’m so happy I came across this,thank you 😘😍

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Free Newsletter


How to Run Windows Programs on Linux?

The Linux users who switched from Windows ecosystem, may be missing lot of Windows Programs that was used on their machines. Linux is a...

9 Best MS Office Alternatives for Linux Users

Looking for an MS Office alternative for Linux? Productivity is an important aspect of any OS or platform in general. Fortunately, Linux does have...

How to Convert Web Apps to Desktop Apps

Chrome OS has been slowly gaining its own space in the world of PCs with Chromebooks. Earlier, Mozilla had also tried something similar with...

How to uninstall Meego?

You installed Meego in your system and you don't like it? Or do you want to uninstall it from your system? You can simply...

How to Cast Desktop to Chromecast for PC and Mac

How to cast my desktop on Chromecast? It's still one of the most asked around questions on the Internet. These days there's...

How to Stop Crypto Mining and Cryptojacking on PC?

Crypto Mining is a new form of attacks by hackers who want to make money by mining digital currency with users PC resources. The...