Skip to content

[BUG]: zstd compression fails flashing #1605

Description

@darkain

What happened?

I'm testing with Stratipi images located at: https://github.com/circuitrewind/stratipi/

It appears that the Raspberry Pi Imager doesn't understand compressed images correctly, with different behavior on Windows vs MacOS, where for former is cosmetic and the latter being a full out failure.

On Windows, it appears the progress bar calculates what "100%" is based on the compressed image size, and then the progress itself is based on the total uncompressed size. This was quite confusing at first seeing it routinely go over 1000% when writing.
Image

Transitioning to MacOS, it looks like there is a similar calculation based on the compressed size. However, once it hits that "100%" (of the compressed size) instead of the progress bar continuing, the flash entirely fails at this point. Flashing the same image but decompressing it myself and flashing that version instead has no issue at all. The MacOS test was done on both an external USB card reader as well as the Mac's internal SD reader. Both drives work perfectly otherwise and the USB drive has been the primary development flashing drive for the past year of the OS's development.
Image

Also as of note, primary development up until this point of Stratipi has been done via Windows using Rufus w/ the zstd images when flashing to SD card. Rufus has no issues at all with these images, having done a few hundred flashes during the development of the OS.

Another note: all flashing tests were done on Sandisk Industrial 8GB Micro SD cards. I have a whole fleet of these, and do actively check their internal health with all still reporting 99% health remaining.

Version

2.0.8 (Default)

What host operating system were you using?

macOS

Host OS Version

26.4.1 Tahoe

Selected OS

Custom

Which Raspberry Pi Device are you using?

Raspberry Pi 4B, 400, and Compute Modules 4, 4S

What kind of storage device are you using?

microSD Card in an internal reader

OS Customisation

  • Yes, I was using OS Customisation when the bug occurred.

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions