-
- utils.sysexec( "kexec --force --initrd=/tmp/initrd " \
- "--append=ramdisk_size=8192 /tmp/kernel" )
+
+ try:
+ utils.sysexec( "kexec --force --initrd=/tmp/initrd " \
+ "--append=ramdisk_size=8192 /tmp/kernel" )
+ except BootManagerException, e:
+ # if kexec fails, we've shut the machine down to a point where nothing
+ # can run usefully anymore (network down, all modules unloaded, file
+ # systems unmounted. write out the error, and cancel the boot process
+
+ log.write( "\n\n" )
+ log.write( "-------------------------------------------------------\n" )
+ log.write( "kexec failed with the following error. Please report\n" )
+ log.write( "this problem to support@planet-lab.org.\n\n" )
+ log.write( str(e) + "\n\n" )
+ log.write( "The boot process has been canceled.\n" )
+ log.write( "-------------------------------------------------------\n\n" )