Patchwork [1/1] init-live.sh: remove the '-c /dev/console' for switch_root

login
register
mail settings
Submitter Qi.Chen@windriver.com
Date Dec. 5, 2013, 9:11 a.m.
Message ID <abf89996aa4e22d7bfd9463b4c9ee05c093dff33.1386234217.git.Qi.Chen@windriver.com>
Download mbox | patch
Permalink /patch/62897/
State New
Headers show

Comments

Qi.Chen@windriver.com - Dec. 5, 2013, 9:11 a.m.
From: Chen Qi <Qi.Chen@windriver.com>

The '-c DEV' option is specific to the switch_root provided by busybox.
switch_root from util-linux doesn't recognize this option. As a result,
if we we this init-live.sh script together with util-linux, we would get
a kernel panic when executing switch_root.

Besides, this option doesn't seem to have any useful effect as far as I
can see. Removing it doesn't affect the behaviours of our live images.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/recipes-core/initrdscripts/files/init-live.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/meta/recipes-core/initrdscripts/files/init-live.sh b/meta/recipes-core/initrdscripts/files/init-live.sh
index 3f5fde8..bd259b9 100644
--- a/meta/recipes-core/initrdscripts/files/init-live.sh
+++ b/meta/recipes-core/initrdscripts/files/init-live.sh
@@ -89,7 +89,7 @@  boot_live_root() {
     mount -n --move /dev ${ROOT_MOUNT}/dev
 
     cd $ROOT_MOUNT
-    exec switch_root -c /dev/console $ROOT_MOUNT /sbin/init
+    exec switch_root $ROOT_MOUNT /sbin/init
 }
 
 fatal() {