Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/balena-os/balena-image-flasher-unwrap
Tool for unwrapping balena-image from a balena-image-flasher
https://github.com/balena-os/balena-image-flasher-unwrap
balena balena-io balena-os balenaos
Last synced: about 1 month ago
JSON representation
Tool for unwrapping balena-image from a balena-image-flasher
- Host: GitHub
- URL: https://github.com/balena-os/balena-image-flasher-unwrap
- Owner: balena-os
- License: apache-2.0
- Created: 2017-07-19T14:26:23.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-05-30T17:47:21.000Z (over 1 year ago)
- Last Synced: 2023-08-10T00:55:39.589Z (over 1 year ago)
- Topics: balena, balena-io, balena-os, balenaos
- Language: Shell
- Homepage: https://balena.io
- Size: 36.1 KB
- Stars: 7
- Watchers: 2
- Forks: 3
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# balena-image-flasher-unwrap
BalenaOS distinguishes between devices that can boot directly a raw image programmed into a SD card or USB disk, and those that boot a flasher image from SD card or USB which then programs the image it encloses into some internal storage like a eMMC.
The second is referred to as a balena-image flasher and contains a balena-image.
This small tool provides the ability to get the embedded balena image in a balena image flasher and configures it accordingly.
## How to use
This tool can be easily ran by either using the prebuilt docker image or running the `balena-image-flasher-unwrap` script directly. We strongly encourage using the prebuilt docker image (i.e `docker-run` method) to make sure that the script dependency requirements are met.
### Run it with docker
Run `docker-run` or adapt it based on your needs. It takes one argument (the
absolute path of the flasher image) and outputs, in the `output` directory, the
balena image.#### Usage examples
Balena device types can either boot a balena-image directly, or boot a flasher
image that on boot flashes the balena-image it contains.To unwrap the balena image from a balena image flasher image:
./docker-run /path/to/balena.img
This action results in an image in the output directory that can be directly
flashed using Etcher.To convert it into a different format to use in emulators, specify the image
format as extra arguments:./docker-run /path/to/balena.img -F vmdk
You can optionally set the image size to a new value in bytes (see qemu-img man page for details):
./docker-run /path/to/balena.img -F vmdk -s
### Run the script directly
The script needs to be ran as root because it creates loop devices and mounts
them afterwards. For more information about all the arguments supported, run
the main script (`balena-image-flasher-unwrap`) with `--help`.## Contributions
Want to contribute? Great! Throw pull requests at us.