From 2c3c79e1412b95df9e8818b0b65df762ecd0cfd9 Mon Sep 17 00:00:00 2001 From: SeokYeon Hwang Date: Wed, 25 Mar 2015 13:49:03 +0900 Subject: [PATCH] initramfs: mount devtmpfs before switching root Change-Id: I553ba3997f6873657787b404e3fe3cefa2867435 --- ramfs/init | 7 +++++++ 1 file changed, 7 insertions(+) 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 -- 2.34.1