From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7176360366364950528 X-Received: by 2002:a63:941:0:b0:479:5c11:629d with SMTP id 62-20020a630941000000b004795c11629dmr313240pgj.536.1670925724794; Tue, 13 Dec 2022 02:02:04 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:90a:1d4a:b0:214:246b:918a with SMTP id u10-20020a17090a1d4a00b00214246b918als22052671pju.2.-pod-canary-gmail; Tue, 13 Dec 2022 02:02:04 -0800 (PST) X-Google-Smtp-Source: AA0mqf4v7TlfYXAz7tPGvdU0aHBLVl54xFhnMTf41eyludE2uEDz92HtfCMvmSI44yDHVQLnYpEy X-Received: by 2002:a17:90a:4e47:b0:221:3eb1:c277 with SMTP id t7-20020a17090a4e4700b002213eb1c277mr11154675pjl.47.1670925723906; Tue, 13 Dec 2022 02:02:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670925723; cv=none; d=google.com; s=arc-20160816; b=vzyP10O1z2lxg+bdCDDVeh6hdHl9t/0IzAw0tvDRFhd6qzHbmS3tJYEWya7h9+R2GP 9M+5Ubat8ykJYMl3vHTSHYXnI2VLHMJww2T0zRlbE1Uyvi1xuPsIP6dE8jGx+rD/fo5k UDBkA5vot5nhHXphgMleDLFBakip9SQKVrnytH/b2y2PJHeR1w4I6PfBq3bs7sSusmWB 64l2GMfjrQORAPYGrzTod3axkXgs4CWvlrm5CwcOQZCifeQASxLBEDm0XJbgZs1iKtgN +oqRHw7bl2OOT66gLfg44sHfnlfKzG4VhJmV91CsOf3YOzeIc3peampA8b1FrwytcOQz EZmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe:cc:to :reply-to:message-id:subject:date:from; bh=pYFquIOdmEOfo/VykTbdvhNGLlFF4S5NZfCu0fTSijo=; b=VdIBQAgP4R/PdYHFM4ntl0Cca/THE9IPCSSoLZSBndyeuHbxhM/sIZkA4ZLMX2LkEs cd702cHiYpo2WbKWs5F5L5vOeGK9xx1xYRIRg2/+CU9JgrTpseP5PZOltnORtpK3gxmu ybIAUgYK0sboIJsrLr1M8/7AmARP/GRLcVCd1kK1aaUtrllTIWu0k4cyVMHh12Lr2QGn d6fdRQEouTDqvXpCH1mWLeZrcD6ZC6rhICmxcJzjouXkjWi5A4sSWG7BRWn4rGYA8kV5 Z9tYxwwQJpYizwfj3w12t4bOfVtgEpoPfffmsfVVRBaxs/TB1jr288emq5WQTF8rW++y mljA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of bounces+eizjpviesoh2dh18muejrw2@bounces.elasticemail.net designates 216.169.99.3 as permitted sender) smtp.mailfrom=bounces+eizjPviESOh2DH18MuEjrw2@bounces.elasticemail.net; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from pn3.mxout.mta2.net (pn3.mxout.mta2.net. [216.169.99.3]) by gmr-mx.google.com with ESMTPS id fy20-20020a17090b021400b002195f5f3923si41640pjb.1.2022.12.13.02.02.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Dec 2022 02:02:03 -0800 (PST) Received-SPF: pass (google.com: domain of bounces+eizjpviesoh2dh18muejrw2@bounces.elasticemail.net designates 216.169.99.3 as permitted sender) client-ip=216.169.99.3; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of bounces+eizjpviesoh2dh18muejrw2@bounces.elasticemail.net designates 216.169.99.3 as permitted sender) smtp.mailfrom=bounces+eizjPviESOh2DH18MuEjrw2@bounces.elasticemail.net; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com From: roberto.foglietta@gmail.com Date: Tue, 13 Dec 2022 10:02:01 +0000 Subject: [PATCH v2] In expand last partition wait for udev have finished Message-Id: <4uin8tunpiug.eizjPviESOh2DH18MuEjrw2@16F0H.trk.elasticemail.com> Reply-To: roberto.foglietta@gmail.com To: isar-users@googlegroups.com Cc: roberto.foglietta@gmail.com List-Unsubscribe: =?us-ascii?q?=3Cmailto=3Aunsubscribe+eizjPviESOh2DH18MuEjrw2=40bounces=2Eelasticem?= =?us-ascii?q?ail=2Enet=3Fsubject=3Dunsubscribe=3E=2C?= =?us-ascii?q?_=3Chttp=3A=2F=2F16F0H=2Etrk=2Eelasticemail=2Ecom=2Ftracking=2Funsubscribe=3Fmsgid?= =?us-ascii?q?=3DeizjPviESOh2DH18MuEjrw2&c=3D1588198146759178339=3E?= X-Msg-EID: eizjPviESOh2DH18MuEjrw2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-TUID: feyMA8HE/4MD From: "Roberto A. Foglietta" bugfix, expand last partition, wait for udev completion On some hardware the udev did not created the links to the disk partitions while this script is working thus it fails. This patch fixes that cases. v2: as underlined by Tobias this script requires systemd-udevd.service and it can safely runs only after that service has been started otherwise might fail. This dependency will reorder the boot procedure but not slow down it unless the hardware is slow to get mapped by udev but in that case resize the last partition would have failed. Thus, no regression are expected. Signed-off-by: Roberto A. Foglietta --- .../expand-on-first-boot/files/expand-last-partition.sh | 2 ++ .../expand-on-first-boot/files/expand-on-first-boot.service | 2 ++ 2 files changed, 4 insertions(+) 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 57055cc..4d55645 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 @@ -9,6 +9,8 @@ set -e +udevadm settle + ROOT_DEV="$(findmnt / -o source -n)" ROOT_DEV_NAME=${ROOT_DEV##*/} ROOT_DEV_SLAVE=$(find /sys/block/"${ROOT_DEV_NAME}"/slaves -mindepth 1 -print -quit 2>/dev/null || true) diff --git a/meta/recipes-support/expand-on-first-boot/files/expand-on-first-boot.service b/meta/recipes-support/expand-on-first-boot/files/expand-on-first-boot.service index fda5001..2c120c4 100644 --- a/meta/recipes-support/expand-on-first-boot/files/expand-on-first-boot.service +++ b/meta/recipes-support/expand-on-first-boot/files/expand-on-first-boot.service @@ -7,7 +7,9 @@ Description=Expand last partition DefaultDependencies=no Conflicts=shutdown.target +Requires=systemd-udevd.service After=systemd-remount-fs.service +After=systemd-udevd.service Before=local-fs-pre.target shutdown.target ConditionPathIsReadWrite=/etc -- 2.34.1 https://16F0H.trk.elasticemail.com/tracking/unsubscribe?d=q_kIGyOJgB5ctY2LrVKQFoWVVTXwBkuuDlwZYowLodqyXtsU-X2HAOBx1Rv6h0ZVk2ea8hHvOWQDQ9gI3kAT55VXnKtu2F0n5IcwTuZQRMRH0