Skip to content

How to restore GRUB

Rate this post

How to restore GRUB: Have you just restored Windows on a computer configured in dual-boot with Linux and, when you turn on the PC, you are no longer allowed to choose which operating system to start? Don’t worry, this is a fairly common problem and all you need to do is fix GRUB . Don’t you know what I’m talking about? I’ll explain it right away.

GRUB (short for GRand Unified Bootloader) is the boot loader that is used by many Linux distributions, such as the famous Ubuntu, to manage the operating systems installed on the computer. In other words, this is the software that “sees” which operating systems are installed on the PC and allows you to choose which one to start after turning on the machine.

Restoring it is much simpler than it seems. Furthermore, to do this there is no need either to format the computer hard disk or to reinstall one of the operating systems already present on the PC. So what are you waiting for? Armed with a bit of patience, the right amount of attention and try to restore the initial menu of GRUB by following the instructions below. I am sure you will get along great! Good luck!

First steps

If you need to restore GRUB because you installed Windows after Linux and now you no longer have the possibility to choose which operating system to start when the PC is turned on, follow the instructions below.

To begin with, you need to get a Live version of Ubuntu or Boot Repair Disk , a “first aid” distro that contains the tool needed to repair the Linux boot loader. Then proceed with the download of one of the two solutions I have just reported to you: for Ubuntu you have to choose whether to download the 32-bit or 64-bit version of the operating system from the appropriate drop-down menu and then press the Start download button , while for Boot Repair Disk just click on the boot-repair-disk-32bit.iso entry or on the boot-repair-disk-64bit.iso entry (depending on whether you want to download the 32 or 64 bit version of the distro).

Once the download is complete you have to copy the ISO file to a diskette or a USB stick. To burn the ISO image of Ubuntu or Boot Repair Disk on a DVD use the software that I recommended in my guide on how to burn ISO (eg ImgBurn ), to copy it to a USB stick instead use the free application UNetbootin of which I talked to you in detail in my article on how to install Ubuntu from USB .

Once you have obtained your diskette or your self-booting USB stick with Ubuntu or Boot Repair Disk, boot from the latter and follow the steps you find illustrated in the following sections of the guide.

Notes: I recommend the second option between diskette and USB stick, but it is not mandatory. Then keep in mind that if you use a computer based on the UEFI system (and not on the old BIOS) you must use the 64-bit version of Ubuntu / Boot Repair Disk.

Ubuntu

If you are using a Live version of Ubuntu, start the operating system by selecting the Italian language from the first screen and the Try Ubuntu option without installing it from the next one. Then enable an Internet connection by connecting your computer to the router via an Ethernet cable or by choosing one of the Wi-Fi networks available in the menu at the top right (the Wi-Fi cleat icon).

Once the Internet connection has been established, open the Terminal and type the following by pressing the Enter key and typing the password for your user account.

  • sudo add-apt-repository ppa:yannubuntu/boot-repairto add the Boot Repair program repository to Ubuntu software sources (you will be asked to press Enter to confirm the operation);
  • sudo apt-get update to update the Ubuntu software sources database;
  • sudo apt-get install -y boot-repair && boot-repair to install and start the Boot Repair utility.

In the window that opens, click on the Recommended Repair button , wait a few moments for GRUB to be restored and click on OK to save the changes. Then restart your PC and GRUB should be returned to its place.

Boot Repair Disk

If you are using Boot Repair Disk, select Italian from the initial menu to choose the language, start the distro (by selecting the 64bit session or 32bit session option from the next screen, depending on the version in use) and wait for it to start automatically Boot Repair utility .

Then click on the Recommended Repair button , wait a few moments for the GRUB boot loader to be restored and press OK to save the changes. At this point, restart your computer and you should again be able to choose which operating system to boot between Linux and Windows.

In case of problems

Main solutions

Have you installed Ubuntu (or another Linux distro) but GRUB does not appear? Instead, does Windows start directly? In this case, if I believe you have a computer based on the UEFI system , restoring the boot loader may not be useful.

All you have to do is access the UEFI firmware settings by pressing F2 or any other key indicated on the computer boot screen, look for the UEFI Boot Option Priority , Boot Option Menu or Boot priority order settings and select GRUB (or ubuntu ) as boot loader to be used when the PC is turned on.

Another possible solution to the non-appearance of GRUB is to access the Windows Command Prompt , type the command bcdedit /set {bootmgr} path EFIubuntugrubx64.efiand press the Enter key on the PC keyboard. In this way the Windows boot manager is forced to “see” the information related to GRUB in the EFI partitions of the hard disk (the one containing the data useful for the startup of the various operating systems).

If you cannot access the UEFI firmware configuration panel by pressing F2 or another key when turning on the computer, try to act directly from Windows 8 / 8.x and later. Let’s see immediately how.

  • If you are using Windows 8 / 8.x , click the Start button , type the term settings in the search field that is shown to you  and select the PC Settings icon from the search results. Then click on the  Update and restore and recovery items  in the left sidebar, press the Restart now button   located under the wording Advanced startup and wait for the screen to appear with the Windows startup options.
  • If you are using Windows 10 , click on the Start button , click on the Settings icon (the gear wheel on the left) and then press the Update and security icon. At this point, click on the Restore item on the left, locate the wording Advanced restart and then press the Restart now button and wait for the array to appear with the system startup options.

At this point, regardless of the operating system in use, select the items Troubleshooting , Advanced optionsUEFI firmware settings  and  Restart and you should be able to access the settings of the UEFI firmware.

Another operation that you should be able to perform to access the GRUB menu is the deactivation of the fast boot function of Windows 8 / 8.x and later, which speeds up the recovery of the computer from the stop. To do this, go to the Windows Control Panel (the classic one), look for the term power in the search bar at the top right and click on the Change behavior of power buttons item .

At this point, click on the item Change the currently unavailable settings , remove the check mark from the item Activate quick start and press Save changes to save the settings.

Many UEFI-based computers have the so-called BIOS Legacy Mode , a special boot mode that allows you to emulate old BIOSes and use only compatible operating systems with the latter (such as older versions of Windows and Ubuntu). In some cases it may happen that Linux installs in BIOS mode instead of UEFI and this makes it impossible to start Windows. In fact, it is not possible to dual-boot two operating systems if they are installed in different modes (one in UEFI mode and one in BIOS Legacy mode).

To remedy the problem and restore dual-boot, you need to convert the Linux installation to the same way in which Windows is installed: an operation that can be done with the Boot Repair utility that we talked about at the beginning of the guide.

  • To convert Linux to UEFI mode you need to start Boot Repair and activate the panel with the Advanced Options , after which you must select the GRUB Location tab , check the Partition / boot / efi separate and click Apply .
  • To convert Linux to the BIOS Legacy mode, you need to start Boot Repair and activate the panel with the Advanced Options , then select the GRUB Location tab , remove the check from the separate Partition / boot / efi item and click Apply .

To conclude, you must enter the configuration panel of the UEFI firmware and choose whether to start the computer in UEFI or Legacy mode.

Other possible roads

How to restore GRUB

However, keep in mind that what I have just suggested are just some of the possible ways to restore GRUB, the ones useful to solve the problem in most cases. However, there are specific situations in which it may be necessary to follow some other procedure or integrate other steps to the ones we have just seen together.

To resolve any doubts on the matter, I warmly invite you to ask for help on the official forum of the Linux distro you use (e.g. the Italian Ubuntu forum ): there you will surely find someone who can help you. Also try to take a look at the official Ubuntu wiki ( here in English) where other procedures to solve boot problems in dual-boot systems are illustrated.