An Operating System Wasn't Found Try Disconnecting Any Drives That Don't Contain an Operating System

4 min read 1 year ago
Published on Aug 01, 2024 This response is partially generated with the help of AI. It may contain inaccuracies.

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:

  1. Power off your computer completely.
  2. Power it on and immediately press the BIOS key (varies by manufacturer, commonly F2, F12, DEL, or ESC).
  3. Take a screenshot or note the settings for future reference.
  4. 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.
  5. Adjust SATA Controller Mode:
    • Change from AHCI to Compatibility Mode or vice versa, depending on your installation settings.
  6. 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.
  7. Ensure Windows Boot Manager is first in the boot priority list if using GPT.
  8. 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:

  1. Create a Windows Installation Media (USB/DVD). If you need help, refer to this video.

  2. 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.
  3. Once in the Windows Setup, click on "Repair your computer."

  4. Open Command Prompt and execute the following commands:

    bootrec /rebuildbcd
    bootrec /fixmbr
    bootsect /nt60 sys
    bootrec /fixboot
    
  5. 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.
  6. 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:

  1. Open Command Prompt and type:
    diskpart
    
  2. List the volumes:
    list vol
    
  3. Select the boot partition:
    sel vol X
    
    (Replace X with the volume number of the boot partition.)
  4. Check if it is active:
    detail part
    
    • If it is not active, type:
      active
      
  5. Ensure the Windows partition is set to inactive:
    sel vol Y
    
    (Replace Y with the volume number of the Windows partition.)
    • If it is active, type:
      inactive
      

Step 4: Check for Hardware Problems

Hardware issues, like loose connections or physical damage, can cause boot problems:

  1. Power off and open the back cover of your laptop.

  2. Locate the HDD or SSD where Windows is installed.

  3. Disconnect and reconnect the drive, ensuring clean connections.

  4. If the disk is damaged, consider replacing it or installing Windows on a new disk.

  5. 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:

  1. Open Command Prompt and execute:

    dism /Image:C:\ /Cleanup-Image /CheckHealth
    
  2. If the system is repairable, run:

    dism /Image:C:\ /Cleanup-Image /RestoreHealth /Source:WIM:E:\Sources\install.wim:1 /ScratchDir:C:\Scratch /LimitAccess
    
  3. Use the System File Checker:

    sfc /scannow
    
  4. If you encounter errors, boot into Safe Mode using:

    bcdedit /set {default} safeboot minimal
    bcdedit /set {default} safebootalternateshell yes
    
  5. 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:

  1. Prepare for a fresh installation of Windows.
  2. 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.