From patchwork Tue Dec 13 10:02:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Roberto A. Foglietta" X-Patchwork-Id: 2290 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Tue, 13 Dec 2022 11:02:12 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-pl1-f189.google.com (mail-pl1-f189.google.com [209.85.214.189]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 2BDA2Avn000436 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 13 Dec 2022 11:02:11 +0100 Received: by mail-pl1-f189.google.com with SMTP id b17-20020a170903229100b00189da3b178bsf12693283plh.7; Tue, 13 Dec 2022 02:02:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1670925724; cv=pass; d=google.com; s=arc-20160816; b=k0H/FfjeSrNaTLO4rMikH3Tnk9TywrJUAhwCsGG5LrhSxjer/V1I/sRRaagL6QP5Wx BS4Rk0QBC3N+SY224FYyitsFKjpa0HHudggRzsxcZKnhGo/sMKjh0KTmkjGKMcMr6n6/ R/Bus6GbBAdJUQMH3AUnXKMW9LjEbuUUza0frIMqlqsl69BKycWOsvvx5JjHfZDZeAwt 2LodrrEfhhjGPiayv6uBvPY/D4/75/cXvNnx/LZPXYrPUYUX9Wh0lU6nN0NTJED90T9V XAWQWSL/6F4kLnVqmCo8q/KGSBG8VLBn44hHgNt4HJEaW9d0eju8PtKSDDgpdfQP5PGi Le1w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-subscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:list-unsubscribe:cc:to :reply-to:message-id:subject:date:from:sender:dkim-signature; bh=jn6lA3YMp5RdN/u0nrb7ZCCf7mkpQe86v//R6pZRC/4=; b=fwxunAu5L+KN76C4JuwZJJA1F4VuPBGe9IjAgO8qOuQSI1y+30A22WXx28YAGhPWau ZdoQgHTa1jYgptjXRXilXuchzxsAYpb/bdghKbNXdOmx/Yf7dAIZI1OG2tCVybLktQjr RHGEyRj6vFg9GAHLb/gvpUDjFFjuID4ytG4z37n7ycBEn+hElHhxykONxFUGoNlPnMlt Fj0+g+o80FYGTCQRmddr1rmN5vJEMLLMa4qqnmQTkCO6Q9L0abJ2m1W5cTGU4lt6CIJs mGhM0DvR09NTu5QJfL8Vu8YuvZg76y+CDE/ATrIn7Fodxcx8gFq0LZW4fFTRzdB+Y3j6 ZIJA== ARC-Authentication-Results: i=2; 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=list-subscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:list-unsubscribe:cc:to:reply-to :message-id:subject:date:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=jn6lA3YMp5RdN/u0nrb7ZCCf7mkpQe86v//R6pZRC/4=; b=FZWEvr+XpektHNJyDLeqFtlnPePfsQly+/alnc/pDpyGv4944KZ7tRGTMZzfFFAZgb 6gAY+MoFScaOyVUWTMsOE84trG0LPL2Mlt4m60bJRl8mj6bnIaVOrL6ma7Nm5/LxHIBn V7E+8Awrd1SJxROzpqTHX2cDAUGEX9D4+Hl6dk+ayMUG1TmdUMCNc6/9mh4V3VCPLhJn 0bAaBKstNjyoLhcal9imFmUXGenuaG05mUXFZbehxBCDQv+q+Stfr6mAi9phqsCfTDHO KOtDV68vCfjPGGX/rBeQBie0zMmpvSxB1sUz/ObaXztbEmfNmAd6aZba5ncP/R851cJV IBWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :list-unsubscribe:cc:to:reply-to:message-id:subject:date:from :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to; bh=jn6lA3YMp5RdN/u0nrb7ZCCf7mkpQe86v//R6pZRC/4=; b=6/+QVaaYDg8gPtiZtO+QI+5Y5NDeuCedhVM6gW0C73g3CJ3yDEW3RPd/J+1SNtOnUt be25O5qIHMBpJ8hSbSFhyPQKXNzYm1UbjQBq7HUaoDCwjGWXeCucaZdp+tsaqQxu1Bas AX51uP2LfMmxHGMtmzR4hRl9V0BPIDcLMUf4CQeUx6QjF+y/dm9QZqdSmBcFMPwJhghP NmeUz/Woo9pxkwkoCrCKCYsuWwOE4jrBAkgkAA2f1ci1dFH34jEBGX0zdRV5ZFLdtC3S M86kYz26sxo+WJHhaQhM/IhmFS47+rWSS4LU0gbPaleaznJta+FMEvH6unRXMcihKpcb aGAQ== Sender: isar-users@googlegroups.com X-Gm-Message-State: ANoB5pn6AHKncHw2dcJyfTSPvTFHjT2rj8M5cWPcSfmCS+/xP2G0Jr8F enWM0PAF8+TOZPKcvKF6mQ8= X-Google-Smtp-Source: AA0mqf5B1gKMQsB0QW6mZY5Es2n1jPohCeySYngrXAgBT1673Qrgd2jsO3OjpXp7i4yIpzbuahbSng== X-Received: by 2002:a17:90a:c7d8:b0:219:e3de:676f with SMTP id gf24-20020a17090ac7d800b00219e3de676fmr322804pjb.80.1670925724713; 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-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 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; 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: , X-Msg-EID: eizjPviESOh2DH18MuEjrw2 MIME-Version: 1.0 X-Original-Sender: roberto.foglietta@gmail.com X-Original-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 Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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