Description: localboot $value, has varying degrees of success depending on the hardware
 It also seems to be incompatible with using ipxe. Chain.c32 seems to provide a more
 reliable boot experience, and is also compatible with ipxe.
Bug-Ubuntu: https://launchpad.net/bugs/898838
Author: Andres Rodriguez <andreserl@ubuntu.com>
--- a/templates/pxe/pxelocal.template
+++ b/templates/pxe/pxelocal.template
@@ -5,5 +5,5 @@ TOTALTIMEOUT 0
 ONTIMEOUT local
 
 LABEL local
-        LOCALBOOT -1
+        KERNEL chain.c32
 
--- a/cobbler/pxegen.py
+++ b/cobbler/pxegen.py
@@ -86,17 +86,23 @@ class PXEGen:
                         dst, api=self.api, cache=False, logger=self.logger)
                 utils.copyfile_pattern('/var/lib/cobbler/loaders/menu.c32',
                         dst, api=self.api, cache=False, logger=self.logger)
+                utils.copyfile_pattern('/var/lib/cobbler/loaders/chain.c32',
+                        dst, api=self.api, cache=False, logger=self.logger)
             except:
                 utils.copyfile_pattern('/usr/share/syslinux/pxelinux.0',
                         dst, api=self.api, cache=False, logger=self.logger)
                 utils.copyfile_pattern('/usr/share/syslinux/menu.c32',
                         dst, api=self.api, cache=False, logger=self.logger)
+                utils.copyfile_pattern('/usr/share/syslinux/chain.c32',
+                        dst, api=self.api, cache=False, logger=self.logger)
 
         except:
             utils.copyfile_pattern('/usr/lib/syslinux/pxelinux.0',
                     dst, api=self.api, cache=False, logger=self.logger)
             utils.copyfile_pattern('/usr/lib/syslinux/menu.c32',
                     dst, api=self.api, cache=False, logger=self.logger)
+            utils.copyfile_pattern('/usr/lib/syslinux/chain.c32',
+                    dst, api=self.api, cache=False, logger=self.logger)
 
         # copy memtest only if we find it
         utils.copyfile_pattern('/boot/memtest*', image_dst,
