diff options
authorDan Callaghan <>2014-06-17 14:56:37 +1000
committerGerrit Code Review <>2014-06-24 02:13:24 +0000
commit42f3dd36ee7c7f0a4cf5fc832ba303d4b1477ace (patch)
parenta0c25563466e452e3e04c8febd862f9424b3e0c0 (diff)
change aarch64 TFTP locations from pxelinux/ to aarch64/
This commit also removes the symlink creation/removal business, which is not needed. Instead we can just write a default config to grub.cfg which immediately exits. This achieves the same effect and more closely corresponds to how we handle PXELINUX. Bug: 1078965 Change-Id: Id7bd78c0a59f3ce8d60965f682bee3f502e4883f
3 files changed, 21 insertions, 22 deletions
diff --git a/LabController/src/bkr/labcontroller/ b/LabController/src/bkr/labcontroller/
index b3ef6ae..e28aa87 100644
--- a/LabController/src/bkr/labcontroller/
+++ b/LabController/src/bkr/labcontroller/
@@ -154,15 +154,9 @@ def configure_aarch64(fqdn, kernel_options):
Creates PXE bootloader files for aarch64 Linux
- <get_tftp_root()>/pxelinux/grub.cfg-<pxe_basename(fqdn)>
- Also ensures <fqdn>.efi is symlinked to bootaa64.efi
- Specify filename "pxelinux/<fqdn>.efi"; in your dhcpd.conf file
- We remove this when the install is done. This allows efi
- to fall through to the next boot entry.
+ <get_tftp_root()>/aarch64/grub.cfg-<pxe_basename(fqdn)>
- pxe_base = os.path.join(get_tftp_root(), 'pxelinux')
+ pxe_base = os.path.join(get_tftp_root(), 'aarch64')
makedirs_ignore(pxe_base, mode=0755)
devicetree, kernel_options = extract_arg('devicetree=', kernel_options)
if devicetree:
@@ -178,18 +172,17 @@ def configure_aarch64(fqdn, kernel_options):
logger.debug('Writing aarch64 config for %s as %s', fqdn, basename)
with atomically_replaced_file(os.path.join(pxe_base, basename)) as f:
- atomic_symlink('bootaa64.efi', os.path.join(pxe_base, "%s.efi" % fqdn))
+ # We also ensure a default config exists that exits
+ write_ignore(os.path.join(pxe_base, 'grub.cfg'), 'exit\n')
def clear_aarch64(fqdn):
Removes PXE bootloader file created by configure_aarch64
- pxe_base = os.path.join(get_tftp_root(), 'pxelinux')
+ pxe_base = os.path.join(get_tftp_root(), 'aarch64')
basename = "grub.cfg-%s" % pxe_basename(fqdn)
logger.debug('Removing aarch64 config for %s as %s', fqdn, basename)
- unlink_ignore(os.path.join(pxe_base, "%s.efi" % fqdn))
unlink_ignore(os.path.join(pxe_base, basename))
- # XXX Should we save a default config, the way we do for non-aarch64 PXE?
### Bootloader config: PXE Linux for ARM
diff --git a/LabController/src/bkr/labcontroller/ b/LabController/src/bkr/labcontroller/
index 14d4c1f..279bc75 100644
--- a/LabController/src/bkr/labcontroller/
+++ b/LabController/src/bkr/labcontroller/
@@ -421,25 +421,24 @@ class Aarch64Test(NetBootTestCase):
def test_configure_then_clear(self):
'console=ttyS0,115200 ks=http://lol/')
- grub_config_path = os.path.join(self.tftp_root, 'pxelinux', 'grub.cfg-7F0000FF')
+ grub_config_path = os.path.join(self.tftp_root, 'aarch64', 'grub.cfg-7F0000FF')
+ grub_default_path = os.path.join(self.tftp_root, 'aarch64', 'grub.cfg')
self.assertEquals(open(grub_config_path).read(), """\
linux ../images/fqdn.example.invalid/kernel console=ttyS0,115200 ks=http://lol/
initrd ../images/fqdn.example.invalid/initrd
- grub_symlink_path = os.path.join(self.tftp_root, 'pxelinux', 'fqdn.example.invalid.efi')
- self.assertEquals(os.readlink(grub_symlink_path), 'bootaa64.efi')
+ self.assertEquals(open(grub_default_path).read(), 'exit\n')
- self.assertFalse(os.path.exists(grub_symlink_path))
def test_alternate_devicetree(self):
'devicetree=custom.dtb ks=http://lol/')
- grub_config_path = os.path.join(self.tftp_root, 'pxelinux', 'grub.cfg-7F0000FF')
+ grub_config_path = os.path.join(self.tftp_root, 'aarch64', 'grub.cfg-7F0000FF')
self.assertEquals(open(grub_config_path).read(), """\
linux ../images/fqdn.example.invalid/kernel ks=http://lol/
initrd ../images/fqdn.example.invalid/initrd
diff --git a/documentation/admin-guide/tftp.rst b/documentation/admin-guide/tftp.rst
index 20c7230..15ed0e0 100644
--- a/documentation/admin-guide/tftp.rst
+++ b/documentation/admin-guide/tftp.rst
@@ -48,7 +48,7 @@ boot loader images (see :ref:`adding-systems`).
Location of the ELILO_ image, used for IA64 systems.
Location of the boot loader image for 64-bit ARM systems.
.. _Syslinux:
@@ -92,10 +92,7 @@ removes them once the installation is complete.
Configuration for 32-bit ARM systems. The filename follows the PXELINUX
naming convention.
- Symbolic link to :file:`bootaa64.efi`.
Configuration for 64-bit ARM systems.
:file:`s390x/s_{fqdn}`; :file:`s390x/s_{fqdn}_parm`; :file:`s390x/s_{fqdn}_conf`
@@ -121,6 +118,16 @@ Other files in the TFTP root directory
If this file does not exist, Beaker populates it with a simple default
configuration that immediately boots the local disk.
+ Default configuration used by 64-bit ARM systems when no system-specific
+ configuration exists.
+ The Beaker administrator can customize this configuration, however it
+ should exit after a timeout using the ``exit`` command.
+ If this file does not exist, Beaker populates it with a simple default
+ configuration that immediately exits.
Menu configuration generated by :program:`beaker-pxemenu` for the
``menu.c32`` program (part of Syslinux). See :ref:`pxe-menu` for details.