From 95cbe6d4ae7edb0ab0ac7409c2e0f591b8983f06 Mon Sep 17 00:00:00 2001 From: Kai Lueke Date: Tue, 26 Sep 2023 11:17:55 +0200 Subject: [PATCH 1/2] Correct unshare mount command for listing /etc Unshare expects a single command with arguments but the "sh -c" was forgotten here. --- docs/setup/releases/update-strategies.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup/releases/update-strategies.md b/docs/setup/releases/update-strategies.md index 979c2649..f4466753 100644 --- a/docs/setup/releases/update-strategies.md +++ b/docs/setup/releases/update-strategies.md @@ -305,7 +305,7 @@ sudo git diff --no-index /usr/share/flatcar/etc /etc You can also see what files got created under the real `/etc` with the following commands: ```sh -sudo unshare -m "umount /etc; ls -lahR /etc" +sudo unshare -m sh -c "umount /etc; ls -lahR /etc" ``` ### Configure a post-install update hook From 43a46a62e8943b16f2f4499d21e216e0da2a353f Mon Sep 17 00:00:00 2001 From: Kai Lueke Date: Tue, 26 Sep 2023 11:22:49 +0200 Subject: [PATCH 2/2] sysext: Add debugging commands When unsure what files an image ships or why the image is not compatible it can help to list the image contents or show the debug output from the matching. --- docs/provisioning/sysext/_index.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/provisioning/sysext/_index.md b/docs/provisioning/sysext/_index.md index 273d79cc..3d29130e 100644 --- a/docs/provisioning/sysext/_index.md +++ b/docs/provisioning/sysext/_index.md @@ -184,4 +184,19 @@ systemd: This configuration will enable the `systemd-sysupdate.timer` unit that will check every 2-6 hours for a new Docker sysext image available from the latest release of [`sysext-bakery`][sysext-bakery]. Use `arm64` instead of `x86-64` for arm64 machines. +## Debugging + +You can list the contents of a systemd-sysext image like this (assuming an image without dm-verity): + +``` +sudo unshare -m sh -c "mount docker-compose-2.18.1.raw /tmp && cd /tmp && find ." +# Remember that only the "usr" or "opt" folder will be used for the overlay +``` + +To get more information about found incompatibilities during merging, enable the debug output: + +``` +sudo SYSTEMD_LOG_LEVEL=debug systemd-sysext refresh +``` + [sysext-bakery]: https://github.com/flatcar/sysext-bakery