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

How to Fix Grub Bootloader after Deleting Ubuntu Partition?

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.

Disclaimer: 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.


  1. I deleted kali Linux partition directly from Windows and when restarted my laptop (windows 7) it got stuck in rescue grub.
    I have both Linux and Windows bootable USB but the problem is that whenever I try to boot from them , my screen says no boot sector on USB device and shows same rescurle grub.
    I am not even able to boot theough a USB. I am stuck at rescue grub please help

    • Should you still be facing this problem you should try booting of a CD/DVD istead of an USB-drive. This solved the same issue for me

  2. I had the problem “Deleted Ubuntu Partition, Can’t Boot into Windows”
    Your solution fixed my problem very well, I am booting now into windows after 10 hours of despair and finding of solutions.
    God job!

  3. I deleted the Ubuntu partition and could not boot into Win, but thanks to you I managed to boot into Win again without any problems, thanks so much!

  4. Thank you so much ! had the issue “Deleted Ubuntu Partition, Can’t Boot into Windows”, followed your steps and it worked prefectly. Btw: lilo prompted me to configure it after installing it, but i ignored that and continued with the next command. Still worked perfectly!


  6. 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 ??

  7. I am new to the linux I tried to remove my dual boot that a friend did for me and I deleted the Ubuntu partition and after seeing the error I formated the drive now I can’t use it or install anything on the system. I don’t know where to go from here

  8. I had deleted ubuntu partition and had fallen into grub repair. Your method helped me boot back into windows. Thanks a ton!

Leave a Reply

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

Free Newsletter


How to Share Clipboard Data Between Android and Ubuntu (Linux)

One of the major factors that keep people Apple loyal is the "ecosystem". Apple devices run exclusive software from the company and gel together...

How to Install Flatpak on Ubuntu and Find Flatpak Apps

If you've been around on the Linux platform for a while, you're probably aware of Flatpaks. The list of app developers adopting Flatpak to...

12 Windows Software Alternatives for Linux: Adobe Photoshop, MS Office and More

Let's start by saying I love using Linux, Ubuntu Linux to be exact. And thus, you are here, looking for the best...

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 Edit GRUB with GRUB Customizer

When you dual boot any OS with a Linux based OS, even two Linux distributions, you get a menu which lets you choose between...

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...
%d bloggers like this: