From 5a4ae748c4c71ff4c8b0412536d425d35ca3ff28 Mon Sep 17 00:00:00 2001 From: Itxaka Date: Wed, 22 Feb 2023 12:24:12 +0100 Subject: [PATCH] Set default values for recovery Otherwise we have a broken recovery if something touches the cos-layout file Signed-off-by: Itxaka --- overlay/files/system/oem/11_persistency.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/overlay/files/system/oem/11_persistency.yaml b/overlay/files/system/oem/11_persistency.yaml index 533dfd4122..8e31445748 100644 --- a/overlay/files/system/oem/11_persistency.yaml +++ b/overlay/files/system/oem/11_persistency.yaml @@ -36,6 +36,14 @@ stages: /usr/share/pki/trust/anchors /var/lib/ca-certificates PERSISTENT_STATE_BIND: "true" + - if: '[ -f "/run/cos/recovery_mode" ]' + name: "Layout configuration for recovery" + environment_file: /run/cos/cos-layout.env + # We omit COS_PERSISTENT here and have no RW_PATHS, or BINDS + # RW_PATHS will be set to the default, which works for recovery + environment: + VOLUMES: "LABEL=COS_OEM:/oem" + OVERLAY: "tmpfs:25%" - if: '[ -r /run/cos/custom-layout.env ] && [ ! -f "/run/cos/recovery_mode" ] && [ ! -f /run/cos/live_mode ]' name: "append custom bind and ephemeral mounts to /run/cos/cos-layout.env" commands: