david/ipxe
david
/
ipxe
Archived
1
0
Fork 0
Commit Graph

67 Commits

Author SHA1 Message Date
Michael Brown 84d406ccf4 [block] Allow use of a non-default EFI SAN boot filename
Some older operating systems (e.g. RHEL6) use a non-default filename
on the root disk and rely on setting an EFI variable to point to the
bootloader.  This does not work when performing a SAN boot on a
machine where the EFI variable is not present.

Fix by allowing a non-default filename to be specified via the
"sanboot --filename" option or the "san-filename" setting.  For
example:

  sanboot --filename \efi\redhat\grub.efi \
          iscsi:192.168.0.1::::iqn.2010-04.org.ipxe.demo:rhel6

or

  option ipxe.san-filename code 188 = string;
  option ipxe.san-filename "\\efi\\redhat\\grub.efi";
  option root-path "iscsi:192.168.0.1::::iqn.2010-04.org.ipxe.demo:rhel6";

Originally-implemented-by: Vishvananda Ishaya Abrams <vish.ishaya@oracle.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2017-04-12 15:58:05 +01:00
Michael Brown bb5a54b79a [block] Add basic multipath support
Add basic support for multipath block devices.  The "sanboot" and
"sanhook" commands now accept a list of SAN URIs.  We open all URIs
concurrently.  The first connection to become available for issuing
block device commands is marked as the active path and used for all
subsequent commands; all other connections are then closed.  Whenever
the active path fails, we reopen all URIs and repeat the process.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2017-03-26 16:06:02 +03:00
Michael Brown 1e277ab062 [crypto] Add certstat() to display basic certificate information
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-08-31 15:41:15 +01:00
Michael Brown 3c61e11fe1 [cmdline] Add "ntp" command
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-06-13 15:57:16 +01:00
Michael Brown 80dd6cbcc4 [lotest] Add option to use broadcast packets for loopback testing
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-05-23 14:17:47 +01:00
Michael Brown 299fdabe48 [infiniband] Add "ibstat" command
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-03-08 17:38:06 +00:00
Michael Brown f58ebbdfb5 [test] Allow self-tests to report exit status when running under Linux
Allow the return status from an embedded image to propagate out to the
eventual return status from main().  When running under Linux, this
allows the pass/fail result of unit tests to be observable without
having to visually inspect the console output.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-08-21 15:46:28 +01:00
Michael Brown 2f020a8df3 [legal] Relicense files under GPL2_OR_LATER_OR_UBDL
These files cannot be automatically relicensed by util/relicense.pl
since they either contain unusual but trivial contributions (such as
the addition of __nonnull function attributes), or contain lines
dating back to the initial git revision (and so require manual
knowledge of the code's origin).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-02 16:35:29 +00:00
Michael Brown b6ee89ffb5 [legal] Relicense files under GPL2_OR_LATER_OR_UBDL
Relicense files for which I am the sole author (as identified by
util/relicense.pl).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-02 14:17:31 +00:00
Michael Brown dea6a6c1a0 [ping] Allow "ping" command output to be inhibited
Originally-implemented-by: Cedric Levasseur <cyr-ius@ipocus.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-10-23 16:52:08 +01:00
Michael Brown 1c34ca70d1 [ping] Allow termination after a specified number of packets
Add the "-c <count>" option to the "ping" command, allowing for
automatic termination after a specified number of packets.

When a number of packets is specified:

  - if a serious error (i.e. length mismatch or content mismatch)
    occurs, then the ping will be immediately terminated with the relevant
    status code;

  - if at least one response is received successfully, and all errors
    are non-serious (i.e. timeouts or out-of-sequence responses), then
    the ping will be terminated after the final response (or timeout)
    with a success status;

  - if no responses are received successfully, then the ping will be
    terminated after the final timeout with ETIMEDOUT.

If no number of packets is specified, then the ping will continue
until manually interrupted.

Originally-implemented-by: Cedric Levasseur <cyr-ius@ipocus.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-10-23 16:39:42 +01:00
Michael Brown 00c745e5ff [autoboot] Allow autoboot device to be identified by link-layer address
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-07-08 00:37:31 +01:00
Michael Brown 7c44fd68f0 [cmdline] Add "profstat" command to display profiling statistics
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-04-27 23:14:47 +01:00
Michael Brown 3f43c1354e [image] Add "--timeout" parameter to image downloading commands
iPXE will detect timeout failures in several situations: network
link-up, DHCP, TCP connection attempts, unacknowledged TCP data, etc.
This does not cover all possible circumstances.  For example, if a
connection to a web server is successfully established and the web
server acknowledges the HTTP request but never sends any data in
response, then no timeout will be triggered.  There is no timeout
defined within the HTTP specifications, and the underlying TCP
connection will not generate a timeout since it has no way to know
that the HTTP layer is expecting to receive data from the server.

Add a "--timeout" parameter to "imgfetch", "chain", etc.  If no
progress is made (i.e. no data is downloaded) within the timeout
period, then the download will be aborted.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-03-10 13:32:39 +00:00
Alex Williamson 123bae9d93 [autoboot] Enable infrastructure to specify an autoboot device location
iPXE will currently attempt to boot from every network device for
which it has a driver.  Where a system has more than one network
device supported by iPXE, this renders BIOS IPL lists ineffective.

Allow an autoboot device location to be specified.  If such a location
is specified, then only devices matching that location will be used as
part of the automatic boot sequence.  If no such location is
specified, then all devices will be used.

Note that this does not affect the "autoboot" command, which will
continue to use all devices.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-03-03 15:11:03 +00:00
Michael Brown f22c19f3fb [cmdline] Add the "ipstat" command
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-03-02 23:57:47 +00:00
Michael Brown c99f9ee9df [dhcp] Remove obsolete dhcp() function
All functionality provided by dhcp() has now been obviated by the more
generic ifconf().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-05 17:42:55 +00:00
Michael Brown 26b87b221b [ifmgmt] Add ifconf() to carry out network device configuration
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-05 17:30:20 +00:00
Michael Brown 16d37102ca [ifmgmt] Rewrite iflinkwait() to use monojob_wait()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-05 17:15:24 +00:00
Michael Brown 92c56e129b [cmdline] Rewrite "sync" command to use monojob_wait()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-01 17:00:16 +00:00
Michael Brown 5e1fa5cd40 [parseopt] Add parse_timeout()
Parsing a timeout value (specified in milliseconds) into an internal
timeout value measured in timer ticks is a common operation.  Provide
a parse_timeout() value to carry out this conversion automatically.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-01 02:26:19 +00:00
Michael Brown de35167714 [ping] Add top-level ping() function to ping a host
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-10-21 15:08:18 +01:00
Michael Brown 37ccbd301d [neighbour] Add nstat() function to print out neighbour table
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-09-25 14:36:30 +01:00
Michael Brown 43307b4e39 [ipv4] Abstract out protocol-specific portions of "route" command
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-09-03 16:30:18 +01:00
Michael Brown 033f4c92ca [autoboot] Split main control flow out of main() into a new function ipxe()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-03-13 22:24:13 +00:00
Patrick Plenefisch 8e4faa0948 [cmdline] Add standalone "nslookup" command
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-09-10 15:31:14 +01:00
Michael Brown d1465f7b0b [image] Add the "imgtrust" and "imgverify" commands
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-03-25 00:11:43 +00:00
Michael Brown 1c127a6962 [image] Simplify image management commands and internal API
Remove the name, cmdline, and action parameters from imgdownload() and
imgdownload_string().  These functions now simply download and return
an image.

Add the function imgacquire(), which will interpret a "name or URI
string" parameter and return either an existing image or a newly
downloaded image.

Use imgacquire() to merge similar image-management commands that
currently differ only by whether they take the name of an existing
image or the URI of a new image to download.  For example, "chain" and
"imgexec" can now be merged.

Extend imgstat and imgfree commands to take an optional list of
images.

Remove the arbitrary restriction on the length of image names.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-03-24 23:12:04 +00:00
Michael Brown 790035f78d [image] Eliminate the register_and_xxx_image() functions
All users of imgdownload() require registration of the image, so make
registration an integral part of imgdownload() itself and simplify the
"action" parameter to be one of image_select(), image_exec() et al.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-10-25 01:41:41 +01:00
Michael Brown 5d2802e403 [sanboot] Add "sanhook" and "sanunhook" commands
Expose the multiple-SAN-drive capability of the iPXE core via the iPXE
command line by adding commands to hook and unhook additional drives.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-04-24 16:44:34 +01:00
Michael Brown 9fa4ac2e9a [image] Simplify use of imgdownload()
Allow imgdownload() to be called without first having to allocate (and
so keep track of) an image.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-09 16:57:34 +00:00
Michael Brown d17a84a056 [image] Move the register_and_{select|boot}_image() functions to imgmgmt.c
These functions are used only as the "action" parameters to
imgdownload() or imgfetch(), and so belong in imgmgmt.c rather than
image.c

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-09 13:11:35 +00:00
Michael Brown c4b6c244b0 [prompt] Replace shell_banner() with a generic prompt() function
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-07 19:53:53 +00:00
Michael Brown 34b6ecb2f1 [image] Simplify image management
Refactor the {load,exec} image operations as {probe,exec}.  This makes
the probe mechanism cleaner, eliminates some forward declarations,
avoids holding magic state in image->priv, eliminates the possibility
of screwing up between the "load" and "exec" stages, and makes the
documentation simpler since the concept of "loading" (as distinct from
"executing") no longer needs to be explained.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-07 00:37:50 +00:00
Michael Brown 3c9c27b8e6 [image] Allow download job to complete before acting upon image
Allow the monojob controlling the download to complete before calling
register_image() and friends.  This allows the trailing "ok" from
monojob.c to be printed before the image starts executing (and
possibly printing output of its own).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-02 19:29:24 +00:00
Michael Brown e088892a81 [autoboot] Connect SAN disk during a filename boot, if applicable
For performing installations direct to a SAN target, it can be very
useful to hook a SAN disk and then proceed to perform a filename boot.
For example, the user may wish to hook the (empty) SAN installation
disk and then boot into the OS installer via TFTP.  This provides an
alternative mechanism to using "keep-san" and relying on the BIOS to
fall through to boot from the installation media, which is unreliable
on many BIOSes.

When a root-path is specified in addition to a boot filename, attempt
to hook the root-path as a SAN disk before booting from the specified
filename.  Since the root-path may be used for non-SAN purposes
(e.g. an NFS root mount point), ignore the root-path if it contains a
URI scheme that we do not support.

Originally-implemented-by: Jarrod Johnson <jarrod.b.johnson@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-01-27 20:41:27 +00:00
Michael Brown 962cada830 [init] Remove concept of "shutdown exit flags"
Remove the concept of shutdown exit flags, and replace it with a
counter used to keep track of exposed interfaces that require devices
to remain active.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-01-27 20:40:26 +00:00
Michael Brown 17b337d4a8 [autoboot] Use generic option-parsing library
Total saving: 32 bytes.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-11-21 20:38:39 +00:00
Michael Brown 4448285142 [autoboot] Add "netboot" command
Originally-implemented-by: michael-dev@fami-braun.de
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-11-20 17:20:03 +00:00
Michael Brown 1782fc7011 [lotest] Move lotest.h to correct directory
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-11-18 23:30:50 +00:00
Michael Brown bf2657075d [fc] Add Fibre Channel management commands
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-09-15 03:17:30 +01:00
Joshua Oreman 2aad3fab23 [build] Use weak definitions instead of weak declarations
This removes the need for inline safety wrappers, marginally reducing
the size penalty of weak functions, and works around an apparent
binutils bug that causes undefined weak symbols to not actually be
NULL when compiling with -fPIE (as EFI builds do).

A bug in versions of binutils prior to 2.16 (released in 2005) will
cause same-file weak definitions to not work with those
toolchains. Update the README to reflect our new dependency on
binutils >= 2.16.

Signed-off-by: Joshua Oreman <oremanj@rwcr.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-05-27 10:19:14 +01:00
Michael Brown 8406115834 [build] Rename gPXE to iPXE
Access to the gpxe.org and etherboot.org domains and associated
resources has been revoked by the registrant of the domain.  Work
around this problem by renaming project from gPXE to iPXE, and
updating URLs to match.

Also update README, LOG and COPYRIGHTS to remove obsolete information.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-04-19 23:43:39 +01:00
Joshua Oreman fa4aec8f03 [config] Make PXE stack a compile-time option
For extremely tight space requirements and specific applications, it is
sometimes desirable to create gPXE images that cannot provide the PXE API
functionality to client programs. Add a configuration header option,
PXE_STACK, that can be removed to remove this stack. Also add PXE_MENU
to control the PXE boot menu, which most uses of gPXE do not need.

Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-20 17:23:37 -05:00
Joshua Oreman 1327a787eb [iwmgmt] Add wireless management commands and text for common errors
Add commands `iwstat' (to list 802.11-specific status information for
802.11 devices) and `iwlist' (to scan for available networks and print
a list along with security information).

Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-05 09:11:21 -05:00
Michael Brown c44a193d0d [legal] Add a selection of FILE_LICENCE declarations
Add FILE_LICENCE declarations to almost all files that make up the
various standard builds of gPXE.
2009-05-18 08:33:25 +01:00
Michael Brown 881f1f59ef [pxe] Obey lists of PXE Boot Servers and associated Discovery Control bits
Various combinations of options 43.6, 43.7 and 43.8 dictate which
servers we send Boot Server Discovery requests to, and which servers
we should accept responses from.  Obey these options, and remove the
explicit specification of a single Boot Server from start_pxebs() and
dependent functions.
2009-02-05 09:34:32 +00:00
Michael Brown e65afc4b10 [dhcp] Split PXE menuing code out of dhcp.c
The DHCP client code now implements only the mechanism of the DHCP and
PXE Boot Server protocols.  Boot Server Discovery can be initiated
manually using the "pxebs" command.  The menuing code is separated out
into a user-level function on a par with boot_root_path(), and is
entered in preference to a normal filename boot if the DHCP vendor
class is "PXEClient" and the PXE boot menu option exists.
2009-02-01 01:21:40 +00:00
Michael Brown 54c024e0af [sanboot] Quick and dirty hack to make SAN boot protocols selectable 2008-10-13 10:05:51 +01:00
Michael Brown 03c80c12b8 [iSCSI] Support Windows Server 2008 direct iSCSI installation
Add yet another ugly hack to iscsiboot.c, this time to allow the user to
inhibit the shutdown/removal of the iSCSI INT13 device (and the network
devices, since they are required for the iSCSI device to function).

On the plus side, the fact that shutdown() now takes flags to
differentiate between shutdown-for-exit and shutdown-for-boot means that
another ugly hack (to allow returning via the PXE stack on BIOSes that
have broken INT 18 calls) will be easier.

I feel dirty.
2008-07-17 17:45:17 +01:00