From 701d63e60978d3a45d0cb68d204c57cbb5ba313c Mon Sep 17 00:00:00 2001 From: Tiago Gomes Date: Tue, 24 Feb 2015 17:38:17 +0000 Subject: pxeboot: improve compatibility with u-boot pxe u-boot pxe doesn't understand the tftp:// URIs. Workaround by making the kernel download URL in the pxelinux.cfg file to be of the following form: : --- pxeboot.write | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pxeboot.write b/pxeboot.write index 3fdda5f2..8c46bcbe 100755 --- a/pxeboot.write +++ b/pxeboot.write @@ -415,7 +415,8 @@ class PXEBoot(morphlib.writeexts.WriteExtension): def remote_pxeboot_config(self, tftproot, kernel_tftproot, kernel_subpath, rootfs_nfsroot, rootfs_subpath, macaddr): rootfs_nfs_url = '{}/{}'.format(rootfs_nfsroot, rootfs_subpath) - kernel_tftp_url = '{}/{}'.format(kernel_tftproot, kernel_subpath) + url = urlparse.urlsplit(kernel_tftproot) + kernel_tftp_url = '{}:{}'.format(url.netloc, kernel_subpath) pxe_cfg_filename = _normalise_macaddr(macaddr) url = urlparse.urlsplit(tftproot) inst_cfg_path = os.path.join(url.path, 'pxelinux.cfg') -- cgit v1.2.1