Jump to content











Photo
- - - - -

Capture and apply Windows Full Flash Update (FFU) images

dism

  • Please log in to reply
129 replies to this topic

#101 Tokener

Tokener

    Frequent Member

  • Developer
  • 378 posts

Posted 22 November 2019 - 01:43 PM

Hola alacran,

thank you for the very detailed procedure. :thumbsup:

 

Because i am a wimboot beginner, i take small steps to understand the different stages.
At the top of the list is the recording of an image. I am using (with success) the customwimbootcompress.ini you sent me (with wimlib-clc).

Spoiler

 

This way I created a simple wimboot system.
I will try to implement your suggestions later on.

 

Best regards   T.



#102 Tokener

Tokener

    Frequent Member

  • Developer
  • 378 posts

Posted 22 November 2019 - 01:53 PM

The question still remains: what version of dism did MS use to capture Windows partition in wimboot mode?

 

Regards   T.



#103 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 22 November 2019 - 01:59 PM

Yes that works very fine on wimlib, but on Dism this line: \Windows\System32\drivers\*.sys create problems, because only the drivers that come into the install ISO from MS are expanded correctly, all other drivers you installed are created supposedly expanded but they are full of zeros, THIS IS THE BIGGEST ISSUE as all the PC drivers you installed are corrupt, even worst if you want to RAMBOOT because SvBus driver is corrupted too.

 

alacran



#104 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 22 November 2019 - 02:05 PM

The question still remains: what version of dism did MS use to capture Windows partition in wimboot mode?

 

Regards   T.

 

Only valid is 8.1 udate 1 and its respective Dism version.  Wich in turn is not valid for Capture/apply 10.

 

Compact mode is the replacement of wimboot on all Dism versions for 10. 

 

alacran



#105 Tokener

Tokener

    Frequent Member

  • Developer
  • 378 posts

Posted 22 November 2019 - 02:10 PM

 

(...)because only the drivers that come into the install ISO from MS are expanded correctly

I understand, thank you very much.

 

Best regards   T.



#106 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 22 November 2019 - 03:20 PM

@ Retokener

 

On wimlib-clc I never have selected RpFix or NoRpFix, and all my capture/apply to/from standart WIM or to/from wimboot have been working very fine.

 

On DMS I selected Reset to Default, to clean all changes done and I noticed the following:

 

On capture Tab NoRpFix is preselected.

 

On options Tab NoRpFix is NOT preselected.

 

I think both should be preselected or not, but same way both, Is that correct?

 

I would like more info about what this option does, the Tooltip info do not seems clear enough for me.

 

And also i would like to know how it works on DMS compared to how wimlib-clc deals with it.

 

alacran



#107 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 22 November 2019 - 04:15 PM

From wimlib Capture document:

 

 

--rpfix, --norpfix
Set whether to fix targets of absolute symbolic links (reparse points in Windows terminology) or
not. When enabled (--rpfix), absolute symbolic links that point inside the directory tree being cap-
tured will be adjusted to be absolute relative to the root of the directory tree being captured. When
disabled (--norpfix), absolute symbolic links will be captured exactly as is.
The default behavior of wimcapture is equivalent to --rpfix. The default behavior of wimappend
is equivalent to --rpfix if reparse point fixups have previously been done on WIMFILE, otherwise
--norpfix.

In the case of a multi-source capture, (--source-list specified), passing --norpfix is recommended.
Otherwise, reparse point fixups will be disabled on all capture sources destined for non-root loca-
tions in the WIM image, while capture sources destined for the WIM root will get the default behav-
ior from the previous paragraph.

 

  • The default behavior of wimcapture is equivalent to --rpfix.
  • The default behavior of wimappend is equivalent to --rpfix if reparse point fixups have previously been done on WIMFILE
  • otherwise --norpfix.

 

On DMS capture Tab NoRpFix is preselected, and I think it should be unselected.

 

From wimlib Apply document:

 

 

