Skip to contentSkip to conversation

initramfs-live-boot: Make sure we kill udev before switching root when live booting

PATCH In review Alejandro Hernandez 2 participants 2 messages Jul 26, 2016 – Aug 15, 2016 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 initramfs-live-boot: Make sure we kill udev before switching root when live booting

When live booting, we need to make sure the running udev processes are killed to avoid unexepected behavior, we do this just before switching root, once we do, a new udev process will be spawned from init and will take care of whatever work was still missing

[YOCTO #9520]

---
 meta/recipes-core/initrdscripts/files/init-live.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta/recipes-core/initrdscripts/files/init-live.sh +3 -1
index 09fb479..441b41c 100644
@@ -80,7 +80,9 @@ read_args() {
 boot_live_root() {
     # Watches the udev event queue, and exits if all current events are handled
     udevadm settle --timeout=3 --quiet
-    killall "${_UDEV_DAEMON##*/}" 2>/dev/null
+    # Kills the current udev running processes, which survived after
+    # device node creation events were handled, to avoid unexpected behavior
+    killall -9 "${_UDEV_DAEMON##*/}" 2>/dev/null
 
     # Allow for identification of the real root even after boot
     mkdir -p  ${ROOT_MOUNT}/media/realroot
Signature · 1 line
2.6.6
Reviewed-by on v1 1/1
#2 lore raw
Quoted 11 lines · Alejandro Hernandez

When live booting, we need to make sure the running udev processes are killed
to avoid unexepected behavior, we do this just before switching root, once we do, a new udev process will be spawned from init and will take care
of whatever work was still missing

[YOCTO #9520]

Signed-off-by: Alejandro Hernandez
<[email protected]>

Quoted 25 lines

---
 meta/recipes-core/initrdscripts/files/init-live.sh | 4 +++-

 1 file changed, 3 insertions(+), 1 deletion(-)
meta/recipes-core/initrdscripts/files/init-live.sh +0 -0
index 09fb479..441b41c 100644
@@ -80,7 +80,9 @@ read_args() {
  boot_live_root() {
      # Watches the udev event queue, and exits if all current events

are handled
     udevadm settle --timeout=3 --quiet
-    killall "${_UDEV_DAEMON##*/}" 2>/dev/null
+    # Kills the current udev running processes, which survived after +    # device node creation events were handled, to avoid unexpected behavior
+    killall -9 "${_UDEV_DAEMON##*/}" 2>/dev/null

     # Allow for identification of the real root even after boot mkdir -p  ${ROOT_MOUNT}/media/realroot
--
2.6.6