diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2012-12-31 15:55:20 +0800 |
---|---|---|
committer | Saul Wold <sgw@linux.intel.com> | 2013-01-04 22:12:05 -0800 |
commit | 050a745413f8bb26212b84da391e0f7665f77728 (patch) | |
tree | dc19353c887aab9c88302ced1cd9caf5cb528349 | |
parent | ebd56f6a12c55982467b34b9c4feae03358738fe (diff) | |
download | openembedded-core-050a745413f8bb26212b84da391e0f7665f77728.tar.gz openembedded-core-050a745413f8bb26212b84da391e0f7665f77728.tar.bz2 openembedded-core-050a745413f8bb26212b84da391e0f7665f77728.zip |
init-live.sh: avoid duplicate mount points for the same filesystem
A live system had duplicate mount points for the same filesystem
in the output of 'mount' command. That was because we didn't handle
the temporary mounts properly before switch_root.
This patch fixes this problem by moving the mount points of some
filesystems to the corresponding directories in the real root filesystem.
[YOCTO #3155]
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
-rw-r--r-- | meta/recipes-core/initrdscripts/files/init-live.sh | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/meta/recipes-core/initrdscripts/files/init-live.sh b/meta/recipes-core/initrdscripts/files/init-live.sh index e8d7f70c2c..0ae359d617 100644 --- a/meta/recipes-core/initrdscripts/files/init-live.sh +++ b/meta/recipes-core/initrdscripts/files/init-live.sh @@ -59,10 +59,11 @@ read_args() { boot_live_root() { killall udevd 2>/dev/null - # use devtmpfs if available - if grep -q devtmpfs /proc/filesystems; then - mount -t devtmpfs devtmpfs $ROOT_MOUNT/dev - fi + # Move the mount points of some filesystems over to + # the corresponding directories under the real root filesystem. + mount -n --move /proc ${ROOT_MOUNT}/proc + mount -n --move /sys ${ROOT_MOUNT}/sys + mount -n --move /dev ${ROOT_MOUNT}/dev cd $ROOT_MOUNT exec switch_root -c /dev/console $ROOT_MOUNT /sbin/init |