[arch-releng] [PATCH 1/3] Use devtmpfs for /dev on the target

Thomas Hebb tommyhebb at gmail.com
Sun May 20 21:57:37 EDT 2012


Switch from using a bind mount to devtmpfs when mounting /dev on the
target system.

Signed-off-by: Thomas Hebb <tommyhebb at gmail.com>
---
 src/core/libs/lib-blockdevices-filesystems.sh |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/core/libs/lib-blockdevices-filesystems.sh b/src/core/libs/lib-blockdevices-filesystems.sh
index 4312143..70805c8 100644
--- a/src/core/libs/lib-blockdevices-filesystems.sh
+++ b/src/core/libs/lib-blockdevices-filesystems.sh
@@ -112,9 +112,9 @@ target_special_fs ()
 		! [ -d $var_TARGET_DIR/sys  ] && mkdir $var_TARGET_DIR/sys
 		! [ -d $var_TARGET_DIR/dev  ] && mkdir $var_TARGET_DIR/dev
 		#mount, if not mounted yet
-		mount | grep -q "$var_TARGET_DIR/proc" || mount -t proc  proc $var_TARGET_DIR/proc || die_error "Could not mount $var_TARGET_DIR/proc"
-		mount | grep -q "$var_TARGET_DIR/sys"  || mount -t sysfs sysfs $var_TARGET_DIR/sys || die_error "Could not mount $var_TARGET_DIR/sys"
-		mount | grep -q "$var_TARGET_DIR/dev"  || mount -o bind  /dev $var_TARGET_DIR/dev  || die_error "Could not mount $var_TARGET_DIR/dev"
+		mount | grep -q "$var_TARGET_DIR/proc" || mount -t proc     proc $var_TARGET_DIR/proc    || die_error "Could not mount $var_TARGET_DIR/proc"
+		mount | grep -q "$var_TARGET_DIR/sys"  || mount -t sysfs    sysfs $var_TARGET_DIR/sys    || die_error "Could not mount $var_TARGET_DIR/sys"
+		mount | grep -q "$var_TARGET_DIR/dev"  || mount -t devtmpfs devtmpfs $var_TARGET_DIR/dev || die_error "Could not mount $var_TARGET_DIR/dev"
 	elif [ "$1" = off ]
 	then
 		umount $var_TARGET_DIR/proc || die_error "Could not umount $var_TARGET_DIR/proc"
-- 
1.7.10.2



More information about the arch-releng mailing list