initramfs: mount devtmpfs before switching root
authorSeokYeon Hwang <syeon.hwang@samsung.com>
Wed, 25 Mar 2015 04:49:03 +0000 (13:49 +0900)
committerSeokYeon Hwang <syeon.hwang@samsung.com>
Wed, 25 Mar 2015 04:50:09 +0000 (13:50 +0900)
Change-Id: I553ba3997f6873657787b404e3fe3cefa2867435

ramfs/init

index b67b2482dec72c6752e361cc09a6d407deca886a..ddf9001896ab55f3725bfedc05207059ff0cf22d 100644 (file)
@@ -93,9 +93,16 @@ fi
 # clean up...
 /bin/busybox umount /proc
 /bin/busybox umount /sys
+#/bin/busybox umount /dev
 
 echo -e "${COLOR_BLUE}Switching root...${NO_COLOR}"
 if [ -z $INIT ]; then
     INIT="/sbin/init"
 fi
+
+/bin/busybox mkdir -p $NEW_ROOT/dev
+/bin/busybox mount -t devtmpfs devtmpfs $NEW_ROOT/dev
+/bin/busybox mkdir -p $NEW_ROOT/sys
+/bin/busybox mount -t sysfs sys $NEW_ROOT/sys
+
 exec /bin/busybox switch_root -c /dev/console $NEW_ROOT $INIT