There are still a few scripts using the 'which' command to determine
either the full path or the mere existence of an executable.
Some of these scripts might run in minimal environments where 'which' is
not available due to dependency restriction. 'which' is also considered
unreliable for historical implementation details.
Use the POSIX defined [1] built-in 'command -v' instead to reduce
package dependencies and improve reliability.
[1] https://pubs.opengroup.org/onlinepubs/9699919799/
Reviewed-by: Benjamin Block <bblock@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
Add the -v short option for version information to the mk-s390image and
mk-pxelinux-ramfs. Adjust the Makefile accordingly to set the correct
s390-tools version during installation.
Acked-by: Viktor Mihajlovski <mihajlov@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
Use '$(MAKE)' to pass down the makefile flags.
This fixes the warning:
make[4]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Reviewed-by: Philipp Rudo <prudo@linux.ibm.com>
Reviewed-by: Jan Hoeppner <hoeppner@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
The IPAPPEND option in the pxelinux config file can be used
to pass information about the boot interface to the booted
Linux kernel.
The support for this option was missing and could lead to
installation failures, e.g. using kickstart.
Signed-off-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
Client architecture aware DHCP configurations may send a
bootfile for the wrong architecture, if the DHCP request
doesn't include the client architecture identifier 0x001f.
Further, the DHCP reply may include the pxepathprefix option,
which points to the base directory to use for TFT requests.
If the value is not honored by the client, the wrong
configuration file, kernel, etc. could be loaded.
Both issues are fixed by this commit.
Signed-off-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
Compressed kernel modules (filename *.ko.xz) would not be included
since the script was looking for files with .ko suffix only.
This can result in a pxelinux.0 image that can't access the
network, which is not good for a network boot loader...
Signed-off-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
So far it infinitely retried the bootscript, that doesn#t seem
reasonable. Per IRC discussion this is now changed to a 600 sec timeout
waiting for a config to appear to then run once on that config.
In case the pxe boot fails the it is now no more a retry loop, but
instead considered a crash as init exits.
Closes: #16
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Acked-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Currently multiple entries in a single append is broken by how the
shell in busybox escapes them. No usual grouping with " or ' will
work but calling them directly but without the --append in the
variable will let busybox do the right thing.
GitHub-ID: #16
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Acked-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Currently for a user the pxe boot seems unclear and it
is hard to follow what is going on.
- Report on when (re-)starting the bootscript.
- Report configs fetched (Without e.g. on a virsh console
one only sees a loop of timeouts.)
- Report which config is missing on the PXE_CONF check
- Report kexec calls made
GitHub-ID: #16
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Acked-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
A set of scripts and a short documentation describing how to build
a network boot image simulating a PXELINUX-style boot process.
Starting with QEMU 2.10 it is possible to boot a KVM guest over a
network interface using DHCP/BOOTP. The boot process is triggered by
the network boot firmware that is part of QEMU and follows the usual
network boot pattern: a DHCP request is issued by the client and
answered by a DHCP/BOOTP server. The DHCP reply will contain a
TFPT server identification and a bootfile name. The client will
retrieve the bootfile from the TFTP server, load it into memory
and IPL it.
A very common way of setting up a boot server has been defined
by PXELINUX, an open source implementation of PXE. With PXELINUX
the bootfile is a small network boot loader that will retrieve
a potentially client-specific configuration file containing
further instructions for the final boot process (kernel, ramdisk,...).
The set of sample scripts contained in the netboot directory provide
directions for a Linux distributor or a boot server administrator
on how to build a network boot image usable for a simplified
PXELINUX-style network boot setup for s390.
Note that the sample scripts are implementing only a subset of PXELINUX
functionality, specifically the config file parsing. In order to
get full functionality, a more specialized boot loader program
like petitboot or pxe-kexec must be used in the ramdisk.
Further, a sample Dockerfile is provided along with instructions on how
to build the network boot image in a Docker container.
Signed-off-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>