3

The title of the question pretty much tells what is going on. If I disable the Unified Write Filter (UWF) on my Windows 10 IoT device the startup happens without any problem. It takes at most a minute, maybe a little bit more.

The problem happens when I have UWF enable. It takes at least 10 minutes to complete its startup sequence. It gets stuck at a screen saying "Please Wait" for almost the entire time. I can also see that it comes online fairly quickly. I can ping to it within the first minute.

At first I thought that it has something to do with the task I created in the task scheduler (since the enabling/disabling of the UWF happens via software), but when disable the task and turn UWF on manually via the command line this problem still occurs.

Is this problem directly related with the write filter? In any case, I have to use UWF (it is a work-related problem).

After doing some fixes (mostly related to a damaged disk), the boot time has shrunken to a little more than 5 minutes.

Update: I recreated an image following those exact steps, and this problem doesn't appear on the new image. Guess Windows is being Windows again!

marijnr
  • 344
  • 3
  • 6
  • 24

3 Answers3

2

The Microsoft article Common write filter exclusions has this information :

Some services and features write information to a device’s persistent volume, and expect that information to be present across device restarts. You may need to configure your write filter to allow for specific file and registry exclusions in order for these services and features to work correctly.

This topic lists registry and file exclusions that can help enable some common services and features to work correctly when write filters are enabled.

You need to add exclusions to all the registry keys and folders that are listed in this article.

To add a specific file or folder to exclusions, run the following command:

Uwfmgr.exe file add-exclusion c:\labs

Or

Uwfmgr.exe file add-exclusion c:\labs\report.docx

To add an exclusion for the registry key:

Uwfmgr.exe registry add-exclusion “HKLM\Software\My_RegKey”

To apply exclusions, restart your computer.

Prior to beginning maintenance (update installation, antivirus software update, copying of new files), you will have to switch to the special servicing mode:

Uwfmgr.exe servicing enable

Or it might be simpler to just turn off UWF.

My advice would be not to enable UWF for the system drive at all. If required, partition your disk to separate system and application. If that's not possible, you will need to find out and exclude the troublessome folders or registry keys.

For troubleshooting, UWF events, errors and messages are found in the Windows Event Log inside the Windows Logs\System event log.

More information may be found in the articles :

harrymc
  • 455,459
  • 31
  • 526
  • 924
  • The problem I have with the article you have linked (common exclusions) it that I don't have any .sqm files on my system and that all the folders to be excluded also aren't present. I do have Windows 10 IoT (I didn't tell it in the question because normally both IoT and the regular one are built the same way, I'll add it to the question anyway). I tested the linked solution (with the registry keys and the absent folders) and it didn't make any difference. It still took about 10 minutes to boot. I checked the system logs but they didn't show anything significant. – marijnr Jul 20 '18 at 07:08
  • The exclusions in the article may not cover the folders or registry keys that slow down the boot in your case. As far as I can see, you would either need to : (1) Somehow find out and exclude the troublesome ones, (2) Do not use UWF for the system partition, (3) Have UWD disabled during the boot and enabled afterwards (the Task Scheduler is the tool to use for that). – harrymc Jul 20 '18 at 07:27
  • UWF needs a reboot to enable/disable itself, so that is not an option. And the reason we are using UWF is to protect the system partition and its files. Looking at which files/keys are causing the slow down sees like the only option here. Or is there a specific way to only have UWF enabled after the boot process has completed? – marijnr Jul 20 '18 at 07:47
  • That was a lapsus of mine - you need to boot for any change so you are stuck. However, I don't know of any tool that can help if there is nothing in the log. You might need to guess, or use binary chop to add large exclusions and refine them as you go. The need to reboot each time is a PITA. – harrymc Jul 20 '18 at 08:12
  • I have found something in the event logs: when I have UWF enabled, Windows complains that I have a problem with my hard disk. It wants to to a disk check. I disabled chdisk because when it was enabled and if the disk check was finished, it would just loop back to the windows saying there is a problem with the disk. These event logs aren't present when I have UWF disabled and comprise about half of the event logs if it is enabled. – marijnr Jul 20 '18 at 11:07
  • Does the disk event arrive even after you have done a chkdsk? – harrymc Jul 20 '18 at 11:49
  • I haven't tried that. I will try a manual chkdisk and see if after a reboot I still have that many events. – marijnr Jul 20 '18 at 11:56
  • a manual chkdsk doesn't work since it is the system partition. And when I do a automatic one at boot it gets stuck in a loop (and doesn't want to boot, or I have to press a button to skip chkdsk running) – marijnr Jul 20 '18 at 13:22
  • It seems like your disk is damaged. I hope UWF is disabled during the chkdsk. – harrymc Jul 20 '18 at 14:49
  • Musings: A damaged disk is rare, usage of UWF is rare, might there be a connection? – harrymc Jul 21 '18 at 10:02
  • I fixed the faulty disk by forcing chkdsk when UWF is disabled and now there aren't any problems with the disk. The startup when UWF is enabled is still really slow – marijnr Jul 23 '18 at 06:47
  • Try to enable UWF but exclude the entire disk and all registry hives. If this speeds up the boot then you will need to refine the exclusions. If it does not help the speed, then I can see no solution except giving up on UWF. – harrymc Jul 23 '18 at 06:50
  • Excluding Windows folder in my C drive just causes the device to not boot anymore. I guess that is not an option now. I also checked the event logs after fixing the faulty disk, and during boot, it kept checking the disk for errors. The event just said that all the volumes were healthy instead of faulty – marijnr Jul 23 '18 at 07:39
  • I'm sorry, but this is as far as I can go. Your setup is correct by all the existing documentation. You may keep searching for the exclusion that will solve the problem, but there just might not be one. – harrymc Jul 23 '18 at 07:48
  • Thanks for the help. I will still award you the bounty if no other answer will pop up, because I believe the original answer might still help people with a similar problem (just not my problem sadly) – marijnr Jul 23 '18 at 07:51
0

Seems UWF and Volume Shadow Copy have some problems working with each other, causing similar issues.

Check if you have Volume Shadow Copy active with vssadmin list shadows. If you have any shadow copies, delete them with vssadmin delete shadows.

robinCTS
  • 4,327
  • 4
  • 20
  • 29
Fegyosz
  • 1
  • 1
0

I had exactly the same behaviour and the culprit was a file exclusion.

I excluded the /winevt folder so that i could review the evt log upon e.g. a crash. This however slowed down the operating system significantly and a process 'runtimebroker.exe' kept using about 30-40% resources - even in idle state. Additionally i could not shutdown/restart - even with the UWF_filter functions. I presume the combination with uwf causes an endless loop somewhere.

I did by the way add all file exclusions noted in the 'common filter exclusions' tab.

So check all your exclusions and perhaps first test with the default settings. I feel like my case is somewhat close to yours seeing the symptoms you pointed out.

sommmen
  • 403
  • 2
  • 10