TechShizz | All posts tagged 'SFC'

Windows wont boot up - How to troubleshoot

Tools for boot up issues:

For any error messages about boot problems or the MBR try the following. If you suspect this is a disk error, jump straight to ChkDsk.

BootRec.exe /fixmbr

you can also substitue the /fixmbr with thes commands:

/FixBoot. Writes a boot sector onto the system partition to start Windows

/ScanOs. Scans all disks for Windows installations and displays them to you. 

/RebuildBcd. Scans all disks for Windows installations and prompts you to pick the ones you want to add to the BCD.

If this doesn't work try Booting from "Last Known Good Configuration" from the boot menu. (Tap F8 while OS is booting).
If you can't get to last known good config, you may need to run this from CMD.

BCDEdit /SET "{bootmgr}" displaybootmenu yes

If this doesn't work try the startup repair from the repair disk.

If the doesn't work, try an SFC scan.

If the System is Windows 8 on wards, try DISM.

If that doesn't work run a ChkDsk -f -r from command prompt.

One of these tools should yeild some kind of result unless there is a massive OS corruption or hardware failure. 

Use DISM to repair corrupt operating systems

DISM can be used (like SFC /Scannow) to repair system os files. DISM is better, because if uses source files you specify to repair the corruptions. The advantage of this is apparent when a machine might be powered off during windows updates and the source files get corrupted. SFC might not be able to repair the files but with a windows ISO and DISM you can repair the OS without issue.

1. Burn your Windows ISO to a USB/DVD
2. Boot your machine up using the USB/DVD
3. SHIFT + F10 to enter Command prompt
4. Identify each drive and it letter connected.
Use:
Diskpart
list disk
select disk (X)
detail disk
5. Once you know which letter your USB/DVD media has you need to find the Index of your OS.
DISM /get-wiminfo /wimfile:E:\Sources\install.wim


6. Next we start the clean image process. If you cannot boot up windows, this command will differ. To run this command while in CMD from a recovery disk use the /Image parameter:
Dism.exe /Image:C:\ /Cleanup-Image /StartComponentCleanup
To run this while the OS is booted run it like this:
Dism.exe /online /Cleanup-Image /StartComponentCleanup

7. As above the following command depends on if the OS is running or not:
From WinPE
DISM /Image:C:\ /Cleanup-Image /RestoreHealth /Source:WIM:E:\Sources\Install.wim:4
From OS
DISM /online /Cleanup-Image /RestoreHealth /Source:WIM:E:\Sources\Install.wim:4
(Where E= your ISO drive letter and 4 = your OS edition)

This should clean the image.

Error: sfc /scannow there is a system repair pending

To run an SFC (System File Checker) scan, open CMD and type SFC /Scannow. 
If you OD won't boot jump to (2).
If when trying to run an sfc /SCANNOW command it fails saying that a system repair or reboot is pending try this:

1. Boot to recovery disk and go to the command prompt
2. SFC /SCANNOW /OFFBOOTDIR=C:\ /OFFWINDIR=C:\Windows - where offbootdir is the system partition and winbootdir is the primary partition.

If this fails, try this:
dism.exe /image:C:\ /cleanup-image /revertpendingactions

(Note: Step 2 is the known solution for this error - but I have also seen /revertpendingtransactions alot but it has never worked for me.)

Windows 10 start button or system tray icons are not working

Right I had this issue after migrating a system image from a VM to my phsical laptop.

First thing to try is the System File Checker - Run this as admin. If you can't get CMD open, remember its located at c:\Windows\System32. You could get here by CTRL+R > Type the location > Hit Enter.

sfc /scannnow

If the outcome says that it could not repair the files, either mount the windows 10 ISO or insert the disc and then run this:

Dism /Online /Cleanup-Image /RestoreHealth /source:WIM:F:\sources\install.wim:1

F = the drive letter the media is mounted to.

Then re-run sfc /scannow

If this failes, run PowerShell in admin mode (can be found at C:\Windows\system32\WindowsPowerShell\v1.0\)

Get-AppXPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}

At this point my start button and system tray started to work again.