From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7175185077837496320 X-Received: by 2002:a05:6000:18e:b0:241:b95c:5c9 with SMTP id p14-20020a056000018e00b00241b95c05c9mr17741586wrx.154.1670602960863; Fri, 09 Dec 2022 08:22:40 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:600c:3b17:b0:3d1:be63:3b63 with SMTP id m23-20020a05600c3b1700b003d1be633b63ls6600463wms.1.-pod-canary-gmail; Fri, 09 Dec 2022 08:22:39 -0800 (PST) X-Google-Smtp-Source: AA0mqf54ziv5bWoVMOBOVCP9et5SVpuHAASfKZx5QGn5DqwapKDFhIXmFk18+Vk3t1mfVkt1VE58 X-Received: by 2002:a05:600c:310e:b0:3cf:b07a:cd2f with SMTP id g14-20020a05600c310e00b003cfb07acd2fmr5634163wmo.37.1670602959797; Fri, 09 Dec 2022 08:22:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670602959; cv=none; d=google.com; s=arc-20160816; b=Hdc+7OquJ3KvGZMaJq+te9Iyv3ly2+nmPUtzNnPET0IXDdVhrZq4JICuaU4Z4WE0Ll rTrnCJkFHogwusj2awUTZKL7km3AOFE6paUM5FC6a88+mRWsvz7+6hbonKN3P5/y8W4X 8rsfjbRyIAOV0kYK7lnUJkCHOG/UBcJtxTCNKGhg6423rGV6gqk3/lW2/CDeaSn+DXVv 9qVDZ2L17cVdZ5R6JJynoJnpNSOZdhum9ZiMgi9LqHmBnN9lx/l5ADVzElFTQEt0l9oo SsfEyY4TPX2WrXkxWrhmqjWuQycHt8OecUP3ALfjF9S8vO2+2cUziv01rDTbJMVXWNRR dMgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=feedback-id:content-transfer-encoding:mime-version:message-id:date :subject:cc:to:from:dkim-signature; bh=SGba0HJdz3VH8Tf8cvJl3kV2Ck2LhLd0iLTCjFo42RE=; b=N3BeGq95CkrrKrZuyvhJrBq/g4b8QURAnOnJCOAofUjR4Njo07STF9SDlH9XPbL+LG xmBKKKhSwSE9e63Gw/B6d4L+4VGTBpZpcmuvBZEqPUtb8ZADXcig3YBY7ho7T2vM4xBR 0lDccq3GLMlkRLgT/VcaTLwI969oYwWwOVMhnP5KZoDjlWo5Q22TQexrtn6HtnivcUjt 0KYB5pwvAveytNTtks4iwPGs5JEYjjmfCzI07/xNgialJKJA3M5qldr3jjgHwAUfoBFP m2enXxAejKCjJHncMuJeXc7EaxVTCnNzxKIDhnk0RcS3mYCoAPLpQbDk9YPBok1+jDcO SJZw== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=U3yrfeew; spf=pass (google.com: domain of fm-52304-20221209162239450161d61d50424c32-x9xk0u@rts-flowmailer.siemens.com designates 185.136.64.228 as permitted sender) smtp.mailfrom=fm-52304-20221209162239450161d61d50424c32-x9xk0u@rts-flowmailer.siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from mta-64-228.siemens.flowmailer.net (mta-64-228.siemens.flowmailer.net. [185.136.64.228]) by gmr-mx.google.com with ESMTPS id m187-20020a1ca3c4000000b003d1d8d3577dsi562760wme.2.2022.12.09.08.22.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Dec 2022 08:22:39 -0800 (PST) Received-SPF: pass (google.com: domain of fm-52304-20221209162239450161d61d50424c32-x9xk0u@rts-flowmailer.siemens.com designates 185.136.64.228 as permitted sender) client-ip=185.136.64.228; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=U3yrfeew; spf=pass (google.com: domain of fm-52304-20221209162239450161d61d50424c32-x9xk0u@rts-flowmailer.siemens.com designates 185.136.64.228 as permitted sender) smtp.mailfrom=fm-52304-20221209162239450161d61d50424c32-x9xk0u@rts-flowmailer.siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: by mta-64-228.siemens.flowmailer.net with ESMTPSA id 20221209162239450161d61d50424c32 for ; Fri, 09 Dec 2022 17:22:39 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm1; d=siemens.com; i=henning.schild@siemens.com; h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Cc; bh=SGba0HJdz3VH8Tf8cvJl3kV2Ck2LhLd0iLTCjFo42RE=; b=U3yrfeewIJdQd5sJz0JBMaOrsWG8FXpp+MekIER6bQGGb0hlaANfuSMUePYfBvELEMmNwW bA3j1JvE+oPuaVnHJq9MtOs5cYfNWrqrk2O6MK9L/btaUKzi7YCOYVkRhgzQX6iMTWLMTbCg yXuFayuvFgat9iFGvNys7qHbedz8g=; From: henning.schild@siemens.com To: isar-users@googlegroups.com Cc: Tobias Schaffner , felix.moessbauer@siemens.com, jan.kiszka@siemens.com, Henning Schild Subject: [PATCH] expand-on-first-boot: switch back away from systemd-growfs Date: Fri, 9 Dec 2022 17:22:37 +0100 Message-Id: <20221209162237.13420-1-henning.schild@siemens.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-52304:519-21489:flowmailer X-TUID: BW256txEO9K0 From: Henning Schild systemd-growfs in some versions has runtime deps on symlinks created by udev and we have a race there that shows especially on smaller/slower devices. We had patches dealing with that but they ended up looking rather complex. The gain of systemd-growfs is potentially a bunch more filesystems. But we can add them as well in sort of a switch-case. We never used it the way it is intended because it did not really fit, so better not use it. Signed-off-by: Henning Schild --- ...oot_1.2.bb => expand-on-first-boot_1.3.bb} | 0 .../files/expand-last-partition.sh | 26 ++++--------------- 2 files changed, 5 insertions(+), 21 deletions(-) rename meta/recipes-support/expand-on-first-boot/{expand-on-first-boot_1.2.bb => expand-on-first-boot_1.3.bb} (100%) diff --git a/meta/recipes-support/expand-on-first-boot/expand-on-first-boot_1.2.bb b/meta/recipes-support/expand-on-first-boot/expand-on-first-boot_1.3.bb similarity index 100% rename from meta/recipes-support/expand-on-first-boot/expand-on-first-boot_1.2.bb rename to meta/recipes-support/expand-on-first-boot/expand-on-first-boot_1.3.bb diff --git a/meta/recipes-support/expand-on-first-boot/files/expand-last-partition.sh b/meta/recipes-support/expand-on-first-boot/files/expand-last-partition.sh index 57055ccdcbd8..93eddda2a3b7 100755 --- a/meta/recipes-support/expand-on-first-boot/files/expand-last-partition.sh +++ b/meta/recipes-support/expand-on-first-boot/files/expand-last-partition.sh @@ -57,29 +57,13 @@ sfdisk -d "${BOOT_DEV}" 2>/dev/null | \ # Inform the kernel about the partitioning change partx -u "${LAST_PART}" -# this is for debian stretch or systemd < 236 -if [ ! -x /lib/systemd/systemd-growfs ]; then - # Do not fail resize2fs if no mtab entry is found, e.g., - # when using systemd mount units. - export EXT2FS_NO_MTAB_OK=1 - - resize2fs "${LAST_PART}" - exit 0 -fi - if grep -q x-systemd.growfs /etc/fstab; then - echo "Found x-systemd.growfs option in /etc/fstab, won't call it explicitly." >&2 + echo "Found x-systemd.growfs option in /etc/fstab, won't grow." >&2 exit 0 fi -# mount $LAST_PART out of tree, so we won't conflict with other mounts -MOUNT_POINT=$(mktemp -d -p /mnt "$(basename "$0").XXXXXXXXXX") -if [ ! -d "${MOUNT_POINT}" ]; then - echo "Cannot create temporary mount point ${MOUNT_POINT}." >&2 - exit 1 -fi +# Do not fail resize2fs if no mtab entry is found, e.g., +# when using systemd mount units. +export EXT2FS_NO_MTAB_OK=1 -mount "${LAST_PART}" "${MOUNT_POINT}" -/lib/systemd/systemd-growfs "${MOUNT_POINT}" -umount "${MOUNT_POINT}" -rmdir "${MOUNT_POINT}" +resize2fs "${LAST_PART}" -- 2.37.4