Are you facing error "An Operating System Wasn't Found" when booting Windows? This guide will help to fix it for you.
Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to fix Windows related errors.
In this context, we shall look into the causes of this error and how to get rid of it.
When there is no operating system bootloader found on the current disk, this error generally occurs.
In this case, you will see an error message such as;
An Operating System Wasn’t Found. Try disconnecting any drives that don't contain an operating system.
Press Ctrl+Alt+Del to restart
The main causes of this error are outlined below;
i. When the system partition is damaged, missing, or damaged MBR (master boot record).
ii. No active partition or an incorrect disk partition is marked as active.
iii. When the Boot configuration data (BCD) is corrupted.
iv. In cases where HDD that has an OS installed but not connected.
To fix this issue, follow the following steps;
1. Ensure that the hard drive and the OS are connected.
2. Also make sure that the power and ribbon cables are properly connected.
3. Basically, when the hard drive is detected in the BIOS/UEFI of the computer, ensure that the primary boot device.
4. Then, take a look at the Secure Boot settings in UEFI. They may have been changed (check if Windows is booted with the Secure Boot mode enabled/disabled and in the Legacy mode).
After checking the above details, if the Windows still doesn't boot then restore the Windows bootloader and disk boot record.
Start by getting a Windows ready to install media (on a CD/DVD/ bootable USB drive) or rescue disk with the same OS version you have installed on your drive.
Then, change the boot order in BIOS(UEFI). For that, boot from your installation/rescue disk and run the command prompt.
You must need to detect the type of the partition table on the disk whether it is GPT or MBR. Because the method for restoring the Windows bootloader depends on it.
So run the below command.
diskpart
Then run the following command;
list disk
In this case, if there is an asterisk(*) in the Gpt column then the GPT partition table is used, otherwise it is MBR.
To display the list of volumes on the disk, run the following command;
list vol
To exit the diskpart session, run the following command;
exit
Usually, Windows is likely to be installed on "E:" drive. To confirm this, simply run the following command.
dir e:
If Windows is present then you must see Windows, Program Files, Users, and other standard folders on the drive.
Finally, now we have found the disk layout type and the drive letter of the disk Windows is installed on.
Here we are considering that the computer is using BIOS and the disk partition table is MBR.
First, create bootloader configuration files on the E:\ drive:
bcdboot E:\Windows /S E:
As a result, the "Boot files successfully created" message will appear.
Next, re-create a Master Boot Record (MBR):
bootrec.exe /FixMbr
bootrec.exe /FixBoot
bootrec.exe /RebuildBcd
Now, make the Windows partition active by running the following commands.
diskpart
list disk
sel disk 0
list vol
select volume 2 (earlier we detected that Windows is installed on this volume)
active
exit
Finally, restart the computer and ensure that Windows has booted correctly and the "Operating system not found" error has not appeared.
In case, if your disk has the GPT partition layout, then your computer must be using the UEFI architecture instead of BIOS.
First, find a FAT32 hidden partition and assign a drive letter to it (the size of this partition is 100-300MB, it is used to store the Windows bootloader which is called the EFI bootloader).
Diskpart
List vol
Consider that you’ve detected it as volume 1 with the label BOOTSTRAP.
Now select this EFI partition and assign a drive letter to it:
select volume 2
assign letter M:
exit
Then re-create the BCD bootloader configuration file:
cd /d m:\efi\microsoft\boot\
ren BCD BCD.bak
bcdboot E:\Windows /l en-us /s M: /f ALL
Finally, reboot the computer. Then remove the boot media (USB flash drive) and make sure that Windows has booted correctly.
This article will help to solve An Operating System Wasn't Found when booting Windows which happens when there is no operating system boot loader found on the current disk.