Problem solve Get help with specific problems with your technologies, process and projects.

Windows 10 Image Repair on Boot Fail

What to do when a Windows 10 install gets damaged to the point where it won’t boot? Why, repair the code, of course! That’s what a recent post from Sergey Tkachenko over at Winaero.com reminded me of yesterday. It’s entitled “How to run the sfc /scannow command if Windows 10 does not boot,” and it’s worth a read in its own right. The importance of attempting Windows 10 image repair on a troubled or damaged OS is easy to overlook, and impossible to overstate.

I can’t say this has never happened to me, usually because I’ve been tinkering with something that might have been better left alone. But I can say that the ensuing “Oh no!” reaction sometimes turns off my “intellect vast and cool and unsympathetic” (to channel HG Wells). Thus, I might be inclined to forget that the reverse of the old maxim is entirely true and apt — namely: “If it is broke, you SHOULD fix it.” And fixing a broken Windows install is very often possible and doable using one of two powerful tools. As Sergey observes in the afore-cited blog post, the system file checker (SFC) is indeed one of those tools. The other is the redoubtable Deployment Image Servicing and Management tool, aka DISM. Both of them can help with Windows 10 image repair, in fact.

Windows 10 Image Repair, By the Numbers

Either way, the general approach to dealing with the repair is the same, though the syntax details do differ. Here’s the 10,000 foot view of what’s involved:

  1. Use a bootable UFD to boot into the Windows installer
  2. Follow along until you see the Repair option, then elect the “Command Prompt” option
  3. Run sfc /scannow … to attempt a Windows OS files repair, then reboot
  4. If that reboot works, you’re done. If it still fails, run dism /image /cleanup-image /restorehealth … to attempt another repair, then reboot
  5. If that reboot works, you’re done. If it still fails, you will want to try an in-place upgrade next

DISM is a great tool for Windows 10 image repair

Basic syntax for the DISM offline image repair command. Be sure to read up on the /source attribute: it’s a doozy!

I could keep going to the ultimate fix but readers probably have the idea right now. And that, of course, would be an image or backup restore from the most recent backup or image. But like the old textbooks say, I can leave that as an exercise for the reader!

There are a couple of important notes here. They come from the ellipses at the end of the commands in steps 3 and 4 above. First, the syntax for running these commands offline on a moribund OS is different from running them on an active image. Tkachenko’s post  does a nice job of covering them for sfc so I’ll let readers dig them up there. The definitive DISM reference for offline repair is available from TechNet, entitled “Repair a Windows Image,” but you’ll also need “DISM Operating System Package Servicing Command-Line Options” to get the /image and /source attribute options completely straight. And both of these commands will sometimes provide just the Windows 10 image repair you seek.