public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] In expand last partition wait for udev have finished
@ 2022-12-12 20:33 Roberto A. Foglietta
  0 siblings, 0 replies; 5+ messages in thread
From: Roberto A. Foglietta @ 2022-12-12 20:33 UTC (permalink / raw)
  To: isar-users; +Cc: joe_macdonald, Henning Schild

[-- 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


^ permalink raw reply	[flat|nested] 5+ messages in thread
* [PATCH] In expand last partition wait for udev have finished
@ 2022-12-12 20:23 roberto.foglietta
  2022-12-13  2:01 ` Moessbauer, Felix
  0 siblings, 1 reply; 5+ messages in thread
From: roberto.foglietta @ 2022-12-12 20:23 UTC (permalink / raw)
  To: isar-users; +Cc: roberto.foglietta

From: "Roberto A. Foglietta" <roberto.foglietta@gmail.com>

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


https://16F0H.trk.elasticemail.com/tracking/unsubscribe?d=uQeFOzkk8plXVVZ2VnEcpnRSdsZJXyyuanyoKUe_hgUtRGm67z-BYxoD4dUduarMjrGtkXTgZjMZXUuF072gCX_KXuQap6OFDQDgYq9jqpv90

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-12-13 10:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-12 20:33 [PATCH] In expand last partition wait for udev have finished Roberto A. Foglietta
  -- 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox