rombios: pause for a keypress after a failed boot
PATCH 1/1 rombios: pause for a keypress after a failed boot
rombios: inform the user and pause for a keypress after a failed boot rather than powering off immediately.
tools/firmware/rombios/rombios.c +21 -1
@@ -8243,7 +8243,27 @@write_word (ebda_seg,IPL_BOOTFIRST_OFFSET ,0xFFFF );/* Reset boot sequence */ write_word (ebda_seg,IPL_SEQUENCE_OFFSET ,0xFFFF ); - }else if (bootdev ==0 )BX_PANIC ("No bootable device.\n" ); + }else if (bootdev ==0 ) { +printf ("\nNo bootable device.\n" ); +printf ("Reboot or press any key to retry." ); +write_word (ebda_seg,IPL_SEQUENCE_OFFSET ,0xFFFF ); +ASM_START + sti +ASM_END + { +Bit8u sc, ac; +while (!dequeue_key (&sc, &ac,1 )) { +ASM_START + hlt +ASM_END + } + } +ASM_START + cli +ASM_END + printf("\n\n"); +return ; + }/* Translate from CMOS runes to an IPL table offset by subtracting 1 */ bootdev -=1 ;
RE: [PATCH] rombios: pause for a keypress after a failedboot
Quoted 4 lines
rombios: inform the user and pause for a keypress after a failed boot rather than powering off immediately.
That's a great idea for many situations, but not for all. If the DomU fails to boot (eg because the drbd backing store is offline or something) it would be nice to have the domain exit so that monitoring can kick in and alert someone, rather than it just sitting there in a running state waiting for user input that might never come.
I know it's probably a heap more work, but could the behaviour be driven by a config file setting? Otherwise this new behaviour is going to be a regression.
Thanks
James
Re: [PATCH] rombios: pause for a keypress after a failedboot
Quoted 10 lines · James Harper
Quoted 3 lines
rombios: inform the user and pause for a keypress after a failed boot rather than powering off immediately.
That's a great idea for many situations, but not for all. If the DomU fails to boot (eg because the drbd backing store is offline or something) it would be nice to have the domain exit so that monitoring can kick in and alert someone, rather than it just sitting there in a running state waiting for user input that might never come.
Quoted 3 lines
I know it's probably a heap more work, but could the behaviour be driven by a config file setting? Otherwise this new behaviour is going to be a regression.
Simply pausign for a few seconds might be nice. Gives enough time for a user to see what is going on, but doesn't leave an unattended VM hanging around forever?
-- Keir
RE: [PATCH] rombios: pause for a keypress after a failedboot
Quoted 2 lines
On 07/07/2010 02:43, "James Harper" <[email protected]>
Quoted 2 lines · wrote:
Quoted 2 lines
Quoted 2 lines
rombios: inform the user and pause for a keypress after a failed
boot
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
rather than powering off immediately.
That's a great idea for many situations, but not for all. If the
DomU
Quoted 2 lines
Quoted 2 lines
fails to boot (eg because the drbd backing store is offline or something) it would be nice to have the domain exit so that
monitoring
Quoted 1 line
Quoted 1 line
can kick in and alert someone, rather than it just sitting there in
a
Quoted 3 lines
Quoted 3 lines
running state waiting for user input that might never come.
I know it's probably a heap more work, but could the behaviour be
driven
Quoted 1 line
Quoted 1 line
by a config file setting? Otherwise this new behaviour is going to
be a
Quoted 3 lines
Quoted 1 line
regression.
Simply pausign for a few seconds might be nice. Gives enough time for
a user
Quoted 1 line
to see what is going on, but doesn't leave an unattended VM hanging
around
Quoted 2 lines
forever?
That would certainly be much easier in terms of programming effort, and fulfils most of my concerns.
What criteria does xend use to determine if a domain is in a reboot loop? Is it just a single restart within some number of seconds, or is it a certain number of reboots in a certain number of seconds?
Thanks
James
Re: [PATCH] rombios: pause for a keypress after a failedboot
Quoted 7 lines · James Harper
Quoted 1 line
Simply pausign for a few seconds might be nice. Gives enough time for
a user
Quoted 1 line
to see what is going on, but doesn't leave an unattended VM hanging
around
Quoted 2 lines
forever?
Quoted 6 lines
That would certainly be much easier in terms of programming effort, and fulfils most of my concerns.
What criteria does xend use to determine if a domain is in a reboot loop? Is it just a single restart within some number of seconds, or is it a certain number of reboots in a certain number of seconds?
I think it's a single restart within 60 seconds that triggers it. That's how the code reads anyway.
-- Keir
Re: [PATCH] rombios: pause for a keypress after a failedboot
In reply to Keir FraserQuoted 6 lines · Keir Fraser
Quoted 6 lines
That's a great idea for many situations, but not for all. If the DomU fails to boot (eg because the drbd backing store is offline or something) it would be nice to have the domain exit so that monitoring can kick in and alert someone, rather than it just sitting there in a running state waiting for user input that might never come.
Quoted 7 lines
Quoted 3 lines
I know it's probably a heap more work, but could the behaviour be driven by a config file setting? Otherwise this new behaviour is going to be a regression.
Simply pausign for a few seconds might be nice. Gives enough time for a user to see what is going on, but doesn't leave an unattended VM hanging around forever?
That's easy enough. The attached patch makes it wait 30 seconds before shutting down instead. (It applies on top of my original patch).
Tim.
Signature · 3 lines
Tim Deegan <[email protected]> Principal Software Engineer, XenServer Engineering Citrix Systems UK Ltd. (Company #02937203, SL9 0BG)
tools/firmware/rombios/rombios.c +7 -16
@@ -8243,24 +8243,15 @@write_word (ebda_seg,IPL_SEQUENCE_OFFSET ,0xFFFF ); }else if (bootdev ==0 ) {printf ("\nNo bootable device.\n" ); -printf ("Reboot or press any key to retry." ); -write_word (ebda_seg,IPL_SEQUENCE_OFFSET ,0xFFFF ); +printf ("Powering off in 30 seconds.\n" );ASM_START sti -ASM_END - { -Bit8u sc, ac; -while (!dequeue_key (&sc, &ac,1 )) { -ASM_START - hlt -ASM_END - } - } -ASM_START - cli -ASM_END - printf("\n\n"); -return ; + mov cx, #0x01c9 + mov dx, #0xc380 + mov ah, #0x86 ;; INT 15/86: wait CX:DX usec. + int #0x15 +ASM_END + bios_printf(BIOS_PRINTF_HALT, ""); }/* Translate from CMOS runes to an IPL table offset by subtracting 1 */
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel