How to fix grub rescue in Windows 10 and Ubuntu dual boot: Bootloader error

This tutorial is all about how to Fix Grub Bootloader after Deleting Ubuntu Partition?

If you are trying to use dual boot OS setup on a pc with Ubuntu and Windows, then it is really a handy idea. While setting the system up like this, be very careful with all the aspects of the installation. But, if somehow accidentally you deleted the Ubuntu Linux partition from Windows (which is something not to be done anyway), then you are left with no way to go back, and also you will not find a way to boot into your windows system. As the action of deleting the Linux partition from windows lead you to a situation where only the grub rescue prompt is visible whenever you restart the pc because your Grub Bootloader is all messed up now. In this article, we are about to discuss the solution of this problem step by step.

This problem can be solved by fixing the Grub Bootloader Configurations. This solution has been tested many times to make sure that it works, I even tested it by myself once, so this procedure is foolproof for sure (for most of the devices). There are normally two scenarios one may end up within this kind of Bootloader error.

We will discuss those scenarios one by one.

Not showing or Can’t Boot into Windows on Ubuntu & Windows Partition

(While booting into Ubuntu is still working)

This type of issue can even arise when you have both the OS (Ubuntu & Windows) installed on your pc systematically. In this kind of scenario, both Ubuntu and Windows 10 partitions are intact within your Hard Disk drive. Still,  you are facing the problem, which means the Grub menu is unable to show the Windows boot option. If this is the case with you, there is quite a simple solution to get out of this problem, the bootloader can be brought back as well as the Windows Boot Option into the OS Selection menu at the time of system startup.

Things need to be noted before implementing this solution:

  • Both Ubuntu and Windows Partition still exist on the HDD.
  • None of the OS corrupted.
  • Windows boot option is not shown on the bootloader list.

Solution:

  • Switch on the pc and try to boot into Ubuntu OS normally
  • When at the desktop, launch the Linux command Terminal by pressing Ctrl+Alt+T
  • Type the given command in the terminal window, “sudo update-grub”
  • Now press Enter Key
  • Type in your own sudo password when asked by the system, to execute your command.
  • For reference, you can see the given image below                 Can’t Boot into Windows on Ubuntu
  • Now you can see in the terminal window, that the processing is going on hence, the system is generating the grub configuration file again. After a few moments, once it found Windows (10) bootloader within the HDD, it will prompt you again.fix windows and ubutnu dual boot
  • Now restart the Pc. When the system boots up again, you will see automatically the option to boot into Windows is available in there again.

 

How to restore Windows bootloader after deleting Ubuntu Partition: Grub rescue

(Cannot boot into Ubuntu)

Dual booting is a great way to increase range of functionality as well as productivity in a pc. As the user able to use both the platforms according to need. Also, one OS can be used to recover corrupted data by using another OS. It is also a good idea to get the most juice out of an old laptop. Most of the users use this technique to have it as an advantage, as this setup can help the user to get the work done even when one OS failed to do the job. However, in a complex setup like this, it is also easy to get into trouble if the user accidentally or intentionally deleted the Ubuntu Linux partition. If you are using such dual boot system, it is advised that do not let use your pc used by anyone else. Whatever the reason is, deleting the Ubuntu partition will definitely mess up the Windows Boot Manager. So, while the Linux partition is deleted from the HDD and the user restart the pc, he/she will end up in the grub rescue prompt by default.

Now we are going to talk about the solution for this bootloader corrupted issue…

Things that need to meet before implementing this part of the tutorial:

  • Your pc had Dual boot setup.
  • The Ubuntu partition is deleted from Windows OS somehow.
  • Definitely Not Booting into Windows OS anymore.
  • By default, keep showing grub rescue prompt on the screen.                           grub rescue

Requirements for the Solution

  • A bootable Ubuntu USB drive or CD drive.
  • In case of laptop connect the charger, as it is going to take a while.
  • A working internet connectivity (If your pc has a problem with Wi-Fi connectivity like missing driver or something, then the connection may not be possible, in that case only a LAN connected pc will work).


Tutorial

  • Insert the Ubuntu bootable USB or CD whatever you are using.
  • Reboot the system
  • Enter into System BIOS Settings (by pressing Ctrl+Alt+Del or F9 or F2 or Del, it depends on your Motherboard manufacturer.)
  • Select the Ubuntu USB or CD to boot from on BIOS Setting as the first booting device priority.
  • Wait for the of booting process to be completed from USB/CD.grub rescue fix
  • First try your luck with the “Try Ubuntu without Installing” option, as there is actually no need to reinstall the Ubuntu OS actually. Now a day most of the Linux distros has the facility of trying the OS without even installing it on the HDD. This will directly run the OS from the USB/CD.
  • Launch the Terminal by pressing Ctrl+Alt+T from Ubuntu desktop.
  • Now type in the following command “sudo apt-get install lilo” and press Enter, now this command will try to download the package over the internet and will install it automatically.
  • Hit Enter when the next dialog box that appears for the permission.
  • Now again, enter the command “sudo lilo -M /dev/sda mbr” and press Enter.fix grub rescue in windows and ubuntu dual boot
  • This command will automatically create a backup of the current configurations in a boot backup folder within the HDD, and if everything is completed successfully the it will show a successful completion message on the Ubuntu terminal stating “The Master Boot Record of /dev/sda updated”.
  • This is it, now you are ready to restart the pc and also you should remove the USB/CD from the system. Now after fresh start the system will boot right into Windows OS as the default system.

