[1/1] init-live.sh: move /media/xxx over to the real root filesystem

Submitted by Qi.Chen@windriver.com on Jan. 23, 2013, 6:08 a.m.


Message ID 3f7ab91ee6c5f7e36bfbd0e600d4aaf6c3fbedd7.1358919866.git.Qi.Chen@windriver.com
State Accepted
Commit f8a4a74c8cd69de2b3332526e1110ff745fb824d
Headers show

Commit Message

Qi.Chen@windriver.com Jan. 23, 2013, 6:08 a.m.
From: Chen Qi <Qi.Chen@windriver.com>

Previously, the /media/xxx which contains the root image was not
moved to be under the real root filesystem. Because of this, the
output of the 'mount' command is somewhat confusing, that is, it
has some mount point that is not even in the filesystem.

Besides, on some machine, it caused the recovery procedure when we
booted it next time.

This patches fixes this issue by moving the /media/xxx over to be
under the real root filesystem.

[YOCTO #2064]
[YOCTO #3705]

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
 meta/recipes-core/initrdscripts/files/init-live.sh |    2 ++
 1 file changed, 2 insertions(+)

Patch hide | download patch | download mbox

diff --git a/meta/recipes-core/initrdscripts/files/init-live.sh b/meta/recipes-core/initrdscripts/files/init-live.sh
index f0d4f22..4f8618b 100644
--- a/meta/recipes-core/initrdscripts/files/init-live.sh
+++ b/meta/recipes-core/initrdscripts/files/init-live.sh
@@ -82,6 +82,8 @@  boot_live_root() {
     mount -n --move /proc ${ROOT_MOUNT}/proc
     mount -n --move /sys ${ROOT_MOUNT}/sys
     mount -n --move /dev ${ROOT_MOUNT}/dev
+    # Move /media/$i over to the real root filesystem
+    mount -n --move /media/$i ${ROOT_MOUNT}/media/realroot
     cd $ROOT_MOUNT
     exec switch_root -c /dev/console $ROOT_MOUNT /sbin/init