Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for compressed files #325

Closed
kkaiser1952 opened this issue Apr 14, 2016 · 24 comments
Closed

Support for compressed files #325

kkaiser1952 opened this issue Apr 14, 2016 · 24 comments

Comments

@kkaiser1952
Copy link

When I burn the SD to a hard drive I generally save it as .GZ for space reasons. It would be great if Etcher recognized these and could use them to burn it back to an SD.

@jviotti
Copy link
Contributor

jviotti commented Apr 14, 2016

Hi @kkaiser1952 ,

So you mean Etcher should be able to burn image.img.gz or image.iso.gz right? If so, I think this is a good addition, but I wonder how this will plan with the fact that Etcher currently writes ZIPs that containing a single image file inside, but are not necessarily a "zipped" single file.

I think checking the extension should be a good enough clue.

@kkaiser1952
Copy link
Author

Well if what you are saying is to let Etcher open a .GZ file from my desktop and burn a SD card with it then yes, thats what I mean.

@noglitch
Copy link

@jviotti I've just tried Etcher and it seems fantastic for what we put in place with our board SD images.
But while you are at it, I would also suggest to add .bz2 images as well.
In fact we produce .img.bz2 images for SD card right now: http://www.at91.com/linux4sam/bin/view/Linux4SAM/Sama5d2XplainedMainPage#Demo_archives

To write them on a Windows platform, we advice users to use the Rawrite32 tool as it handles such a file format...

Thanks, bye.

@jviotti jviotti changed the title Etcher to open .GZ files Support for open .gz and .bz2 files Apr 19, 2016
@jviotti
Copy link
Contributor

jviotti commented Apr 19, 2016

@noglitch Thanks for the suggestion! I edited the title to include .bz2 support.

@jviotti jviotti added this to the v1.1 milestone Apr 19, 2016
@jviotti jviotti changed the title Support for open .gz and .bz2 files Support for open .gz, .bz2, .7z files Apr 20, 2016
@jviotti jviotti modified the milestone: v1.1 Apr 20, 2016
@RobertCNelson
Copy link

@jviotti fantastic tool, if you include *.img.xz files beagleboard.org can switch too... ;)

@jviotti
Copy link
Contributor

jviotti commented Apr 20, 2016

@RobertCNelson Thanks a lot! Taking notes :)


To summarise:

  • Support for .gz
  • Support for .bz2
  • Support for .xz

@jviotti jviotti changed the title Support for open .gz, .bz2, .7z files Support for compressed files Apr 20, 2016
jviotti added a commit that referenced this issue Apr 27, 2016
This PR introduces `etcher-image-stream`:

https://github.com/resin-io-modules/etcher-image-stream

a module that will handle support for decompression, URL streaming, and
any other way to get a source of data to write in Etcher.

Most of the changes in this PR are because XZ decompression includes a
native dependency (no pure JS implementations out there for now), so we
had to tweak various things for the dependency to work correctly on
Etcher/Electron.

See: #325
Signed-off-by: Juan Cruz Viotti <[email protected]>
jviotti added a commit that referenced this issue Apr 27, 2016
This PR introduces `etcher-image-stream`:

https://github.com/resin-io-modules/etcher-image-stream

a module that will handle support for decompression, URL streaming, and
any other way to get a source of data to write in Etcher.

Most of the changes in this PR are because XZ decompression includes a
native dependency (no pure JS implementations out there for now), so we
had to tweak various things for the dependency to work correctly on
Etcher/Electron.

See: #325
Signed-off-by: Juan Cruz Viotti <[email protected]>
jviotti added a commit that referenced this issue Apr 27, 2016
This PR introduces `etcher-image-stream`:

https://github.com/resin-io-modules/etcher-image-stream

a module that will handle support for decompression, URL streaming, and
any other way to get a source of data to write in Etcher.

Most of the changes in this PR are because XZ decompression includes a
native dependency (no pure JS implementations out there for now), so we
had to tweak various things for the dependency to work correctly on
Etcher/Electron.

See: #325
Signed-off-by: Juan Cruz Viotti <[email protected]>
jviotti added a commit that referenced this issue Apr 28, 2016
This PR introduces `etcher-image-stream`:

https://github.com/resin-io-modules/etcher-image-stream

a module that will handle support for decompression, URL streaming, and
any other way to get a source of data to write in Etcher.

Most of the changes in this PR are because XZ decompression includes a
native dependency (no pure JS implementations out there for now), so we
had to tweak various things for the dependency to work correctly on
Etcher/Electron.

