Patchwork [V2,01/10] make $ROOT_MOUNT/media writable when necessary

mail settings
Date July 29, 2013, 2:33 a.m.
Message ID <>
Download mbox | patch
Permalink /patch/54633/
State Accepted
Commit aeeb3418ff08dfd29edc0ce8a41cb6887d4e11fe
Headers show

Comments - July 29, 2013, 2:33 a.m.
From: Chen Qi <>

If the live image is mounted as read-only, we cannot make necessary
directories under $ROOT_MOUNT/media, so trying to move the mount points
lead to errors.

So in case that no unification filesystem mechanism is available in kernel
and the rootfs is mounted as read-only, we mount tmpfs on $ROOT_MOUNT/media
so that it's possible to make necessary directories under it.

[YOCTO #4881]
[YOCTO #4103]

Signed-off-by: Chen Qi <>
 meta/recipes-core/initrdscripts/files/ |    2 ++
 1 file changed, 2 insertions(+)


diff --git a/meta/recipes-core/initrdscripts/files/ b/meta/recipes-core/initrdscripts/files/
index 86ecebf..0e0cf8a 100644
--- a/meta/recipes-core/initrdscripts/files/
+++ b/meta/recipes-core/initrdscripts/files/
@@ -200,6 +200,8 @@  mount_and_boot() {
 	    if ! mount -o rw,loop,noatime,nodiratime /media/$i/$ISOLINUX/$ROOT_IMAGE $ROOT_MOUNT ; then
 		fatal "Could not mount rootfs image"
+	    else
+		mount -t tmpfs -o rw,noatime,mode=755 tmpfs $ROOT_MOUNT/media