--rpfix, --norpfix
Set whether to fix targets of absolute symbolic links (reparse points in Windows terminology) or
not. When enabled (--rpfix), extracted absolute symbolic links that are marked in the WIM image
as being fixed are assumed to have absolute targets relative to the image root, and therefore wimap-
ply prepends the absolute path to the extraction target directory to their targets. The intention is that
you can apply an image containing absolute symbolic links and still have them be valid after it has
been applied to any location.
The default behavior is --rpfix if any images in WIMFILE have been captured with reparse-point
fixups done. Otherwise, it is --norpfix.

 

  • The default behavior is --rpfix if any images in WIMFILE have been captured with reparse-point
  • fixups done.
  • Otherwise, it is --norpfix.

 

And as the default capture mode is --rpfix the usual apply mode will be --rpfix too, unless an image was captured with NoRpFix explicitly selected.  

 

On DMS options Tab NoRpFix is NOT preselected wich seems good to me.

 

From: https://docs.microso...ine-options-s14

 

 

/NoRpFix     Disables the reparse point tag fix. A reparse point is a file that contains a link to another file on the file system. If /NoRpFix is not specified, reparse points that resolve to paths outside the value specified by /ImageFile will not be captured.

 

Just same as your Tooltip.

 

  • I will assume on Dism Capture the default behavior is RpFix if NoRpFix is NOT explicitly selected.
  • And Apply will be same way unless NoRpFix was explicitly selected during Capture.

This seems also consistent with wimlib behaviour.

 

Then according with this info I think on DMS both tabs Capture and Options (related to apply) NoRpFix should be unselected by default.

 

Is this correct?

 

alacran


  • Tokener likes this

#108 Tokener

Tokener

    Frequent Member

  • Developer
  • 378 posts

Posted 22 November 2019 - 04:33 PM

I found this explanation on technet  - default is without /NoRpFix.



#109 Tokener

Tokener

    Frequent Member

  • Developer
  • 378 posts

Posted 22 November 2019 - 07:13 PM

 

Then according with this info I think on DMS both tabs Capture and Options (related to apply) NoRpFix should be unselected by default.

 

Is this correct?

Yes I agree.

 

Best regards   T.


  • alacran likes this

#110 wimb

wimb

    Platinum Member

  • Developer
  • 3756 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 23 November 2019 - 09:35 AM

Because i am a wimboot beginner, i take small steps to understand the different stages.

 

A good way to start with WIMBOOT is to begin here and also read the Manual


  • Tokener likes this

#111 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 24 November 2019 - 01:06 AM

I wrote a recommended procedure to make manually by means of DMS your wimboot VHDs, http://reboot.pro/to...-4#entry213355 now we can use DMS to create the boot files/folders and latter use BootIce to only edit them as required.

 

Since DMS has been uptated to DismMountService_191122, now it includes on Extras menu an embeded litlle program BCDBootGUI, very usefull for creating directly from DMS and on a graphic mode the boot files and folders from/to the selected partitions, having it also the option to select the location (and then the version) of the BCDBoot.exe you want to use for this task, it is recommended to download GetWaikTools_v18.10.zip (as this downloads a Dism version bug free for capturing FFU images) easy way is using the link on Help menu >>>  Download DISM by GetWaikTools (JFX), then on that page find the link to old version to download it, just unpack it to DMS folder and run it from there.

 

When running GetWaikTools select ADK for Win 10 and Dism for Windows 10 to download the Dism files and also a few more files from the ADK including the mentioned BCDBoot.exe file, it is very useful to have this files/folders available on your DMS folder when running it from a WinPE as not all WinPE contain them (or the right version). See attached Pictures.

 

alacran

Attached Files


  • Tokener likes this

#112 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 25 November 2019 - 03:56 AM

Restoring a single partition or only some especific files/folders from an FFU image:

 

Restoring only some especific files or folders from an FFU image:

 

From my post: http://reboot.pro/to...e-3#entry213296

 

 

Then I mounted the FFU with DMS to a folder on my HD and only thing visible is Windows partition, the other two partitions do not appear (Yes, I have active since the source Wim and also on the running OS show all Hiden files, folders and drives and also unactivated Hide Protected files of OS), but on Windows Disk Management it is possible to assing a letter to each one of the partitions of the mounted FFU and this way all can be seen, good if we need to extract only some files/folders from a partition to a location on our HD, from the Mount folder only Windows remain visible, then removed the assigned letters and dismounted the FFU without making changes.

 