See: #325
Signed-off-by: Juan Cruz Viotti <[email protected]>
jviotti added a commit that referenced this issue Apr 28, 2016
This PR introduces `etcher-image-stream`:

https://github.com/resin-io-modules/etcher-image-stream

a module that will handle support for decompression, URL streaming, and
any other way to get a source of data to write in Etcher.

Most of the changes in this PR are because XZ decompression includes a
native dependency (no pure JS implementations out there for now), so we
had to tweak various things for the dependency to work correctly on
Etcher/Electron.

See: #325
Signed-off-by: Juan Cruz Viotti <[email protected]>
jviotti added a commit that referenced this issue Apr 28, 2016
This PR introduces `etcher-image-stream`:

https://github.com/resin-io-modules/etcher-image-stream

a module that will handle support for decompression, URL streaming, and
any other way to get a source of data to write in Etcher.

Most of the changes in this PR are because XZ decompression includes a
native dependency (no pure JS implementations out there for now), so we
had to tweak various things for the dependency to work correctly on
Etcher/Electron.

See: #325
Signed-off-by: Juan Cruz Viotti <[email protected]>
jviotti added a commit that referenced this issue Apr 28, 2016
This PR introduces `etcher-image-stream`:

https://github.com/resin-io-modules/etcher-image-stream

a module that will handle support for decompression, URL streaming, and
any other way to get a source of data to write in Etcher.

Most of the changes in this PR are because XZ decompression includes a
native dependency (no pure JS implementations out there for now), so we
had to tweak various things for the dependency to work correctly on
Etcher/Electron.

See: #325
Signed-off-by: Juan Cruz Viotti <[email protected]>
jviotti added a commit that referenced this issue Apr 29, 2016
This PR introduces `etcher-image-stream`:

https://github.com/resin-io-modules/etcher-image-stream

a module that will handle support for decompression, URL streaming, and
any other way to get a source of data to write in Etcher.

Most of the changes in this PR are because XZ decompression includes a
native dependency (no pure JS implementations out there for now), so we
had to tweak various things for the dependency to work correctly on
Etcher/Electron.

See: #325
Signed-off-by: Juan Cruz Viotti <[email protected]>
jviotti added a commit that referenced this issue Apr 29, 2016
This PR introduces `etcher-image-stream`:

https://github.com/resin-io-modules/etcher-image-stream

a module that will handle support for decompression, URL streaming, and
any other way to get a source of data to write in Etcher.

Most of the changes in this PR are because XZ decompression includes a
native dependency (no pure JS implementations out there for now), so we
had to tweak various things for the dependency to work correctly on
Etcher/Electron.

See: #325
Signed-off-by: Juan Cruz Viotti <[email protected]>
jviotti added a commit that referenced this issue Apr 29, 2016
This PR introduces `etcher-image-stream`:

https://github.com/resin-io-modules/etcher-image-stream

a module that will handle support for decompression, URL streaming, and
any other way to get a source of data to write in Etcher.

Most of the changes in this PR are because XZ decompression includes a
native dependency (no pure JS implementations out there for now), so we
had to tweak various things for the dependency to work correctly on
Etcher/Electron.

See: #325
Signed-off-by: Juan Cruz Viotti <[email protected]>
jviotti added a commit that referenced this issue May 4, 2016
This PR introduces `etcher-image-stream`:

https://github.com/resin-io-modules/etcher-image-stream

a module that will handle support for decompression, URL streaming, and
any other way to get a source of data to write in Etcher.

Most of the changes in this PR are because XZ decompression includes a
native dependency (no pure JS implementations out there for now), so we
had to tweak various things for the dependency to work correctly on
Etcher/Electron.

See: #325
Signed-off-by: Juan Cruz Viotti <[email protected]>
jviotti added a commit that referenced this issue May 4, 2016
This PR introduces `etcher-image-stream`:

https://github.com/resin-io-modules/etcher-image-stream

a module that will handle support for decompression, URL streaming, and
any other way to get a source of data to write in Etcher.

Most of the changes in this PR are because XZ decompression includes a
native dependency (no pure JS implementations out there for now), so we
had to tweak various things for the dependency to work correctly on
Etcher/Electron.

See: #325
Signed-off-by: Juan Cruz Viotti <[email protected]>
@jviotti
Copy link
Contributor

jviotti commented May 19, 2016

