NtFrs Event ID 13555 and 13552 The file replication Service is in an error state

I discovered an issue at a client site the other day where event IDs 13555 and 13552 with a source of NtFrs were present in the event log of a Windows Server 2003 Domain Controller. The relevant error messages were as follows:

‘The File Replication Service is in an error state. Files will not replicate to or from one or all of the replica sets on this computer until the following recovery steps are performed’

The File Replication Service is unable to add this computer to the following replica set:

“DOMAIN SYSTEM VOLUME (SYSVOL SHARE)”

In this case the network had a single DC. It appeared from the errors that the SYSVOL share was in an inconsistent state. This error had obviously first occurred some time before and as a result there were no system state backups from when the SYSVOL share was in a consistent state.

To fix the error I had to set the Burflags option to D4 under the following registry key to force the DC into thinking an authoritative restore had been performed:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NtFrs\Parameters\Cumulative Replica Sets\GUID_OF_YOUR_REPLICA_SET\Burflags

After Setting this, and restarting the server the errors disappeared.

In a multi Domain Controller network much more care needs to be taken. On the plus side in this case you will normally have a good copy of SYSVOL on a different DC. Detailed information on how to recover from this error in a multi Domain Controller network can be found in the references below but the basic premise is this:

  • Stop NtFrs on all servers
  • Set Burflags to D4 in the registry of a Domain Controller with a known good copy of SYSVOL and start NtFrs
  • Set Burflags to D2 on the remaining Domain Controllers and start NtFrs

Exercise extreme caution if using the advice above. It is not a substitute for restoring from a good system state backup if you have one, and more of a last resort. In any event refer to the Microsoft documentation for much more detailed instructions.

References:

How to rebuild the SYSVOL tree and its content in a domain

Burflags Query

Create a bootable WinPE boot disk to capture images using imagex

Here is a quick list of commands to create a basic WinPE bootable ISO image to use for capturing images of computers using imagex. First of all make sue that you have downloaded and installed the Windows AIK (Automated Installation Kit) on your computer which can be found here. Once the Windows AIK is installed run the ‘Deployment Tools Command Prompt’ form the Start Menu under ‘Microsoft Windows AIK’. In the ‘Deployment Tools Command Prompt’ run the following command which will create a folder on your C:\ drive called ‘winpe-bootdisk’ with all the necessary files to create the bootdisk:

copype.cmd x86 c:\winpe-bootdisk

The copy the winpe.wim base image to the c:\winpe-bootdisk\ISO\sources folder, renaming it to boot.wim

copy c:\winpe-bootdisk\winpe.wim c:\winpe-bootdisk\ISO\sources\boot.wim

Next you can mount the boot.wim image file to add any other tools that you want to include on the bootdisk. Once mounted the file system for boot.wim file can be found under c:\winpe-bootdisk\mount:

Dism /Mount-Wim /WimFile:C:\winpe-bootdisk\ISO\sources\boot.wim /index:1 /MountDir:C:\winpe-bootdisk\mount

If necessary copy any other tools you want to the boot.wim image e.g. imagex:

copy “C:\program files\Windows AIK\Tools\x86\imagex.exe” C:\winpe-bootdisk\mount\Windows\System32

You may also want to add additional packages or tools e.g. WSH (Windows Scripting Host) support

Dism /image:C:\winpe-bootdisk\mount /Add-Package /PackagePath:”C:\Program Files\Windows AIK\Tools\PETools\x86\WinPE_FPs\en-us\winpe-scripting.cab”

When you have finished adding stuff to the wim image unmount the boot.wim image and commit ther changes using the following command:

Dism /unmount-Wim /MountDir:C:\winpe-bootdisk\mount /Commit

Finally use oscdimg to create the boot disk ISO image

Oscdimg -n -bC:\winpe-bootdisk\Etfsboot.com C:\winpe-bootdisk\ISO C:\winpe-bootdisk\winpe-bootdisk.iso

After this you can burn the image to CD, and start using it! To capture an image of a computer using your new WinPE boot disk run the following command, where DRIVE_TO_CAPTURE is the name of the drive you want to cature and DESTINATION_FILE is the location and name of the wim file that you want to save the image to:

imagex /capture DRIVE_TO_CAPTURE DESTINTATION_FILE /compress fast verify

e.g.

imagex /capture E: D:\win7-corp.img /compress fast verify

References:

http://technet.microsoft.com/en-us/library/dd744533(WS.10).aspx

http://technet.microsoft.com/en-us/library/dd799303(v=ws.10).aspx