
“Windows cannot find an operating system” error when starting Windows
Share
Symptoms
When trying to start Windows, you get the error:
Unable to find an operating system. Try disconnecting any drives that do not contain an operating system.
Press Ctrl + Alt + Del to restart
Resolution
To view the command prompt, you need a Windows 7 or later DVD or USB boot. If you don't have bootable media, you can get one by following the steps here .
View command prompt:
- Boot from Windows 7, 8, or 10 DVD or USB media.
- After reaching the Windows setup screen (where you select your language, time, and keyboard settings), press the SHIFT + F10 keys to bring up the command prompt.
Verify that the disk is set to GUID Partition Table (GPT) or Master Boot Record (MBR):
- At the command prompt, type diskpart and press ENTER.
- Type list disk and press ENTER.
- Find the disk and see if there is an asterisk (*) in the GPT column. This means that the disk is GPT. If no asterisk is found, then set the disk as MBR disks.
- Type exit and press ENTER.
If the master boot record type is MBR:
- From the Command Prompt, type a: dir and press ENTER.
- If the r: drive is found and a directory is displayed, look for the folder in the \Windows directory. If it is present, that is the system drive. Go to step 2.
- If the drive is not found or does not contain the \Windows folder, type b: dir and press ENTER. Continue through the alphabet until you find the drive with the \Windows folder, but ignore the x: drive. These are the installation files from the USB or DVD you are using. The most common location is the c: drive, so this example is used in the rest of the article.
- Once found, type:bcdboot C:\Windows /S c:
- In this case, C is the drive where the Windows folder is found. If the Windows folder is on a different drive, use that drive letter instead of “C” in the bcdboot command above.
- The message Boot files created successfully should be displayed before continuing.
- Type: diskpart and press ENTER.
- Type: list disk and press ENTER.
- Type: sel disk C and press ENTER.
- In this case, C is the drive where the Windows folder was found. If the Windows folder is on a different drive, use that drive letter instead of “C” in the sel disk command above.
- Type: list vol and press ENTER.
- Type: sel vol C and press ENTER.
- In this case, C is the drive where the Windows folder was found. If the Windows folder is on a different drive, use that drive letter instead of “C” in the sel disk command above.
- Type: active and press ENTER.
- You will see a confirmation message that the volume has been successfully set as active. If you do not get confirmation, it means that the disk is set to GPT not MBR () or there is a problem with the disk. Make sure that you are using the right disk.
- Type: exit and press ENTER.
- Restart your device, this can be done quickly from the command prompt by typing: shutdown -frt 00 and pressing ENTER.
If the type is GPT:
- From the Command Prompt, type a: dir and press ENTER.
- If you see the r: drive was found and a directory, look for the folder in the \Windows directory. If it is present, that is the system drive. Go to step 2.
- If the drive is not found or does not contain the \Windows folder, type b: dir and press ENTER. Continue through the alphabet until you find the drive with the \Windows folder, but ignore the x: drive. These are the installation files from the USB or DVD you are using. The most common location is the c: drive, so this example is used in the rest of the article.
- Type: diskpart and press ENTER.
- Type: list disk and press ENTER
- Type: sel disk C and press ENTER.
- In this case, C is the drive where the Windows folder was found. If the Windows folder is on a different drive, use that drive letter instead of “C” in the sel disk command above.
- Type: list part and press ENTER.
- Look for the partition marked System.
- Once found, you can assign the letter R to the partition. If you have already acquired the letter R, you can choose any unassigned letter. To assign the letter type: Assign letter r =: and press ENTER.
- Type: exit and press ENTER.
- Return to the command prompt, type the following one line at a time, pressing ENTER after each line:
- CD /dr:\EFI\Microsoft\Boot\
- ren BCD.bak BCD
- BCDboot c:\Windows /l en-us /fm /s UEFI
- Note: The /l en-us part of the command sets the Windows language to English. To set a different language, replace en-us with a different language code (for example, de-de for German).
- Restart your device, this can be done quickly from the command prompt by typing: shutdown -frt 00 and pressing ENTER.