Sorry for the huge delay on this issue, I'm finally allocating some time to finish the remaining compression formats. I just PRed GZ support, and will be looking forward to PR bzip2 support as well today.

jviotti added a commit to balena-io-modules/etcher-image-stream that referenced this issue May 19, 2016
See: balena-io/etcher#325
Signed-off-by: Juan Cruz Viotti <[email protected]>
jviotti added a commit that referenced this issue May 20, 2016
See: #325
Signed-off-by: Juan Cruz Viotti <[email protected]>
jviotti added a commit that referenced this issue May 20, 2016
See: #325
Signed-off-by: Juan Cruz Viotti <[email protected]>
jviotti added a commit that referenced this issue May 24, 2016
See: #325
Signed-off-by: Juan Cruz Viotti <[email protected]>
@jviotti jviotti closed this as completed May 24, 2016
@noglitch
Copy link

Hi

I've just tested the xz and bz2 image writers with 1.0.0-beta7 version and:

  • xz image flasher works great
  • I can't use the .bz2 format:
    • I can't select a file with this format unless there is a file with the same name but a .zip extension in the directory
    • when I select the img.bz2 file, the .zip file is presented instead in the GUI, just underneath the "select image icon"
    • when I try to start flashing... it doesn't go further with sometimes a window saying "an error occurred". Note, when etcher fails like this, I have big difficulties to actually kill it...

(I run it from Linux Ubuntu 16.04)

Hope that it can help, Bye,

@jviotti
Copy link
Contributor

jviotti commented May 30, 2016

Hi @noglitch ,

Thanks for reporting this! It seems that you're hitting this error: regular/unbzip2-stream#7 from one of the dependencies we're using. I'll try to allocate some time to work myself on it!

@jviotti
Copy link
Contributor

jviotti commented Jul 19, 2016

Hi @noglitch ,

Turns out the bz2 selection issue was an Electron bug with the open dialog on GNU/Linux (see electron/electron#6305), which was fixed in the latests versions!

@jviotti
Copy link
Contributor

jviotti commented Sep 12, 2016

Hi @noglitch ,

I'm happy to announce the bz2 issue you've experienced has just been fixed in the bz2 implementation we're using (se balena-io-modules/etcher-image-stream#37), and it's coming on the next release!

@mpvader
Copy link

mpvader commented Apr 26, 2017

Hi, running Etcher 1.0.0.0-rc4, I get this error:

image

But opening the same file in 7zip works fine.

Running Windows 8.1 Pro.

@jhermsmeier
Copy link
Contributor

Hey @mpvader, that's because Etcher currently checks the image extension – in this case .rpi-sdimg, and bails out on that because it's not mapped as a known format.
We're currently working on making it fall back to treating anything unknown as if it had an .img extension – so, renaming your file to venus-image-rapsberrypi2.img.bz2 should do the trick for now.

@mpvader
Copy link

mpvader commented Apr 26, 2017

Hi @jhermsmeier, thank you for the fast response. Shouldn't it just compare the most right part? So as long as it ends in .bz2 it's fine?

These 'cascading' extensions are quite common for images and such.

@mpvader
Copy link

mpvader commented Apr 26, 2017

And, just to be clear: I'd expect etcher to unzip the .bz2 file, and burn its contents. Not burn the zipped file.

@jhermsmeier
Copy link
Contributor

@mpvader well, what it basically does is look at the base extension (i.e. .bz2 here), and then checks if it knows how to deal with the thing that has been compressed (in this case the next extension, .rpi-sdimg) – so what comes before the .bz2 does factor into how Etcher treats it.

And, just to be clear: I'd expect etcher to unzip the .bz2 file, and burn its contents. Not burn the zipped file.

Yup, that's exactly what it does (unzip & flash the contained image)

@mpvader
Copy link

mpvader commented Apr 26, 2017

ahh.. thanks. Understood! looking forward to your fix then :)

@lurch
Copy link
Contributor

lurch commented May 3, 2017

@jhermsmeier Was this fixed by #1363 ? (is it worth adding any extra unit tests?)

@jhermsmeier
Copy link
Contributor

Only partially – there's another check in the GUI, which won't let you select unrecognised images – working on fixing that now.

@lurch
Copy link
Contributor

lurch commented May 3, 2017

But presumably that GUI-check will still allow @mpvader 's venus-image-rapsberrypi2.rpi-sdimg.bz2 file to be selected?

@jhermsmeier
Copy link
Contributor

@lurch oh yes, right, that should work already now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants