That is if it fails, proceed with conversion without it.
The current logic only supports shrinking a rootfs on BBB and RPi
devices (this is deducted from $raw_disk_counts) and calling
'disk_image_shrink_rootfs' would fail on 'qemux86_64' device.
Shrinking the rootfs is not a hard-requirement and is only an
optimization (mainly for RPi devices).
Changelog: None
Signed-off-by: Mirza Krak <mirza.krak@northern.tech>
This message has lately generated some confusion,
*** Data partition size set to default value: 128MB ***
1/9 Repartitioning raw disk image...
Detected raw disk image with 2 partition(s).
Calculating partitions' sizes of the Mender image.
Adjust Mender disk image size to the total storage size (2048MB).
Defined total storage size of MB is too small.
Minimal required storage is 60056MB. Aborting.
There are two things here that are hard to understand:
- Why does it not respect the 'storage-total-size-mb' setting of 2048MB?
- Where does the 60GB requirement come frome?
This normally happens if you have booted an image once on e.g Raspbian,
which will expand the rootfs to occupy the reamining blocks of the SD
card. And if you then do a "dd" dump of that image you will get that
expanded rootfs size. We normally recommend to run
"raw-disk-image-shrink-rootfs" on these type of images before
"from-raw-disk-image" command, which will ensure that the rootfs is
reduced in size.
To remedy the confusion here, simply run the
"raw-disk-image-shrink-rootfs" unconditionally when running
"from-raw-disk-image", this way it will not matter if the input image
has been "expanded" and the '--storage-total-size-mb' will always be
respected assuming that that the actual rootfs size does not overflow
the '--storage-total-size-mb' setting.
Because 'raw-disk-image-shrink-rootfs' is now a default, we also remove
the external command for this.
Changelog: shrink expanded rootfs when running "from_raw_disk_image"
Signed-off-by: Mirza Krak <mirza.krak@northern.tech>
This signficantly increases time to generate Artifacts,
but also significantly reduces the Artifact sizes.
Example (gzip, lzma) on 2019-04-08 Raspbian conversion:
* Size: 354M -> 224M (-37%)
* Compression time: 1min -> 10min (10x)
Changelog: Use LZMA for smaller Artifact size (but slower generation).
Signed-off-by: Eystein Måløy Stenberg <eystein.maloy.stenberg@northern.tech>
Note that --update (-u) option changed to --file (-f) in v3.
Changelog: Use mender-artfact v3. Requires rebuild of device-image-shell container.
Signed-off-by: Eystein Måløy Stenberg <eystein.maloy.stenberg@northern.tech>
-> fail fast, fail hard
Changelog: Fail the docker build when mandatory build-arg 'mender_client_version' is not set.
Signed-off-by: Simon Gamma <github@survive.ch>
otherwise the "secure-path" will override our carefully created path-variable
Changelog: Use same environment '$PATH' variable when using sudo
Signed-off-by: Simon Gamma <github@survive.ch>
otherwise the path variable is expanded at docker build time instead of at runtime when running the container.
Changelog: Expand existing environment '$PATH' variable instead of replacing it
Signed-off-by: Simon Gamma <github@survive.ch>
ARMv7 is backward compatible with ARMv6, so binaries compiled for ARMv6 should also work on ARMv7.
Changelog: Title
Issue: MEN-2399
Signed-off-by: Adam Podogrocki <a.podogrocki@gmail.com>
When installing the client, call "make install" from source directory
and then modify the default setup with the user input (tenant token,
server url, demo...), eliminating this way the duplication on the
install recipe.
Also, setting the default build version to 2.0.0 beta
Other minor changes along the way:
* Include liblzma build dependency
* Change --mender-client parameter to be optional
* Abort on error in convert-stage-4.sh
* Bugfix in getting server_cert from command line option
* Error reporting when using unsupported device
* Clean-up obsolete --help example
Changelog: Title
Signed-off-by: Lluis Campos <lluis.campos@northern.tech>
"--demo" should be possible to use with any server type.
Changelog: Allow to use "--demo" flag with any given server type
Signed-off-by: Mirza Krak <mirza.krak@northern.tech>
We had dependency because we where using an older U-boot version
which only compiled with gcc6. Since we now have updated to a
2018.xx bootloader we no longer have this limitation and we can
use binares in 'gcc-arm-linux-gnueabihf' upstream package
Changelog: Title
Signed-off-by: Mirza Krak <mirza.krak@northern.tech>
Note that there is not much actual code removed, but this commit
only removes the exposure to the user.
There is a big re-write incoming and is it not feasable to maintain
"convenience" commands that are exposed to the users. The expert
command paths are not tested in any automated fashion and the
likely hood of them breaking is pretty high.
We can always bring commands if there are requests from users.
Note that that the "raw-disk-image-shrink-rootfs" expert command is
promoted to a "General command" and is not removed. This has shown to
provide value to our users.
Changelog: Title
Signed-off-by: Mirza Krak <mirza.krak@northern.tech>
This is to sync up with the U-boot version that is in the latest
Yocto release. This will also resolve the requirement to run
gcc6, with 2018.07 we can build with gcc7 which is the default
in most distributions.
MEN-2198
Changelog: Title
Signed-off-by: Mirza Krak <mirza.krak@northern.tech>
To get rid of such errors/warnings as:
- mount: could not find any device /dev/loop#
- mount: ... WARNING: device write-protected, mounted read-only
access to host's kernel modules must be added.
Changelog: Title
Issues: MEN-2255
Signed-off-by: Adam Podogrocki <a.podogrocki@gmail.com>
Changelog: Title
- add notes about toolchain issue with rpi0w
- add note about issues with case sensitive filesystems
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
The "do_raw_disk_image_shrink_rootfs" changes permissions of input image
to "root:root" which requires that all commands are called with "sudo",
otherwise it produces an error:
$ ./mender-convert raw-disk-image-shrink-rootfs --raw-disk-image input/2018-11-13-raspbian-stretch-lite-expanded-16gb.img
*** Data partition size set to default value: 128MB ***
*** Total storage size set to default value: 8GB ***
1/1 Shrinking raw disk image root filesystem...
dumpe2fs 1.44.5 (15-Dec-2018)
resize2fs 1.44.5 (15-Dec-2018)
Root filesystem size:
minimal: 1441787904
aligned: 1442840576
sectors: 2818048
Raw disk image new endsector: 2916351
truncate: cannot open '/home/mirzak/src/mender-convert/input/2018-11-13-raspbian-stretch-lite-expanded-16gb.img' for writing:
Permission denied
Changelog: Fix permission denied error in when calling "mender-convert raw-disk-image-shrink-rootfs"
Signed-off-by: Mirza Krak <mirza.krak@northern.tech>
Calling "mender-convert raw-disk-image-shrink-rootfs" gave this:
$ ./mender-convert raw-disk-image-shrink-rootfs --raw-disk-image input/2018-11-13-raspbian-stretch-lite-expanded-16gb.img
*** Data partition size set to default value: 128MB ***
*** Total storage size set to default value: 8GB ***
1/1 Shrinking raw disk image root filesystem...
./mender-convert: line 191: local: `=': not a valid identifier
./mender-convert: line 191: local: `512': not a valid identifier
./mender-convert: line 201: 98304 * : syntax error: operand expected (error token is "* ")
Changelog: Fix syntax error when calling "mender-convert raw-disk-image-shrink-rootfs"
Signed-off-by: Mirza Krak <mirza.krak@northern.tech>
Select demo default intervals with new --demo CLI option, else use
production defaults (updated in parallel in MEN-2248)
Changelog: Title
Signed-off-by: Lluis Campos <lluis.campos@northern.tech>