Page 1 of 1

wimcapture + wimapply results in chkdsk errors

Posted: Mon Mar 06, 2023 4:45 pm
by Semantic
It seems wimcapture/wimapply have some trouble with WinSxS/Manifests folder capturing/applying.

Steps to reproduce:
1. Install Windows Server (at least 2016 and 2019 confirmed, but it may be other versions also probably)
2. Sysprep, shutdown
3. Start linux (I used debian and ubuntu)
4. Install ntfs-3g (2017.3.23AR.3-4) and wimtools (1.13.5)
5. capture partition with windows to wim file
6. format partition with mkfs.ntfs
7. apply wim file back to it with wimapply
8. boot windows and run chkdsk c:, it stops with the error detected in index $I30 for file 55E8 (for Server 2019). If you run it with key /f and reboot, it also fixes some errors in other folders in WinSxS.

Re: wimcapture + wimapply results in chkdsk errors

Posted: Mon Mar 06, 2023 7:04 pm
by Semantic
1. capture image with dism from winpe
2. apply it with wimapply from linux
the same result

Re: wimcapture + wimapply results in chkdsk errors

Posted: Mon Mar 06, 2023 7:44 pm
by Skyblue
Hi Semantic,

The best method to backup an offline Windows system is to boot from WinPE - Windows Preinstallation Environment :

https://theoven.org/viewforum.php?f=14

I had never a problem with Server 2019 while capturing images with wimlib after booting from WinPE.

Re: wimcapture + wimapply results in chkdsk errors

Posted: Mon Mar 06, 2023 8:16 pm
by Semantic
Thanks, but the problem is that in my specific case I need to apply wim image from linux.

I just have tried to update ntfs-3g to 2021.8.22 and compile wimlib 1.13.6 from sources, then apply image with it. The same result...

Re: wimcapture + wimapply results in chkdsk errors

Posted: Thu Mar 09, 2023 5:55 pm
by synchronicity
This is most likely a bug in libntfs-3g, not in wimlib per se. It will need to be debugged and fixed.

As you may know, I don't have too much time to work on wimlib anymore. Reproduction steps that involve things like "Install Windows Server" are not great. It would be very helpful if you could send me a *minimal* WIM that reproduces the problem when applied. As the problem is occurring in a directory index, probably a WIM image containing just that directory would be sufficient.