I hope these methods helped you and your problem is solved. These given methods are better than reinstalling the OS again, as this will save your time as well as your valuable data. For any more problem’s solution related to LINUX keep connected with our website, and do not think that you are one of those very few who uses dual bootloader system, as there are thousands of users around the world who use this type of setup including me and my team and many IT professionals.

Other Useful Resource:

16 thoughts on “How to fix grub rescue in Windows 10 and Ubuntu dual boot: Bootloader error”

  1. I have similar issue in a dual boot system but although the WIndows 10 partition is shown in grub, it wont boot into Windows, just a blank screen. Any ideas (I wish to be able to boot either to Linux Mint or WIN10)?

    Reply
    • Try to use the windows 10 bootable USB or DVD to repair the windows 10, then it perhaps, will not show the blank screen. Because without knowing exactly what kind of problem you got in the machine it would not be possible to give exact advice to mend it. However, please try to repair first.

      Reply
      • What if selecting Windows from the GRUB menu, leads you to “invalid signature” error ? It is not coming from BIOS… I have no security policy enabled in the BIOS. But what is this “cryptic” signature ?

        Reply
  2. Brilliant save of the day! I was not so brilliant when I thought I could casually delete and merge my partition. You saved me countless hours of reinstalling Windoze. Thanks from Canada!

    Reply
  3. Sayan you are the man. The lilo tool saved my bacon. If you had a donate button I would give. Thanks for the advice.

    Reply
  4. Mr. Sayan, I hope you might have a helpful suggestion for me…
    On my dual-boot system, the Win-10 partition is shown in GRUB (on /dev/sda1), however selecting it comes back with the following errors from:

    …search.c : 296: no such device: 8E5C65855C6568C3
    …chainloader.c: 213: invalid signature.

    I have checked the BIOS through and through — there is no “secure boot” policy. There are no write protections… it looks all open.
    Looking at editing the GRUB Win10 item, there is an “if” statement where the search command is implemented. That 8E5C65855C6568C3 is at the end of both the If and the Else statements.

    At the GRUB prompt, trying the command ls (hd0,msdos1) returns a complete description of the partition: Filesystem type ext* – Label ‘XW10’ – last modification time and date , UUID …. ; Partition start at 1024KiB,… Looks fine.

    I can log into my Linux Fedora just fine… Tried everything I found about load_env –skip-sig or set check_signatures=no … No success. Can not start this Win10. I have files there that I want to recover… I hope Mr. Sayan can offer a helpful suggestion. ?

    Reply
  5. I fixed this problem — the 8E5C65855C6568C3 was an old UUID number (signature)… I looked up the new UUID number from the disks utility in Fedora and replaced the old with the new UUID inside the GRUB menu. Windows started right up… everything fine! So happy it worked out in the end. Thanks for your articles anyway.

    Reply
  6. This is obtained after the procedure described above:
    Minimal BASH-like line editing is supported. For the first word, Tab lists possible comand comletition. Anywhere else Tab lists possible device or file comletitions.
    grub>

    Any ideas?

    Reply
  7. I installed Win10 and backed up in another partition, and then installed Ubuntu, but the Windows had some troubles in the networking, so I restored it from the image file, from then on, the Windows was disappeared in the grub boot menu. I searched around the internet but seldom advises worked. What should I do to get Windows back into the grub menu?

    Reply
    • Boot the Ubuntu and open your Windows partition from the file manager.

      Now, run command terminal and execute the following commands:

      1st method:

      sudo os-prober
      sudo update-grub

      Reboot

      2nd method:

      If the above method didn’t work then create a customer Grub entry.

      Command will list all the partitions.

      lsblk

      Now, run

      sudo blkid /dev/sdaX
      where replace the sdaX with the Windows portion you would find in the above command.

      Note down the UUID of the Windows portion you would get in the above command.

      sudo nano /etc/grub.d/40_custom

      Add the following lines and replace the UUID with the one you have fins above.

      menuentry "Windows 7" {
      insmod ntfs
      set root='(hd0,1)'
      search --no-floppy --fs-uuid --set UUID
      chainloader +1
      }

      Close the editor: CTRL+X, type Y and hit the Enter button.

      Now, update the grub and reboot the system

      sudo update-grub

      Reply
  8. Thank you so much for this helpful method. I did all of written method but I couldn’t boot to windows. Finally I decided to reinstall ubunto and I choosed my hard drive to install boot loader during installation and after it finished finally I could see that dual boot menu. Thank you again for your really helpful post.

    Reply
  9. Dear Mr Dean,
    I tried the sudo update-grub and it gave me a different listing for windows boot loader. I did notice it listed the boot loader as an efi. Meanwhile, my Linux distro is on a separate hdd than what windows 10 is on. Will grub be able to detect win 10 this being the case?

    Reply
  10. You are a life saver, A very brilliant solution worked like a charm. <3

    Have already wasted 2 days on other solutions

    Reply

Leave a Comment

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