[prev in list] [next in list] [prev in thread] [next in thread]
List: openembedded-core
Subject: [OE-core] [PATCH 1/1] init-live.sh: avoid duplicate mount points for the same filesystem
From: Qi.Chen () windriver ! com (Qi ! Chen at windriver ! com)
Date: 2012-12-31 7:55:20
Message-ID: 53d2506b4fd5e55c7a3969ae456bea101f170633.1356940443.git.Qi.Chen () windriver ! com
[Download RAW message or body]
From: Chen Qi <Qi.Chen at windriver.com>
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 at windriver.com>
---
meta/recipes-core/initrdscripts/files/init-live.sh | 9 +++++----
1 file 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 e8d7f70..0ae359d 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
--
1.7.9.5
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic