Ian Pratt
2006-Mar-29 21:06 UTC
RE: [Xen-devel] Re: [PATCH] build in SATA drivers to the -xen kernelfor x86_64
> On Wed, Mar 29, 2006 at 12:02:48PM -0800, Chris Wright wrote: > > * Keir Fraser (Keir.Fraser@cl.cam.ac.uk) wrote: > > > What is native kernel behaviour when it fails to find its rootfs? > > > Does it reboot? > > > > Default, no, just panic. If you add kernel cmdline param it will > > reboot, ''panic=<timeout>'' > > Right, but Xen reboots on a dom0 kernel panic by default, > which ends up completely masking why the dom0 kernel paniced, > as your screen blips off immediately (or at least it does for me). :) > > Keeping the message on the CRT that dom0 paniced because it > couldn''t find the root block device would dispense with a lot > of questions.Amen! We should add a delay before the reboot on dom0 crash. Ian _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Chris Wright
2006-Mar-29 21:34 UTC
[Xen-devel] [PATCH] add 5 sec delay before reboot when dom0 crashes
This will gives you time to read the panic message before the machine reboots. Similar behaviour to the 5 second pause when Xen crashes. Signed-off-by: Chris Wright <chrisw@sous-sol.org> --- diff -r 50778f42f2dd xen/common/domain.c --- a/xen/common/domain.c Wed Mar 29 15:02:40 2006 +++ b/xen/common/domain.c Wed Mar 29 13:35:03 2006 @@ -19,6 +19,7 @@ #include <xen/rangeset.h> #include <xen/guest_access.h> #include <xen/hypercall.h> +#include <xen/delay.h> #include <asm/debugger.h> #include <public/dom0_ops.h> #include <public/sched.h> @@ -222,6 +223,12 @@ printk("Domain 0 halted: halting machine.\n"); machine_halt(); } + else if ( reason == SHUTDOWN_crash) + { + printk("Domain 0 crashed: rebooting machine in 5 seconds.\n"); + mdelay(5000); + machine_restart(0); + } else { printk("Domain 0 shutdown: rebooting machine.\n"); _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel