How to Fix the "Scanning and Repairing Drive C:" Error

Short answer
What does the Scanning and Repairing Drive screen mean?
When Windows shuts down, it marks the file system as "clean." If the computer cannot see that mark at the next startup, or if it finds an inconsistency in the file system, it decides to check the drive before loading the operating system. The "Scanning and repairing drive (C:)" text you see on a blue or black screen is the progress indicator of that check. What runs in the background is the boot-time version of Microsoft's chkdsk tool.
The "Scanning and repairing drive C:" screen means Windows noticed an inconsistency on the drive during startup and began a chkdsk-style check and repair. In most cases the right move is to leave the computer on and wait; when the process finishes, Windows starts normally. If the percentage does not move for hours, or the screen comes back at every startup, you need to run chkdsk, sfc, and DISM from the recovery environment, check the disk's health, and back up your data first.
The quick order is this: (1) When the screen appears, do not cut the power; if it is a laptop, plug in the charger and wait at least a few hours. (2) If it still does not move, force a shutdown and enter the Windows recovery environment. (3) If you have important data, back it up first from another computer or with a USB drive. (4) Open Command Prompt and run chkdsk C: /f /r, then sfc /scannow and DISM /Online /Cleanup-Image /RestoreHealth in that order. (5) Look at the SMART data; if the disk has started to fail, replace it.
So the screen on its own does not mean a virus, a hardware failure, or that Windows has crashed. It is Windows maintaining itself. The questions are how long that maintenance takes and whether it repeats at every startup. A screen that appears once and finishes is usually harmless; a screen that keeps coming back points to another cause underneath.
Right before the screen you may have seen the message "Press any key to cancel." That is a window of a few seconds in which you can skip the scheduled check. Skipping lets the computer start, but the check can be scheduled again at the next startup, because skipping does not fix the problem, it only postpones it.
Why does this screen appear?
The causes behind the screen fall under a few main headings. Working out which one applies to you helps you choose the right fix.
| Cause | How it shows up | Severity |
|---|---|---|
| Improper shutdown | Power outage, dead battery, holding the power button, shutting down during an update | Low, usually a one-time event |
| File system error | Inconsistency in NTFS metadata, corrupted directory entries | Medium, repaired with chkdsk |
| Bad sectors | Areas of the disk that cannot be read, physically or logically | Medium to high, may repeat |
| End of drive life | Mechanical wear on an old HDD, exhausted write endurance on an SSD | High, replacement may be needed |
| Cable, connection, or controller problem | Loose SATA cable, badly seated NVMe drive, wrong BIOS mode | Low to medium |
| Corrupted system files | Unfinished update, malware, faulty driver | Medium |
Microsoft's documentation and answers in its support community point to improper shutdowns and file system errors or bad sectors on the disk as the most common triggers of this screen. Malware or corrupted system files can also stop the repair from finishing. It is not possible to know exact proportions, so the steps below aim to rule causes out one by one instead of guessing.
Improper shutdown and file system errors
Windows writes to the disk constantly while it is running. If the power is cut suddenly, write operations left half done can leave an inconsistency in the file system. NTFS keeps a journal for situations like this and recovers from most errors on its own, but sometimes a full check is needed. In that case Windows marks the drive as "dirty" and runs chkdsk at the next startup.
This can happen on a laptop when the battery runs out completely, on a desktop when the plug is pulled, or when you hold the power button for a long time because the computer froze. Shutting the computer down while an update is installing causes the same result. In one-time cases like these, the screen appears once, the check finishes, and the problem resolves itself.
What are bad sectors?
A bad sector is a small area of the disk where data cannot be read and written reliably. There are two kinds. A logical bad sector comes from software causes such as a half-finished write and can be fixed with chkdsk. A physical bad sector means the surface or memory cell is genuinely worn out; chkdsk marks these areas and takes them out of use, but it does not remove the problem.
Physical bad sectors tend to multiply over time. So if chkdsk shows up at every startup and you see a bad sector report, treat it as an early warning that the disk is nearing the end of its life. The safe approach is to take a backup before you try to repair the disk.
How long does it take?
The time varies a lot with the size of the disk, how full it is, its type, and the number of errors found. Giving an exact time would be misleading, but the table below offers a general expectation. The values are approximate and may vary with the version and hardware.
| Situation | Expected behavior | Recommendation |
|---|---|---|
| Small SSD, mild inconsistency | Finishes within minutes | Wait |
| Large, full HDD | May take one or several hours | Plug in the charger and wait |
| Percentage stuck at one value for a long time | The disk may be struggling in an unreadable area | Watch the disk light; if it takes very long, move to the recovery environment |
| Starts again at every startup | The repair is not sticking | Run the commands in the recovery environment and do a SMART check |
The percentage indicator does not always advance smoothly. Some stages are very fast and some very slow, so a percentage that stays still for a while does not by itself mean a freeze. Progress can slow right down in the stage that scans for bad sectors in particular.
What to do and not do while you wait
The first rule is to be patient. Cutting the power in the middle of the check can put the file system in a worse state. So pay attention to these points.
- Plug your laptop into the charger; if the battery dies in the middle of the check, the problem gets bigger.
- If there is a disk activity light, watch it. If the light blinks from time to time, the disk is working.
- Do not keep fiddling with the mouse or keyboard; pressing keys on the screen does nothing.
- Do not hold the power button to shut down in the first few hours.
- If there is no progress at all for a very long time, for example overnight, and the disk light is not on either, you can consider forcing a shutdown; do it knowing the risk.
Warning: A forced shutdown can leave file system changes in the middle of the process half done. If your important data has no backup, treat this as a last resort.
Back up your data first
With disk problems, the most important rule is to secure your data before you start repairs. Tools like chkdsk can lose files in damaged areas while fixing the file system, or break them into folders such as "found.000". If the computer does not start, you can reach your files by using Command Prompt in the Windows recovery environment, or by taking the disk out and putting it in an external enclosure.
In the recovery environment, typing notepad and using the File, Open menu is a practical way to browse your files in an environment with no file manager. From there you can copy to a USB drive. If the disk is physically failing, the copy may hang; in that case copy the most important files first. If the data is vital and the disk makes unusual sounds, going to a professional data recovery service without further attempts is safer.
Step-by-step fix for an endless loop or a freeze
If the screen appears and never ends, or comes back at every startup, follow the order below. Apply the steps in sequence; the chance of a fix is high in the first few steps.
1. Get into the recovery environment
Turn on the computer and shut it off with the power button as soon as the Windows logo appears; doing this two or three times in a row sends Windows to the automatic repair screen. It can vary by version, but you usually follow Advanced options, Troubleshoot, Advanced options, Command Prompt. If this method does not work, boot from a Windows installation USB drive you prepared on another computer and use the "Repair your computer" option.
When Command Prompt opens, remember that drive letters may be different from normal. To find the drive where Windows is installed, type diskpart, then list volume, and leave with exit. Work out the right drive letter from the size and the label; the examples below use C:.
2. Run the chkdsk command
Type chkdsk C: /f /r and press Enter. The /f parameter repairs logical errors in the file system, while /r finds bad sectors, tries to recover readable data, and marks those areas so they are not used again. Because /r runs a surface scan of the whole disk, it can take hours on large disks.
Warning: chkdsk /r may not be able to recover files in damaged areas, and files can be lost during the repair. If your important data has no backup, try to back it up before this step. If the disk is physically dying, long scans can speed up the damage.
When the command finishes, the output shows a phrase like "Windows has scanned the file system and found no problems" or a summary of the errors that were repaired. If the bad sector count in the output is above zero, make a note of it; it will help later when deciding whether to replace the disk.
3. Check system files with SFC
chkdsk repairs the file system, but it does not repair corrupted Windows files. The sfc /scannow command is used for that. It checks protected system files and replaces corrupted or missing ones with good copies from the local store. To target the offline Windows installation while you are in the recovery environment, use this form: sfc /scannow /offbootdir=C:\ /offwindir=C:\Windows. Adjust the drive letter for your own system.
SFC sometimes says it found corrupted files but could not repair them. In that case it is DISM's turn.
4. Repair the Windows image with DISM
DISM repairs the component store that SFC relies on. If Windows can start normally, use DISM /Online /Cleanup-Image /RestoreHealth in a Command Prompt run as administrator. This command may need an internet connection, because it can download good files through Windows Update. When it finishes, run sfc /scannow once more.
On the order, sources generally recommend this: DISM first, then SFC, and chkdsk if you suspect a disk or file system problem. But if you are stuck on the chkdsk screen at startup, it makes sense to start with chkdsk, because if the disk underneath is not consistent, the other tools will not work properly either.
5. Safe Mode and turning off Fast Startup
If you can reach Safe Mode from the recovery environment (Advanced options, Startup Settings, Restart, then press 4 or 5), you can start Windows with the minimum of drivers and run the commands there as administrator. In Safe Mode you also get a chance to remove the driver, program, or update you installed last.
When Windows starts, try turning off the Fast Startup feature. This setting, reached through Control Panel, Power Options, "Choose what the power buttons do," can on some systems cause the shutdown not to be completed fully and leave the file system "dirty." The effect varies with the hardware; turning it off is harmless.
6. Check the BIOS, SATA mode, cable, and NVMe
If the disk connection has a hardware problem, software repairs will not be a lasting fix. Do the following checks.
| Check | What to do | Caution |
|---|---|---|
| Is the disk visible in the BIOS? | The disk model should be listed on the BIOS or UEFI screen | If it is not visible, there may be a connection or disk failure |
| SATA mode (AHCI, RAID, IDE) | It should match the mode Windows was installed in | Changing the mode can stop Windows from starting; note the current mode before you change it |
| SATA and power cable | On a desktop, unplug the cables and reseat them firmly, and try another cable if you can | Do it with the computer off and unplugged |
| NVMe SSD seating | Remove the drive from the M.2 slot and reinstall it with its screw | Be careful about warranty and static electricity |
| BIOS update | Look at the manufacturer's latest version | The power must not be cut during the update |
Warning: Changing the SATA mode at random can cause a boot error. Only change this setting if you know why you are changing it, after taking a backup, and in a way you can undo if needed.
7. Automatic repair and boot records
In the recovery environment you can also try the "Startup Repair" option. If the boot records are corrupted, the commands bootrec /fixmbr, bootrec /fixboot, and bootrec /rebuildbcd are used in Command Prompt. These commands touch the boot configuration, and applying them to the wrong disk can create other problems. So use them only if the other steps did not work and after you are sure of the system disk.
Check disk health with SMART
SMART is the health and error counters that disks keep internally. These counters include values such as the number of reallocated sectors, pending sectors, read errors, and temperature. If Windows can start, you can see a summary like "Good," "Caution," or "Bad" with free tools such as CrystalDiskInfo. In Command Prompt, the wmic diskdrive get model,status command also gives very rough status information; depending on the version, this command may not be available in newer Windows versions.
A "Caution" or "Bad" result points to a higher chance that the disk will fail soon. But even when SMART says "Good," that is no promise the disk will never have a problem. Use this data as a clue, not a verdict. Manufacturers' own diagnostic tools (such as Samsung Magician, WD Dashboard, and SeaTools) can also give more detailed information.
The difference between HDD and SSD
| Feature | HDD (mechanical) | SSD (flash) |
|---|---|---|
| chkdsk time | Usually longer, especially with /r | Usually shorter |
| How it fails | Mechanical wear, clicking, slowdowns, slow growth of bad sectors | Sudden failure, the disk suddenly not showing up, controller problems |
| Bad sector scan | Meaningful, checks the surface | Of limited meaning; the SSD manages cells internally |
| Warning signs | Usually over a longer period, slowdowns and noise | Often gives fewer warnings |
| Recommended approach | Replace it if errors are increasing | If you see a warning, back up at once and plan a replacement |
Running chkdsk /r on an SSD gives limited benefit, because the SSD manages bad cells with its own controller and a surface scan is not done in the traditional sense. Even so, /f can repair logical file system errors. Updating the firmware with the manufacturer's tools can also help with some SSD-related problems.
Malware and system files
Viruses and malware can affect the repair by corrupting system files. If Windows can start, running a full scan with Windows Security is a reasonable step. If it cannot, offline scan options are available through Safe Mode or a recovery USB drive. If there is nothing suspicious, this step is not required; but if the cause is still unclear, it is useful for elimination.
Precautions so it does not happen again
If the problem is solved, a few habits are enough to prevent it from coming back.
- Shut the computer down from the Start menu, not with the power button. If it freezes, wait a bit first.
- Do not shut the computer down while an update is installing, and do not let a laptop battery run out.
- On a desktop, use an uninterruptible power supply (UPS) or at least a filtered power strip.
- Take regular backups; in at least two different places, for example an external drive and the cloud.
- Do not keep the disk very full; very full disks both slow down and raise the chance of errors.
- Look at the SMART status once a month.
- Install driver and BIOS updates from a trusted source with uninterrupted power.
Our post on Windows problems after a format may also be useful for backup habits; if you are thinking of resetting the computer, you will see first what will be lost.
When should you replace the disk?
If several of the signs below appear together, replacing the disk is smarter than spending effort on repairing it.
| Sign | Meaning | Recommended action |
|---|---|---|
| chkdsk comes back at every startup | The repair is not sticking | Back up and check SMART |
| chkdsk reports bad sectors and the number is rising | High chance of physical failure | Replace the disk |
| SMART says "Caution" or "Bad" | The disk reports itself as failing | Back up at once and replace it |
| Clicking, rattling, or the disk often disappears | Mechanical or controller failure | Use it less and consider data recovery |
| Files cannot be read while copying | Read errors | Recover the critical files first |
| The disk is very old | It may be near the end of its life | Consider replacing it as a precaution |
When you move to a new disk, you can reinstall Windows or clone the old disk. If the disk is damaged, you may get errors during cloning; in that case a clean install and restoring files from a separately taken backup is more reliable.
Will resetting Windows fix it?
For problems caused by the file system and system files, the "Reset this PC" option can work, but if there is a damaged disk underneath, the problem comes back after the new installation too. Even the "keep my files" option is not always safe if you choose to reset; take a backup first. A reset or reinstall can erase your data because it may format the disk. Consider this step only after the earlier repair paths have been tried and a backup has been taken.
Common mistakes
People make some mistakes often when they run into this screen. At the top of the list is force-shutting the computer within minutes without waiting for the screen; this can prolong the loop. The second common mistake is running chkdsk again and again without a health check such as SMART; scanning a damaged disk repeatedly can strain it even more. The third mistake is running commands without a backup. Another mistake is downloading "disk repair" programs of unknown origin; these are mostly unnecessary and can carry malware.
Sources
The command and behavior information in this post is consistent with the chkdsk, SFC, and DISM explanations on Microsoft Learn and Microsoft Q&A pages. Some details can vary by Windows version; to see a command's help on your own system, you can type chkdsk /?.
How do you read the chkdsk output?
When chkdsk finishes, you see a report split into stages. The first stages check the file structure, directory links, and security descriptors. If you used /r, the next stage is a surface scan of the area that holds user files. At the end you get the total disk space in kilobytes, the space used by files, and the value listed under "bad sectors."
If the bad sector value is zero, there is no sign of a physical problem, and the issue most likely came from an improper shutdown. A small but non-zero value should not cause alarm at first glance; what matters is whether that value grows in later runs. If the number stays steady, the disk has marked those areas and stopped using them. If it grows, the deterioration is continuing and replacement time is getting closer.
If you want to save the report, once Windows can start, look in Event Viewer under Windows Logs, Application, for the "Chkdsk" or "Wininit" source. The results of the check that ran during startup are usually recorded there. Details can vary by version.
Cancelling the check scheduled at startup
Sometimes chkdsk is scheduled at every startup because of the "dirty bit." If Windows can start, the chkntfs C: command in an administrator Command Prompt tells you whether the drive is dirty. To cancel the scheduling without finishing the check you can use chkntfs /x C:, but this only hides the symptom; it does not solve the problem. Use this command only if you are sure the check is complete and the disk is healthy.
Warning: Cancelling the check over and over and carrying on with a damaged disk raises the risk of data loss. Take a backup first, then let the check finish.
The same error on external disks and second drives
The screen is not specific to the C: drive. A second disk or partition connected to the computer can be checked the same way. Pulling the cable from an external disk without safely removing it is a common cause of this. To check this kind of drive while Windows is running, you can right-click the drive and follow Properties, Tools, "Check," or run chkdsk with the relevant drive letter in Command Prompt. If the drive is in use, Windows may ask you to run the check at the next restart.
As soon as the check finishes on an external disk, copy the important files to a second place. This error is common on external disks that are plugged in and out all the time and have old, fragile cables; do not use such drives as your only backup copy.
Frequently asked questions
Is the Scanning and repairing drive C: screen a virus?
No, it is not a sign of a virus by itself. It is a check Windows starts when it sees an inconsistency on the disk. However, malware can corrupt system files and trigger this screen; if you are in doubt, run a scan.
How long should I wait on this screen?
It can take minutes on a small SSD and a few hours on a large, full HDD. If the disk light is moving and the computer is plugged in, wait a while longer. If there is no progress at all for a very long time, move to the recovery environment.
Can I cancel the screen?
If you press a key during the "press any key" message at startup, the check is skipped. But the problem is not solved, and the check can be scheduled again at the next startup. For a lasting fix, the check has to finish or you need to run chkdsk in the recovery environment.
Will my data be deleted if I force a shutdown?
Not always, but there is a risk. A repair left half done can leave the file system more inconsistent. If you have important data, the safest way is to wait as long as possible and take a backup before repairing.
What is the difference between chkdsk /f and /r?
/f fixes logical errors in the file system. /r looks for bad sectors, tries to recover readable data, and marks those areas. Because /r scans the surface of the disk, it takes much longer and also covers what /f does.
What do SFC and DISM do, and which should I run first?
SFC checks and repairs protected system files. DISM repairs the Windows image that SFC uses as its source. DISM first and then SFC is generally recommended. If you are stuck on a disk check at startup, starting with chkdsk also makes sense.
The screen appears at every startup, what should I do?
First back up your data, then run chkdsk C: /f /r, SFC, and DISM in the recovery environment. If the bad sector count is growing or SMART says "Caution," the disk has started to fail; plan a replacement. Also check the cables and BIOS settings.
Can an SSD have bad sectors too?
An SSD does not have surface damage in the traditional sense, but its memory cells can wear out and the controller manages bad blocks internally. SSD failures are usually sudden. That is why looking at SMART data and taking regular backups matters even more.
Will reinstalling Windows fix the problem?
It can for software corruption, but if the disk is physically damaged, the problem comes back after the new installation as well. Because a reinstall can erase data, take a backup first and check the health of the disk.
Does running chkdsk in Safe Mode help?
Yes, because Safe Mode starts with the minimum of drivers, it is a suitable environment for running chkdsk and sfc commands. Most sources recommend this method for a stuck check. If you can get into Safe Mode, you can run the commands there from an administrator Command Prompt.
