If you are a programmer or in any way or form related to IT, you would want to install Ubuntu on your computer. However, we have noticed that we are unable to boot Windows after installing Ubuntu as a dual-boot operating system. In this post, we will talk about this issue and see what you can do to resolve it.
Fix Unable to boot Windows after installing Ubuntu
If you cannot boot Windows 11/10 after installing Ubuntu, follow the solutions mentioned below.
- Rebuild the BCD File and MBR
- Run Startup Repair
- Change the Boot Order
- Update GRUP Bootloader
- Mark Partition as Active
Let us talk about them in detail.
1] Rebuild the BCD File and MBR
The Boot Configuration Data (BCD) file holds configuration data used by the Windows Boot Manager to control the boot process and store vital startup information. MBR is a boot sector found at the beginning of partitioned devices. If, for some reason, they are corrupted in your computer, you will encounter this issue. So, to resolve it, we are going to rebuild the BCD file and MBR. To do so, follow the steps mentioned below.
- First of all, create Windows bootable installation media using a different computer and using it, boot into your computer.
- Once you are on the Windows Startup screen, click on Repair your computer.
- Now, go to Troubleshoot > Advanced Options > Command Prompt.
- After opening the Command Prompt, you need to run the following commands one by one in any order of your choice.
bootrec /fixmbr
bootrec /fixboot
bootrec /rebuildbcd
Once done, you can restart your computer and check if the issue persists.
2] Run Startup Repair
When your computer encounters issues like missing or damaged system files, corrupted boot configuration data (BCD), damaged master boot record (MBR), incompatible drivers, or registry errors, Startup Repair can help diagnose and fix these problems. Since we are facing a similar issue, we will run it to resolve the issue. To do so, follow the steps mentioned below.
- Create an installation media, and then boot it into the affected computer.
- Once done, you need to go to Repair your computer.
- Next, navigate to Troubleshoot > Advanced Options.
- Click on Startup Repair.
Finally, follow the on-screen instructions to complete the repair process. Once done, you need to check if the issue is resolved.
3] Change the boot order
If you have two separate disks on which you have installed Windows and Ubuntu, you will have to set the boot order of the disk with Windows as the first to boot from it. We are presuming that you did not configure the boot order during the installation of Ubuntu. We will help you do so. Follow the steps mentioned below.
- First of all, boot into UEFI or BIOS firmware.
- Now, change the Boot order to prioritize the hard drive where you want to install the boot loader. Typically, GRUB (the boot loader used by Ubuntu) is preferred because it can detect both Windows and Ubuntu.
- Finally, save and exit the BIOS.
After changing the boot order, move on to the next solution.
4] Update GRUB Bootloader
After setting the boot order, the next step is to update the GRUB Bootloader to enable dual-booting. The GRUB bootloader is a program that manages the boot process for Unix-like operating systems, including Linux. It provides the option for users to select which operating system or kernel to boot, which is particularly beneficial for dual-boot configurations. To do so, start Ubuntu, open Terminal, and run the following command.
sudo update-grub
Finally, restart your computer and you will be presented with an option to select Windows or Ubuntu during Startup.
5] Mark Windows Partition as Active
If you have installed both operating systems on a single disk, we suspect that you have unintentionally disabled the Windows partition as inactive. To mark it back to active, we need you to follow the steps mentioned below.
- Boot into your PC using the installation media
- Now, go to Repair your computer > Troubleshoot > Advanced Options > Command Prompt.
- We are going to trigger the diskpart utility, for that, run
diskpart
and hit Enter. - Execute –
select disk 0
. - Run
list partition
to list out all partitions, we need to select the partition where Windows is installed. - For that, run
select partition <partition-number>
. - Then, type
active
and hit Enter.
Finally, reboot your computer.
Read: Best Lightweight Linux Distros for low-end or older computers
Why is my computer not booting after installing Ubuntu?
There could be various reasons why your computer is booting after installing Ubuntu such as the fact the GRUB partition is not updated, that is something you need to do after installing Ubuntu on a system that already has another operating system. Also, you need to make sure that the boot order is correctly configured. You can check out the solutions mentioned here to resolve this issue.
Read: How to install Linux Ubuntu on Hyper-V in Windows
How to access Windows after installing Ubuntu?
If you still want to access Windows after installing Ubuntu, you need to configure dual boot. It’s essential whenever you want to install two operating systems on a single device. If you do that, you will get an option to choose the operating system of your choice every time you start your computer.
Also Read: Choose an operating system screen or Dual boot menu missing.