As said if we are looking for only some especific files or folders, after mounting the FFU image to a folder on our HD if we open that folder, we only see there the OS partition, all other are hiden, (Don't close DMS, just minimize it) on Disk Managament we can see all the partitions of the image we mounted but without any drive letter assigned, then we can assing a letter to lets say only our Documents partition (wich is not seen on mounting folder) to be able to see it from our OS as any other drive and just find the files/folders we are looking for and copy them wherever we want, after this on Disk Managament we unassing the previouly assigned letter and go back to DMS and dismount the FFU image without making changes to it, to keep our image intact.

 

Restoring a single partition from an FFU image is also possible:

 

I ran a test to probe this can be done. To make things easier the test was made on small VHDs:

 

Created a 3 GB fixed size Test-1.vhd, with 2 partitions first primary partition 1536 MB NTFS Active, labeled as 10x64-WB, second primary partition the remaining space NTFS formated labeled as Documents, Applied 10x64-WB.vhd Wimboot mode to first partition by means of DMS, copied some files/folders to second partition just to have some info into it, and made a FFU image, and dismounted the VHD,  and closed DMS.

 

Created a second 3 GB fixed size Test-2.vhd, with 2 partitions first primary partition 1536 MB NTFS Active, labeled as Win, second primary partition the remaining space NTFS formated labeled as Docs.

 

Without dismounting Test-2.vhd, ran DMS and mounted the FFU to Mount folder on internal HD, ran PartitionGuru and my internal HDs and also both VHDs were visible there, no matter Test-1.vhd didn't have any drive letters assigned on Disk Managament, then selected Documents partition on Test-1.vhd and cloned it to Docs partition on Test-2.vhd selecting the second from the 3 options available to keep partition layout, but only copy used sectors, it worked very fine, latter did same thing with first partition on both VHDs also selecting same cloning option.

 

After doing this I closed PartitionGuru and went back to DMS and dismounted the FFU image without making changes to it, to keep the image intact.

 

Then went to "This PC" and opened it and the two cloned partitions where available there with its original label names assigned on Test-1.vhd, opened both and all info was there.

 

So this probes without any dubt it is possible to extract and clone a single partition from an FFU image.

 

PartitionGuru Free: 4.9.5.508: https://www.eassos.c...onguru-free.php

 

MiniTool Partition Wizard Free v11.5: https://www.partitio...on-manager.html

 

NOTES:

 

PartitionGuru cloning requires the target partition to be formatted, seems best option to restore single partitions on our running PC.

 

MiniTool Partition Wizard requires the target partition to be free space (unformatted), seems best option to restore single partitions to another blank disk.

 

Haven't tested yet if MiniTool Partition Wizard requires some little adjusments to the procedure, but I'm sure it will work, as I have cloned (they use the term copy) ext4 partitions that are also not mounted (seen) on Windows.

 

Of course the disadvantaje of an FFU image compared with a WIM image, is the FFU image needs to have enought space to mount an FFU image of a big size disk, and the time required to do it.

 

alacran


  • Tokener likes this

#113 Tokener

Tokener

    Frequent Member

  • Developer
  • 378 posts

Posted 26 November 2019 - 09:45 PM

Recent finding:

Capturing GPT-disk to FFU creates file ~exactly double the size than capturing a MBR-disk with same content.

test 1:

MBR disk 55GB with ~9.5GB data -> captured to FFU results in 5.3GB FFU file.

converted disk to GPT.

test 2:

GPT disk 55GB with ~9.5GB data -> captured to FFU results in 10.6GB FFU file.

 

is there a mistake in my experiment which leads to wrong result? Or is the result according to any rule?

 

regards   T.

 



#114 cdob

cdob

    Gold Member

  • Expert
  • 1469 posts

Posted 27 November 2019 - 07:14 AM

How does a capture FFU handle zero sectors?

 

Did you 'Zero free space (good for virtual disk optimization)' first?

https://docs.microso...wnloads/sdelete


  • Tokener likes this

#115 Tokener

Tokener

    Frequent Member

  • Developer
  • 378 posts

Posted 27 November 2019 - 10:30 AM

 

cdob:

Did you 'Zero free space (good for virtual disk optimization)' first?

thank you cdob :thumbsup:

"zero freespace" has reduced the resulting file to the ~same amount as captured MBR-disk.

 

first I tried formatting the "payload"-drive but still the resulting file was too large.

 

the strange thing was that the FFU file was small again when I reset the (EDIT : uncleaned GPT) drive to MBR and captured then.

 

best regards   T.



#116 Tokener

Tokener

    Frequent Member

  • Developer
  • 378 posts

Posted 27 November 2019 - 11:19 AM

sorry I made a mistake on my last post.

correct is

the strange thing was that the FFU file was small again when I reset the (EDIT : uncleaned GPT) drive to MBR and captured then.

 

 

T.



#117 Dive

Dive
  • Members
  • 2 posts
  •  
    Indonesia

Posted 28 September 2022 - 06:39 AM

Is it possible to modify the contents of the optimized ffu file without being corrupted?



#118 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 28 September 2022 - 12:24 PM

I haven't tried that, so I can't give you a well supported answer.

 

Keep a copy of your ffu file in safe place, and run a test and let us know.

 

But I assume that will not be an easy task, as you can mount it with Dism and modify it, but the trouble will be commit changes and unmount it, to keep the changes.

 

alacran



#119 Tokener

Tokener

    Frequent Member

  • Developer
  • 378 posts

Posted 28 September 2022 - 05:37 PM

Reading the Microsoft docs there is a chapter:

Mount an FFU for servicing

https://learn.micros...view=windows-11

 

I can confirm that dism version 1810 performed the /commit operation on Win11 system running. Changes were ok.

Native win11 dism refused to execute the /commit command.

Sorry, but I cannot assess the interactions between windows and 1810-dism.

 

regards   T.

 

PS. The /append switch did not work.


  • alacran likes this

#120 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 29 September 2022 - 01:51 AM

@ Tokener

 

It is nice to talk with you my very good friend, hope you and your family are fine.

 

So if I understood it correctly:

 

We can use your DMS program, running it from WinPE, or  full 10 or 11 win OS, and using the Dism downloaded by GetWaikTools_v18.10, (that is in fact dism.exe version 10.0.17763.1), the process of updating a ffu file works fine.

 

Please confirm, if the previous paragraph is right.

 

From: http://reboot.pro/in...e=3#entry213281

 

GetWaikTools_v18.10.7z   185.5KB  Password = GetWaikTools

 

 

alacran


  • Tokener likes this

#121 Dive

Dive
  • Members
  • 2 posts
  •  
    Indonesia

Posted 29 September 2022 - 04:40 AM

I haven't tried that, so I can't give you a well supported answer.

 

Keep a copy of your ffu file in safe place, and run a test and let us know.

 

But I assume that will not be an easy task, as you can mount it with Dism and modify it, but the trouble will be commit changes and unmount it, to keep the changes.

 

alacran

 

Unfortunately, the current conditions don't allow me to test until at least the next few days. But I'm curious if anyone has much experience with this.
 
The optimizing file feature is indeed useful, because without it, apply image will not adjust the size of the last partition to fit different sizes of target storage (especially with smaller ones). With the exception of running with the additional command diskpart of course.
 
Even with such benefits, there isn't a single documentation or forum discussions that explains what can or can't be done after the ffu file has been optimized. For example, if the only ffu file available is only the suspected optimized version and there is a need to replace some of the files in it, what does this mean:
 
1. Is it possible to do it?
2. If the answer is possible, after mount/apply, should it be need to optimized again?
3. Is it possible to check the optimize status of the ffu file?


#122 Tokener

Tokener

    Frequent Member

  • Developer
  • 378 posts

Posted 29 September 2022 - 01:52 PM

My dear friend alacran :hi:

 

We can use your DMS program, running it from WinPE, or  full 10 or 11 win OS, and using the Dism downloaded by GetWaikTools_v18.10, (that is in fact dism.exe version 10.0.17763.1), the process of updating a ffu file works fine.

 

Please confirm, if the previous paragraph is right.

 

Beside the fact that DISM fails sometimes for reason unknown, DismMountService (DMS) can deal with FFU files (at least with DISM v.1810). - DismMountService has capability to download this version with GetWAIK (included).

 

One of the main reason for DISM to fail is lacking of access rights. (imho)

Working with DISM in PE-system is always the better choice.

 

Considering these limitations, I can confirm your statement.

 

I can't say anything about special switches like /optimize or /compact as I never applied them.

 

Btw. I recently updated DismMountService to v.220928

 

Best regards   T.

 
 

 

 



#123 Tokener

Tokener

    Frequent Member

  • Developer
  • 378 posts

Posted 29 September 2022 - 02:07 PM

@Dive

 

 

For example, if the only ffu file available is only the suspected optimized version and there is a need to replace some of the files in it, what does this mean:
 
1. Is it possible to do it?
2. If the answer is possible, after mount/apply, should it be need to optimized again?
3. Is it possible to check the optimize status of the ffu file?

 

 

Hello Dive

- 1. FFU files can be updated, see considerations in previous post.

- 2. this depends on the amount / size of the files that were replaced, copied or deleted in the archive.

      preparing a disk with tools like sDelete or defragging before capturing seem to me the best choice if you want best result.
- 3. :confused1:

 

cu   T.
 

 

 



#124 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 29 September 2022 - 10:54 PM

I think we need to clarify somethings:

 

1 - In my old post No. 51, I probed that the last Dism version capable to make FFU files from MBR partitioned VHDs (as all our Mini and MinWin VHDs capables to MBR and UEFI Boot and Ramboot), is the version downloaded using GetWaikTools_v18.10.zip, (password = GetWaikTools), this version downloads Dism.exe file version 10.0.17763.1 (same that is into 10 v1809).

 

From same post No. 51

 

...It appears there is a bug in ADK v1903. The WinPE ISO it produces allows for imaging an ffu to a disk, but will not capture the ffu from a disk. If, however, you use the v1809 of the ADK, this problem goes away.  I tried multiple times rebuilding the ADK using v1903 but ended up with this same error.  The ISO from v1809 works out of the gate and will image OS versions at least up to Win10v1909.
Source: https://social.techn...with-0x80070032

 

Dism.exe file versions newer than v10.0.17763.1 DO NOT work to capture MBR partitioned disks or virtual disks.

 

2 - On the other hand, in https://learn.micros...view=windows-11, there is a Note:

 

 

    Note

    Applying an optimized FFU requires Windows 10, version 1903; WinPE version 1903; or later.

 

So we can assume the optimized FFU feature, was implemented starting with the Dism.exe included in 10 v1903, that DOES NOT work to capture MBR partitioned disks or virtual disks.

 

3 - On DMS new v220928, the embeded GetWaikTools is in fact v20.0.10.0, it downloads Dism.exe v10.0.19041.1, this is the version that comes into Win10 v20H1 and maybe also v20H2, and this version as expected also DOES NOT work to capture MBR partitioned VHDs to a FFU file, as I just tested.

 

From: http://reboot.pro/in...e=5#entry221787

 

DismMountService (DMS) can deal with FFU files (at least with DISM v.1810). - DismMountService has capability to download this version with GetWAIK (included).

This info doesn't apply to DMS new v220928, DMS last version downloads Dism.exe file v 10.0.19041.1, this is the version that comes into Win10 v20H1 and maybe also v20H2, please see attached photo.

 

4 - But if selecting in new DMS v220928, the Dism version downloaded using GetWaikTools_v18.10.zip, (password = GetWaikTools), as this version downloads Dism.exe file v10.0.17763.1 (same that is into 10 v1809), the capture of MBR partitioned VHDs to a FFU file is successful, as just re-tested making an FFU file of my MBR 2 partitions MinWin-WB.vhd (Win10 20H1)

 

5 - It is a fact that newer versions are only valid to capture FFU files from GPT partitioned disks or virtual disks, (as long as they work fine and are not buggy), and DO NOT work in case of MBR partitioned disks or virtual disks.

 

alacran

Attached Files

  • Attached File  Dism.png   36.52KB   1 downloads

  • Tokener likes this

#125 Tokener

Tokener

    Frequent Member

  • Developer
  • 378 posts

Posted 30 September 2022 - 06:44 AM

Dear alacran

thank you for clarification

I was not aware that getwaiktool is downloading dism 10.0.19041.1.

I corrected my post #122.

 

should have test it ...   T.

 

Edit: I will pull back the new DMS version and improve it concerning your tests.





Also tagged with one or more of these keywords: dism

2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users