Image cannot be unpacked

189 views
Skip to first unread message

Steve

unread,
Jul 30, 2022, 11:37:19 AM7/30/22
to swupdate
I have this images config:

images: (
    {
        filename = "file.tar.xz";
        type = "archive";
        device = "/dev/sda2";
        filesystem = "ext4"
        compressed = "zstd";
        sha256 = "72adb17f73e73e5c42e498344e5ed82955c29918d6785f6f83b2625ed3b66111";
        path = "."
    }
);

File is:

file.tar.xz: XZ compressed data, checksum CRC64

If I use

compressed = "zstd";

I get the error:

[ERROR] : SWUPDATE failed [0] ERROR : ZSTD_decompressStream failed (returned 18446744073709551606)
[ERROR] : SWUPDATE failed [0] ERROR : Error copying extracted file
[TRACE] : SWUPDATE running :  [install_single_image] : Installer for archive not successful !
Software update failed

If I use

compressed = "zlib";

I get the error:

[ERROR] : SWUPDATE failed [0] ERROR : inflate failed (returned -3)
[ERROR] : SWUPDATE failed [0] ERROR : Error copying extracted file
[TRACE] : SWUPDATE running :  [install_single_image] : Installer for archive not successful !
Software update failed

Version is the official Debian bullseye:

swupdate --version
Swupdate v2020.11.0

Any hints on what's wrong here?

Thanks!

Steve

unread,
Jul 30, 2022, 11:39:39 AM7/30/22
to swupdate
First 16 bytes of the image, seems it's 7z XZ:

00000000: fd37 7a58 5a00 0004 e6d6 b446 0200 2101  .7zXZ......F..!.

Dominique MARTINET

unread,
Aug 1, 2022, 8:20:09 PM8/1/22
to Steve, swupdate
On Saturday, July 30, 2022 at 5:37:19 PM UTC+2 Steve wrote:
> images: (
> {
> filename = "file.tar.xz";
> type = "archive";
> device = "/dev/sda2";
> filesystem = "ext4"
> compressed = "zstd";

If you specify 'compressed' here swupdate will try to decompress before
passing the archive along to the archive handler -- with the compression
algorithm you specified.

If your file is xz, it's not zstd or gz (zlib) so it's obvious these
will error out.

In this particular case the archive handler can also handle compression
itself, so you can probably just remove the compressed line here.

If that doesn't work, just recompress the archive as zstd or gzip
yourself

--
Dominique

Steve

unread,
Nov 17, 2022, 10:47:39 AM11/17/22
to swupdate
You were correct, thanks.
Reply all
Reply to author
Forward
0 new messages