From 3f8e0892b012f6f94296d99ed5ac3340d53c7e4b Mon Sep 17 00:00:00 2001
From: "Daniel P. Berrange" <berrange@redhat.com>
Date: Mon, 30 Sep 2013 15:13:06 +0100
Subject: [PATCH] Always set earlyprintk kernel arg
If the initrd fails and prints to stderr, this goes to /dev/null
unless earlyprintk is enabled. We always want to see initrd
errors, so we should always have earlyprintk set.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
(cherry picked from commit b14ce17bb357d5b7f99562c91dafb521f6985b40)
---
libvirt-sandbox/libvirt-sandbox-builder-machine.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libvirt-sandbox/libvirt-sandbox-builder-machine.c b/libvirt-sandbox/libvirt-sandbox-builder-machine.c
index 6b9b506..fd945c7 100644
--- a/libvirt-sandbox/libvirt-sandbox-builder-machine.c
+++ b/libvirt-sandbox/libvirt-sandbox-builder-machine.c
@@ -204,10 +204,10 @@ static gchar *gvir_sandbox_builder_machine_cmdline(GVirSandboxConfig *config G_G
gchar *tmp;
/* Now kernel args */
- g_string_append(str, " console=ttyS0");
+ g_string_append(str, " console=ttyS0 earlyprintk=ttyS0");
if (getenv("LIBVIRT_SANDBOX_DEBUG") &&
g_str_equal(getenv("LIBVIRT_SANDBOX_DEBUG"), "2"))
- g_string_append(str, " debug loglevel=10 earlyprintk=ttyS0");
+ g_string_append(str, " debug loglevel=10");
else
g_string_append(str, " quiet loglevel=0");