[oe-commits] Johan Hovold : udev: fix failed /dev/shm mount

git at git.openembedded.org git at git.openembedded.org
Wed Dec 19 17:53:48 UTC 2012


Module: openembedded-core.git
Branch: master
Commit: f2ce905a92a2b5ff0a434249dc8468e3ee36aa63
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=f2ce905a92a2b5ff0a434249dc8468e3ee36aa63

Author: Johan Hovold <johan.hovold at lundinova.se>
Date:   Tue Dec 18 18:46:19 2012 +0100

udev: fix failed /dev/shm mount

Since commit commit fbec192f6bc4 ("udev: Ensure tmpfs are mounted and
volatile/run exists") all tmpfs-entries in fstab are mounted before udev
starts using mount -a. If /dev/shm is among those entries, that mount
will fail as the mount point has not yet been created:

   Starting udev
   mount: mounting tmpfs on /dev/shm failed: No such file or directory
   udevd[474]: starting version 182

Fix by restoring the old way of mounting /dev and mounting the
remaining tmpfs-entries only after /dev/shm has been created.

Also make sure that any errors are supressed for these tmpfs-mounts.
Should any mount point not yet be present, that mount will be retried
later during the boot process.

Signed-off-by: Johan Hovold <johan.hovold at lundinova.se>
Signed-off-by: Saul Wold <sgw at linux.intel.com>

---

 meta/recipes-core/udev/udev/init   |    7 +++++--
 meta/recipes-core/udev/udev_182.bb |    2 +-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-core/udev/udev/init b/meta/recipes-core/udev/udev/init
index 74449fe..1934d11 100644
--- a/meta/recipes-core/udev/udev/init
+++ b/meta/recipes-core/udev/udev/init
@@ -37,10 +37,13 @@ export ACTION=add
 echo "Starting udev"
 
 # mount the tmpfs on /dev, if not already done
-mount -a -t tmpfs
-mkdir -p /var/volatile/run
+LANG=C awk '$2 == "/dev" && ($3 == "tmpfs" || $3 == "devtmpfs") { exit 1 }' /proc/mounts && {
+	mount -n -o mode=0755 -t tmpfs none "/dev"
+}
 [ -e /dev/pts ] || mkdir -m 0755 /dev/pts
 [ -e /dev/shm ] || mkdir -m 1777 /dev/shm
+mount -a -t tmpfs 2>/dev/null
+mkdir -p /var/volatile/run
 
 # cache handling
 if [ "$DEVCACHE" != "" ]; then
diff --git a/meta/recipes-core/udev/udev_182.bb b/meta/recipes-core/udev/udev_182.bb
index c41de9f..0ae9f8c 100644
--- a/meta/recipes-core/udev/udev_182.bb
+++ b/meta/recipes-core/udev/udev_182.bb
@@ -1,6 +1,6 @@
 include udev.inc
 
-PR = "r2"
+PR = "r3"
 
 # module-init-tools from kmod_git will provide libkmod runtime
 DEPENDS += "module-init-tools"





More information about the Openembedded-commits mailing list