An Operating System Wasn't Found Try Disconnecting Any Drives That Don't Contain an Operating System
Table of Contents
Introduction
This tutorial provides a step-by-step guide to resolve the error message "An Operating System Wasn't Found. Try Disconnecting Any Drives That Don't Contain an Operating System." This issue commonly arises due to improper BIOS settings, corrupted files, or hardware problems. By following these steps, you can diagnose and fix the problem effectively.
Step 1: Check BIOS Settings
Improper BIOS settings can lead to boot issues. Follow these steps to access and adjust your BIOS settings:
- Power off your computer completely.
- Power it on and immediately press the BIOS key (varies by manufacturer, commonly F2, F12, DEL, or ESC).
- Take a screenshot or note the settings for future reference.
- Navigate to the Boot tab:
- For GPT disks, set Boot Priority to UEFI and Boot Mode to UEFI.
- For MBR disks, set Boot Priority to Legacy and Boot Mode to Legacy.
- Adjust SATA Controller Mode:
- Change from AHCI to Compatibility Mode or vice versa, depending on your installation settings.
- Move the HDD or SSD with Windows to the top of the bootable drives list:
- Use F5 and F6 keys or mouse buttons as necessary.
- Ensure Windows Boot Manager is first in the boot priority list if using GPT.
- Save changes by pressing F10 or selecting Exit and Save Changes.
Step 2: Repair Corrupted BCD File
If BIOS settings are correct but the issue persists, the Boot Configuration Data (BCD) file may be corrupted. To repair it:
-
Create a Windows Installation Media (USB/DVD). If you need help, refer to this video.
-
Boot from the installation media:
- Connect it and turn on the computer.
- Press the key (often F12) to enter Boot Options.
- Select the USB or DVD and press Enter.
-
Once in the Windows Setup, click on "Repair your computer."
-
Open Command Prompt and execute the following commands:
bootrec /rebuildbcd bootrec /fixmbr bootsect /nt60 sys bootrec /fixboot
-
If issues remain, use the command:
bcdedit
- Determine the Windows partition letter from the OSDevice entry.
- If needed, open Notepad to find the Windows partition:
- In Notepad, click File > Open > This Computer, and check each volume.
-
Execute this command, replacing
D
with your Windows partition:bcdboot D:\WINDOWS
Step 3: Reconfigure Windows and Boot Partitions
To ensure proper configuration of Windows and boot partitions:
- Open Command Prompt and type:
diskpart
- List the volumes:
list vol
- Select the boot partition:
(Replacesel vol X
X
with the volume number of the boot partition.) - Check if it is active:
detail part
- If it is not active, type:
active
- If it is not active, type:
- Ensure the Windows partition is set to inactive:
(Replacesel vol Y
Y
with the volume number of the Windows partition.)- If it is active, type:
inactive
- If it is active, type:
Step 4: Check for Hardware Problems
Hardware issues, like loose connections or physical damage, can cause boot problems:
-
Power off and open the back cover of your laptop.
-
Locate the HDD or SSD where Windows is installed.
-
Disconnect and reconnect the drive, ensuring clean connections.
-
If the disk is damaged, consider replacing it or installing Windows on a new disk.
-
Use the following commands to check disk health:
wmic diskdrive get status, model
- To repair bad sectors, run:
chkdsk C: /F /R /X
Step 5: Repair System Files
To repair corrupted system files:
-
Open Command Prompt and execute:
dism /Image:C:\ /Cleanup-Image /CheckHealth
-
If the system is repairable, run:
dism /Image:C:\ /Cleanup-Image /RestoreHealth /Source:WIM:E:\Sources\install.wim:1 /ScratchDir:C:\Scratch /LimitAccess
-
Use the System File Checker:
sfc /scannow
-
If you encounter errors, boot into Safe Mode using:
bcdedit /set {default} safeboot minimal bcdedit /set {default} safebootalternateshell yes
-
To exit Safe Mode after repairs:
bcdedit /deletevalue {default} safeboot bcdedit /deletevalue {default} safebootalternateshell
Step 6: Reinstall Windows if Necessary
If the operating system is still unavailable due to formatting or new installation:
- Prepare for a fresh installation of Windows.
- Boot from the installation media and follow the prompts to install.
Conclusion
By following these steps, you can troubleshoot and resolve the "An Operating System Wasn't Found" error. Start with BIOS settings, move on to repair the BCD file, check hardware, and if necessary, reinstall Windows. Always ensure your data is backed up before making significant changes.