Jump to content

This post was inspired by a recent event at my office.  One of our staff's laptop had a hard drive start to die.  It wasn't able to get past the windows login screen and even just getting their took about 5 minutes.  Took the hard drive out and hooked it up to my computer and the smart data was showing several bad sectors it wasn't able to relocate.  After several tries I was able to make a copy of their User folder.  After that I decided to try and clone the drive to another one.  Took several attempts and about 2 days but it finally succeeded.

 

Wasn't able to boot into the drive at first.  I've dealt with corrupted Windows files in the past but this was the most troublesome I've had.  I ended up making a bunch of notes of the things I tried and that worked for me, so I decided I would pretty them up a little bit and share them with you guys in case anyone has to deal with the same issues in the future.  I know situations like this can be really nerve wracking, and it really doesn't help that most computer repair shops and people online will tell you that you'll just have to reinstall Windows from scratch.

 

Please note that this will not necessarily bring all of your data back to 100%.  There might be data loss and corrupted files that can't be fixed, but it should bring Windows itself back to nearly 100%.

 

Standard DisclaimerThis information is provided in the hope that it will be helpful, but without any guarantee or warranty.  You accept all risk following these instructions.

Always remember to back up anything you don't want to lose.

 


:: Run these in a command prompt in administrator mode



:: Run ChkDsk on external drive
::    /r - repairs any damage it finds
::    /x - parameter dismounts the drive before processing
chkdsk F: /r /x

:: Chkdsk is awesome.  It alone has solved a large number of problems by itself.

:::: Courtesy of
:::: https://www.systoolsgroup.com/updates/run-chkdsk-on-an-external-hard-drive/

:: ===================================================================
:: ===================================================================


:: Run system file checker
:: This will scan certain parts of the OS
:: For corrupted files and attempt to repair them if possible
sfc /scannow

:: To run sfc on an external drive...
sfc /scannow /offwindir=F:\windows /offbootdir=F:\

:::: Courtesy of
:::: https://www.ghacks.net/2017/05/21/run-sfc-scannow-on-external-drives/


:: ===================================================================
:: ===================================================================

:: If sfc is unable to repair files, you might need to use DISM to repair
:: the image it's trying to use to repair files.

DISM /Online /Cleanup-Image /RestoreHealth

:: NOTE unlike chkdsk and sfc, you can't use DISM to repair a Windows 
:: Install on an external drive. You must be able to boot from that drive


:::: Courtesy of 
:::: https://www.windowscentral.com/how-use-dism-command-line-utility-repair-windows-10-image

:: ===================================================================
:: ===================================================================





:: If DISM RestoreHealth doesn't work, and if you have the original
:: Install image (must be the EXACT image), you can try repairing 
:: it from that

DISM /Online /Cleanup-Image /RestoreHealth /Source:S:\sources\install.wim

:: To limit the use of Windows Update

DISM /Online /Cleanup-Image /RestoreHealth /Source:S\sources\install.wim /LimitAccess

:: NOTE as mentioned above DISM can't repair an external drive
:: /Source is the path to the GOOD windows image you want to use to repair your bad one.

:::: Courtesy of 
:::: https://www.windowscentral.com/how-use-dism-command-line-utility-repair-windows-10-image



:: -------------------------------------------------------------------



:: Alternatively you can try the following two options:

:: [1] ::
:: Rename the following folders so Windows update can't use them.
:: This can also help cases where Windows Update isn't
:: working correctly.
net stop wuauserv
cd %systemroot%\SoftwareDistribution
ren Download Download.old
net start wuauserv
net stop bits
net start bits
net stop cryptsvc
cd %systemroot%\system32
ren catroot2 catroot2old
net start cryptsvc

:::: Courtesy of 
:::: https://www.eightforums.com/threads/sfc-scan-and-dism-still-doesnt-work.53369/


:: -------------------------------------------------------------------

:: [2] ::
:: Uninstall and Reinstall .Net 3.5
:: This can be done in the Turn Windows features on or off
:: Or via the command line like so

:: To uninstall
DISM /online /disable-feature /FeatureName:NetFx3

:: To reinstall
DISM /online /enable-feature /FeatureName:NetFx3

:: NOTE part of those parameters are case sensitive
:: ALSO if RestoreHealth still doesn't work 
:: you might need to restart your computer after uninstalling
:: and before reinstalling. 


:::: Courtesy of
:::: https://www.pdq.com/blog/how-to-repair-or-reinstall-net-framework-3-5/


 

Good luck!

 

 

Link to comment
https://linustechtips.com/topic/1088837-tips-for-file-system-problems-on-windows/
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×