Xen-unstable: "root=" no longer prepended on kernel cmdline since commit "tools: xl: handle unspecified extra= when dealing with root="
Hi Ian,
My PV-guest configs were still using the old "root=" option, but these guests don't boot anymore since:
commit 49ab17a3a615e1ab4ccc46d6942f925cf841df4b, "tools: xl: handle unspecified extra= when dealing with root="
These pv guests don't boot anymore since the "root=" part isn't prepended anymore on the kernel commandline, leading to a guest kernel that is incapable of finding the root partition.
--
Sander
Quoted 10 lines · Sander Eikelenboom
Hi Ian,
My PV-guest configs were still using the old "root=" option, but these guests don't boot anymore since:
commit49ab17a3a615e1ab4ccc46d6942f925cf841df4b, "tools: xl: handle unspecified extra= when dealing with root="These pv guests don't boot anymore since the "root=" part isn't prepended anymore on the kernel commandline, leading to a guest kernel that is incapable of finding the root partition.
Bugger, you are of course absolutely correct.
How about this, compile tested only...
8<-------------
Quoted 1 line
From
fc8eed8083d87608df7b836d89ba058066206b6cMon Sep 17 00:00:00 2001
From: Ian Campbell <[email protected]>
Date: Thu, 12 Mar 2015 17:56:47 +0000
Subject: [PATCH] tools: xl: prepend root= to root field on command line with
no extra
This was broken in 49ab17a3a615 "tools: xl: handle unspecified extra= when dealing with root=".
--- tools/libxl/xl_cmdimpl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tools/libxl/xl_cmdimpl.c +2 -1
@@ -821,7 +821,8 @@ static char *parse_cmdline(XLU_Config *config)if (asprintf (&cmdline,"root=%s %s" , root, extra) ==-1 ) cmdline =NULL ; }else if (root) { - cmdline =strdup (root); +if (asprintf (&cmdline,"root=%s" , root) ==-1 ) + cmdline =NULL ; }else if (extra) { cmdline =strdup (extra); }
Signature · 1 line
1.7.10.4
Quoted 8 lines · you
Quoted 7 lines · Sander Eikelenboom
Hi Ian,
My PV-guest configs were still using the old "root=" option, but these guests don't boot anymore since:
commit49ab17a3a615e1ab4ccc46d6942f925cf841df4b, "tools: xl: handle unspecified extra= when dealing with root="
Quoted 7 lines
Quoted 3 lines
These pv guests don't boot anymore since the "root=" part isn't prepended anymore on the kernel commandline, leading to a guest kernel that is incapable of finding the root partition.
Bugger, you are of course absolutely correct.
How about this, compile tested only...
Works for me, Thanks !
--
Sander
Quoted 31 lines
8<-------------
From
fc8eed8083d87608df7b836d89ba058066206b6cMon Sep 17 00:00:00 2001
From: Ian Campbell <[email protected]>
Date: Thu, 12 Mar 2015 17:56:47 +0000
Subject: [PATCH] tools: xl: prepend root= to root field on command line with
no extraThis was broken in
49ab17a3a615"tools: xl: handle unspecified extra= when dealing with root=".Reported-by Sander Eikelenboom <[email protected]>Signed-off-by Ian Campbell <[email protected]>--- tools/libxl/xl_cmdimpl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)tools/libxl/xl_cmdimpl.c +2
-1@@ -821,7 +821,8 @@ static char *parse_cmdline(XLU_Config *config)if (asprintf (&cmdline,"root=%s %s" , root, extra) ==-1 ) cmdline =NULL ; }else if (root) { - cmdline =strdup (root); +if (asprintf (&cmdline,"root=%s" , root) ==-1 ) + cmdline =NULL ; }else if (extra) { cmdline =strdup (extra); }
Wei Liu
Acked-byQuoted 24 lines · Ian Campbell
Quoted 10 lines · Sander Eikelenboom
Hi Ian,
My PV-guest configs were still using the old "root=" option, but these guests don't boot anymore since:
commit49ab17a3a615e1ab4ccc46d6942f925cf841df4b, "tools: xl: handle unspecified extra= when dealing with root="These pv guests don't boot anymore since the "root=" part isn't prepended anymore on the kernel commandline, leading to a guest kernel that is incapable of finding the root partition.
Bugger, you are of course absolutely correct.
How about this, compile tested only...
8<-------------
Quoted 1 line
From
fc8eed8083d87608df7b836d89ba058066206b6cMon Sep 17 00:00:00 2001From: Ian Campbell <[email protected]>
Date: Thu, 12 Mar 2015 17:56:47 +0000
Subject: [PATCH] tools: xl: prepend root= to root field on command line with
no extra
Quoted 5 lines
This was broken in
49ab17a3a615"tools: xl: handle unspecified extra= when dealing with root=".Reported-by Sander Eikelenboom <[email protected]>Signed-off-by Ian Campbell <[email protected]>
Quoted 22 lines
--- tools/libxl/xl_cmdimpl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)tools/libxl/xl_cmdimpl.c +2
-1@@ -821,7 +821,8 @@ static char *parse_cmdline(XLU_Config *config)if (asprintf (&cmdline,"root=%s %s" , root, extra) ==-1 ) cmdline =NULL ; }else if (root) { - cmdline =strdup (root); +if (asprintf (&cmdline,"root=%s" , root) ==-1 ) + cmdline =NULL ; }else if (extra) { cmdline =strdup (extra); }Signature · 1 line
1.7.10.4
Quoted 25 lines · Wei Liu
Quoted 24 lines · Ian Campbell
Quoted 10 lines · Sander Eikelenboom
Hi Ian,
My PV-guest configs were still using the old "root=" option, but these guests don't boot anymore since:
commit49ab17a3a615e1ab4ccc46d6942f925cf841df4b, "tools: xl: handle unspecified extra= when dealing with root="These pv guests don't boot anymore since the "root=" part isn't prepended anymore on the kernel commandline, leading to a guest kernel that is incapable of finding the root partition.
Bugger, you are of course absolutely correct.
How about this, compile tested only...
8<-------------
Quoted 1 line
From
fc8eed8083d87608df7b836d89ba058066206b6cMon Sep 17 00:00:00 2001From: Ian Campbell <[email protected]>
Date: Thu, 12 Mar 2015 17:56:47 +0000
Subject: [PATCH] tools: xl: prepend root= to root field on command line with
no extra
Quoted 7 lines
Quoted 5 lines
This was broken in
49ab17a3a615"tools: xl: handle unspecified extra= when dealing with root=".Reported-by Sander Eikelenboom <[email protected]>Signed-off-by Ian Campbell <[email protected]>Acked-by Wei Liu <[email protected]>
Applied, with a tested-by from Sander too.