From: "Roberto A. Foglietta" <roberto.foglietta@gmail.com>
To: isar-users@googlegroups.com
Cc: joe_macdonald@mentor.com, Henning Schild <henning.schild@siemens.com>
Subject: [PATCH] In expand last partition wait for udev have finished
Date: Mon, 12 Dec 2022 21:33:23 +0100 [thread overview]
Message-ID: <CAJGKYO7Na2WK+h-XFAO=zJcX2reJqpUD1rLUkGOSDLDX9ibMdg@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 828 bytes --]
Hi all,
this patch add a simple command at the beginning of the expand last
partition script
udevadm settle
this command connects with the running udev and waits until it has
finished its work.
Why is this simple line supposed to solve the problem? My opinion -
an opinion because I do not have such hardware to test this patch - is
that some hardware is too slow dealing with some devices to let udev
complete his job before this script runs. This supposes that the udev
is running at that time. So you might need an extra check about it or
udev could even started at that time but later. Obviously, without
udev or something equivalent to populate /dev any operations with
devices is unfeasible.
It has been sent with git send-email by elastic mail as usual and it
went into moderation, as usual.
Best regards, R-
[-- Attachment #2: 0001-In-expand-last-partition-wait-for-udev-have-finished.patch --]
[-- Type: text/x-patch, Size: 1203 bytes --]
From 357f8d178a571ff9cdd8e8e6aa43a321d5ee888a Mon Sep 17 00:00:00 2001
From: "Roberto A. Foglietta" <roberto.foglietta@gmail.com>
Date: Mon, 12 Dec 2022 21:14:26 +0100
Subject: [PATCH] In expand last partition wait for udev have finished
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.
Signed-off-by: Roberto A. Foglietta <roberto.foglietta@gmail.com>
---
.../expand-on-first-boot/files/expand-last-partition.sh | 2 ++
1 file changed, 2 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 acfef8a..68e6698 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)
--
2.34.1
next reply other threads:[~2022-12-12 20:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-12 20:33 Roberto A. Foglietta [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-12-12 20:23 roberto.foglietta
2022-12-13 2:01 ` Moessbauer, Felix
2022-12-13 8:44 ` Schaffner, Tobias
2022-12-13 10:03 ` Roberto A. Foglietta
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAJGKYO7Na2WK+h-XFAO=zJcX2reJqpUD1rLUkGOSDLDX9ibMdg@mail.gmail.com' \
--to=roberto.foglietta@gmail.com \
--cc=henning.schild@siemens.com \
--cc=isar-users@googlegroups.com \
--cc=joe_macdonald@mentor.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox