Have you just re-installed Windows on a computer which also has Linux and when you turn on your PC but you are no longer allowed to choose which operating system you want to use?

Don’t worry, this is a fairly common problem and for this, you just have to restore GRUB and your problem will get solved with just a blink of eye.

Don’t you know what I’m talking about? I’ll explain it to you right away.

GRUB (acronym GRand Unified Bootloader) is the bootloader which is used by many Linux distributions, such as the famous Ubuntu, to manage the operating systems installed on the computer.

In other words, it is the software that looks at the operating systems are installed on the PC and allows you to choose which one to start after switching on the machine.

Restoring it is much simpler than it seems. To do that, you don’t need to format your computer’s hard drive or reinstall one of the operating systems already on your PC.

Follow the instructions below to restore the GRUB initial menu:

First step

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

For this, you need to get a live version of Ubuntu or Boot Repair Disk, a “first aid” distros that contains the necessary tool to repair the Linux boot loader. Now download one of the two solutions I have just suggested to you, for Ubuntu.

If you are downloading Ubuntu then select the version from 32-bit or 64-bit operating system from the drop down menu and then press the button start the download.

If you want to download Boot Repair Disk just click on the boot-repair-disk-32bit.iso entry or 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, copy the ISO file to a disk or USB stick.

Now burn the ISO image of Ubuntu or Boot Repair Disk on a DVD use the software that I have recommended in my guide on how to burn ISO (eg ImgBurn ). You can also copy it on a USB stick using the free UNetbootin to install ubuntu from your USB.

Once you have your bootable CD or USB stick with Ubuntu or Boot Repair Disk, boot from the latter and follow the steps that are shown in the following sections of the guide.

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

Ubuntu

install ubuntu from pendrive

If you are using a live version of Ubuntu, start the operating system from the first screen and then Try Ubuntu option without installing it from the next.

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 icon of the Wi-Fi clutches).

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

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

In the window that opens, click the Recommended repair button, wait a few moments to restore GRUB and click OK to save the changes. Then restart the PC and GRUB should be back in its place.

Boot Repair Disk

Boot repair disk

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

Then click on the Recommended repair button, wait a few moments to restore the GRUB bootloader 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

Windows 10 UEFI

Have you installed Ubuntu (or another Linux distro) but GRUB does not appear? Does it start Windows directly instead?

In this case, if you believe you have a computer based on the UEFI system, restoring the bootloader may not be useful.

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

Another possible solution to the failure of GRUB is to access the Windows Command Prompt, type the command

bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi

and press the Enter key on the PC keyboard.

This will force the Windows boot manager to “see” the GRUB information in the EFI hard disk partitions (the one containing the data useful at the start of the various operating systems).

If you can not access the UEFI firmware configuration panel by pressing F2 or another key when the computer is turned on, try to act directly from Windows 8/8.x and later. Let’s see 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 items Update and Recovery and Recovery in the left sidebar, press the button Restart now that is under the heading 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 words Advanced Restart and then press the Restart now button and wait for the sender to appear with the system startup options.

Now select the TroubleshootingAdvanced OptionsUEFI Firmware Settings and Startup settings and you should be able to access the UEFI firmware settings.

You can also deactivate fast boot function of Windows 8/8.x and later to access the GRUB menu. To do so, access the Windows Control Panel (the classic one), search for the term power in the search bar at the top right and click on the Change button behavior of the power buttons.

Now, click on the Change settings currently unavailable, uncheck the item Activate Quick Start and press Save Changes to save the settings.

Many UEFI-based computers have the so-called BIOS Legacy Mode which is a special boot mode that lets you emulate old BIOS and use compatible operating systems only with the latter (like older versions of Windows and Ubuntu).

In some cases, it may happen that you have installed Linux in BIOS mode instead of UEFI and this causes the inability 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 solve the problem and restore the dual-boot you have to convert the installation of Linux to the same mode in which Windows is installed: You can do it with the Boot Repair utility of which 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, then select the GRUB Position tab, put the check on separate Partition/boot/efi and click Apply.
  • To convert Linux to BIOS Legacy mode, start Boot Repair and activate the panel with Advanced Options, then select the GRUB Position tab, uncheck the separate Partition/boot/efi item and click Apply.

Finally, enter into the UEFI firmware configuration panel and choose whether to start the computer in UEFI or Legacy mode.

Other possible solutons

Ubuntu forums

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

To resolve any doubt on the question, I strongly encourage you to ask for help on the official forum of the Linux distro you use (eg the Ubuntu forum ): there you will surely find someone able to help you.

Also try to take a look at the official Ubuntu wiki where other procedures are described to solve boot problems in dual-boot systems.



LEAVE A REPLY

Please enter your comment!
Please enter your name here