From: SeokYeon Hwang Date: Wed, 25 Mar 2015 04:49:03 +0000 (+0900) Subject: initramfs: mount devtmpfs before switching root X-Git-Tag: submit/tizen/20160422.055611~1^2~74 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2c3c79e1412b95df9e8818b0b65df762ecd0cfd9;p=sdk%2Femulator%2Femulator-kernel.git initramfs: mount devtmpfs before switching root Change-Id: I553ba3997f6873657787b404e3fe3cefa2867435 --- diff --git a/ramfs/init b/ramfs/init index b67b2482dec7..ddf9001896ab 100644 --- a/ramfs/init +++ b/ramfs/init @@ -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