Fixes MEN-5078
According to `ln` man page, the correct way to create a link on a
directory is with `ln [OPTION]... TARGET... DIRECTORY`.
Create first `DIRECTORY`, and then use the above form for the link. This
way a successive run of `ln ...` will not end up creating a
`.../mender/mender` kind of link.
Changelog: Title
Signed-off-by: Lluis Campos <lluis.campos@northern.tech>
(cherry picked from commit 3a031bffbb)
This moves the device configuration to a config script in configs/, from the
previous setup in the bootstrap scripts.
It does so by creating a new resources/ folder in the top-level directory, which
is then populated with the configuration file, and the server parameters only.
When the conversion is run with the demo configuration
configs/mender_convert_demo_config the conversion will install all the add-on's
available, and modify the configuration file in resources to align with our
regular Mender demo configuration.
Changelog: Add a demo configuration in configs/mender_convert_demo_config which
when added at run time creates a Mender demo setup in the converted image. This
includes short polling intervals, and all add-on's installed by default.
Signed-off-by: Ole Petter <ole.orhagen@northern.tech>
This adds the:
* `MENDER_CLIENT_INSTALL` option, to allow an image to come without the
mender-client installed by default.
The option is on by default, but turned off for the custom image configuration
we use for building the images we provide as a part of our documentation onboarding.
Changelog: Added an option `MENDER_CLIENT_INSTALL=y/n`, in order to
configure the installation of the Mender client into the converted image.
Defaults to `yes`.
Signed-off-by: Ole Petter <ole.orhagen@northern.tech>
Signed-off-by: Lluis Campos <lluis.campos@northern.tech>
Changelog: Always create symlinks from `/var/lib/mender-configure` to
`/data/mender-configure`. They always need to installed in a
rootfs-image prepared image, even if the software isn't, because if
the package is installed later, the links must be present or it will
act as if it is a non-rootfs image, and store the settings on the
rootfs partition, when they should be stored on the data partition.
Signed-off-by: Kristian Amlie <kristian.amlie@northern.tech>
Changelog: Support installing mender-configure addon. Not installed by
default, it can be configured using MENDER_ADDON_CONFIGURE_INSTALL and
MENDER_ADDON_CONFIGURE_VERSION variables.
Changelog: Set mender-configure version to master
Signed-off-by: Lluis Campos <lluis.campos@northern.tech>
As this value is known during modify but not during package, a new
testscfg module has been implemented to take care of adding variables
and exporting the final cfg file.
Changelog: None
Signed-off-by: Lluis Campos <lluis.campos@northern.tech>
The 'rmdir' call should be enough, and just because there is an
empty dir in the boot part, does not mean that it exists in
rootfs/boot, so just remove this.
Changelog: Fix error when removing empty directories in rootfs/boot
Signed-off-by: Mirza Krak <mirza.krak@northern.tech>
The current checks will not work when multiple options are used. Ignore
the '-O ' and check only for the option values.
Changelog: None
Signed-off-by: Drew Moseley <drew.moseley@northern.tech>
Making more explicit the two different use cases that the previous
optional arguments were trying to support.
Changelog: None
Signed-off-by: Lluis Campos <lluis.campos@northern.tech>
Changelog: Support installing mender-shell addon. Not installed by
default, it can be configured using MENDER_ADDON_SHELL_INSTALL and
MENDER_ADDON_SHELL_VERSION variables.
Changelog: Set mender-shell version to master
Changelog: Create demo configuration for Mender Shell addon in
bootstrap-rootfs-overlay-demo-server.sh script
Signed-off-by: Lluis Campos <lluis.campos@northern.tech>
Add a deb module with reverse engineered logic to download a given deb
package from an APT repository, and modify mender-client download to use
this method instead of the legacy wget direct download.
Changelog: None
Signed-off-by: Lluis Campos <lluis.campos@northern.tech>
The latest package does not have the Debian version suffixed.
Therefore, simply remove it in the case where it is needed.
Changelog: None
Signed-off-by: Ole Petter <ole.orhagen@northern.tech>
As probe_initrd_in_boot_and_root indicates, this is not always required.
Adding the check for the ln not to throw an error.
Changelog: None
Signed-off-by: Lluis Campos <lluis.campos@northern.tech>
... not just for EFI configuration. This doesn't fix any immediate
problems, but some U-Boot configurations seem to make a reference to
this, so this is just being proactive.
Changelog: None
Signed-off-by: Kristian Amlie <kristian.amlie@northern.tech>
Because we hardcode the name in the boot loader script, you can never
upgrade to a kernel with a different version string. Fix by using a
generic name and symlinking instead.
Changelog: Title
Signed-off-by: Kristian Amlie <kristian.amlie@northern.tech>
Changelog: Warn user when converting read-only file systems that would
result in unstable checksums, making the image incompatible with Mender
Delta updates.
Signed-off-by: Lluis Campos <lluis.campos@northern.tech>
Changelog: Title
CentOS 8 converted image cannot boot to login shell:
user: no shell: permission denied
It turns out that issue was caused by selinux. Idea for relabeling rootfs
was inspired by this post:
https://forums.centos.org/viewtopic.php?t=48714
Removing of /.autorelabel after action is done automatically and it's necessary.
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
- Issue: #MEN-3725
The following new config variables have been added which closely mirror those used in meta-mender
to give fine grained controll over partition device paths. If partuuid support is enabled then
these partition variables must be used as format doesnt fit device/number variables scheme.
If partuuid support is disabled then partition variables are optional liek in meta-mender.
MENDER_ENABLE_PARTUUID
MENDER_BOOT_PART
MENDER_ROOTFS_PART_A
MENDER_ROOTFS_PART_B
MENDER_DATA_PART
Example:
MENDER_BOOT_PART="/dev/disk/by-partuuid/26445670-f37c-408b-be2c-3ef419866620" #gpt
MENDER_BOOT_PART="/dev/disk/by-partuuid/26445670-01" #dos
MENDER_BOOT_PART="/dev/sda1" #partuuid support disabled
Changelog: Partition UUID support added for gpt/dos partition tables for deterministic booting
Signed-off-by: Dell Green <dell.green@ideaworks.co.uk>
This information is not used when loading via UEFI, instead it is
queried directly from the UEFI provider.
Changelog: Commit
Signed-off-by: Kristian Amlie <kristian.amlie@northern.tech>
This extends the current functionality of the platform_ function
functionality into using hooks, so that each modification step can be called
from multiple configuration files.
The valid hooks are:
* PLATFORM_MODIFY_HOOKS
* PLATFORM_PACKAGE_HOOKS
* USER_LOCAL_MODIFY_HOOKS
and can be appended to as a regular bash array.
Changelog: Commit
Signed-off-by: Ole Petter <ole.orhagen@northern.tech>
This is important so that the bootloader (U-Boot) can use the DTB
files when chainloading GRUB via UEFI. The logic for doing this is
already present in `distro_bootcmd`, but because we were not placing
the DTB files in the correct folder, this part was skipped.
Changelog: Fix certain kernels hanging on boot. In particular, recent
versions of Debian for Beaglebone was affected, but several other
boards using UEFI may also have been affected.
Signed-off-by: Kristian Amlie <kristian.amlie@northern.tech>
Previously there was a mix between two, and four spaces.
This commits unifies all scripts to use two-spaces for indentation.
Changelog: None
Signed-off-by: Ole Petter <ole.orhagen@northern.tech>
Previously some scripts were calling env and bash, some were only calling bash.
This commit unifies the scripts to all use `#! /usr/bin/env bash`
Changelog: None
Signed-off-by: Ole Petter <ole.orhagen@northern.tech>