Is wimexport with LZMS always solid?

Comments, questions, bug reports, etc.
Post Reply
mattieb
Posts: 3
Joined: Thu Jan 25, 2024 9:23 pm

Is wimexport with LZMS always solid?

Post by mattieb »

When working on a FAT32 USB installer script for Windows 11, I needed to split install.esd.

Code: Select all

wimpslit install.esd install.swm 3800
Which shows this:

Code: Select all

[ERROR] Splitting of WIM containing solid resources is not supported.
        Export it in non-solid format first.
ERROR: Exiting with error code 68:
       The requested operation is unsupported.
Which makes sense, if install.esd is coming from Microsoft's official ISO—I think.

However, I get this error even when I'm trying to split a file called "install.esd" that I created with this shell fragment, which is intended to hold multiple images. ("windows.esd" is the ESD downloadable from Microsoft for Windows 11.)

Code: Select all

for index in $(seq 4 ${image_count})
do
    wimexport windows.esd "${index}" "${tmpdir}/sources/install.esd" --compress=LZMS --chunk-size=128K
done
I didn't use solid compression.

Considering this, I then found that the install.esd that I created above could be made into something splittable by compressing it with LZX:

Code: Select all

wimexport install.esd all install.wim --compress=LZX --chunk-size=32K
which I can split (and the resulting installer works.) But if I do this instead:

Code: Select all

wimexport install.esd all install.wim --compress=LZMS --chunk-size=128K
and try to split the result, I receive the "Splitting of WIM containing solid resources" error.

Is that right? I've been trying to dig through forums/documentation and it doesn't seem like it should be solid just because it's LZMS. But maybe there's something I'm not understanding.

EDIT: It occurred to me there might be something going on since the source was already LZMS/128K, so I tried --recompress in both blocks of code above where I was using LZMS—it ran much more slowly recompressing, but no dice.
synchronicity
Site Admin
Posts: 474
Joined: Sun Aug 02, 2015 10:31 pm

Re: Is wimexport with LZMS always solid?

Post by synchronicity »

It looks like the problem is that LZMS implies the use of the new WIM format instead of the old one, and then wimlib sees that because both the source and destination WIMs are in the new format and the source WIM has solid resources, it should use solid compression in the destination WIM. And there's no way to explicitly tell wimlib "I want to write a non-solid WIM, even when solid would otherwise be the default".

I'll consider adding a --non-solid option that allows explicitly specifying that a non-solid WIM is desired.

In general I would recommend avoiding LZMS with non-solid compression, though. Use LZX if you want non-solid compression, or LZMS if you do. That matches what Microsoft's software supports. wimlib does support more, since the file format allows it, but you may run into some edge cases like this one.
mattieb
Posts: 3
Joined: Thu Jan 25, 2024 9:23 pm

Re: Is wimexport with LZMS always solid?

Post by mattieb »

Makes sense. Thanks!
Post Reply