[dmesg] Add an in-memory ring buffer console

Add a trivial ring buffer console that can be used to extract the most
recent 8kB of (non-UI) console output as the ${dmesg} setting.

This allows previous console output to be displayed after the screen
has been cleared, such as when a background picture has been loaded.
For example:

    #!ipxe
    console -p http://boot.ipxe.org/ipxe.png
    show -q dmesg

It also allows console output to be captured and sent as part of an
HTTP POST, to allow for remote diagnostics.  For example:

    #!ipxe
    params
    param dmesg ${dmesg:base64}
    imgfetch http://192.168.0.1/api/diags##params

The recorded console output may be cleared if necessary by clearing
the setting:

    clear builtin/dmesg

The name ${dmesg} is chosen as being unlikely to collide with any
existing variables used in end-user scripts.  A separate "dmesg"
command is not provided, but could easily be added if useful.

Note that iPXE supports recursive variable expansion in shell
commands.  Typing an interactive command such as "echo ${dmesg}" or
"param dmesg ${dmesg}" is therefore a great way to exercise the memory
allocator to the point of exhaustion.  Use "show -q dmesg" to show the
ring buffer contents.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
4 files changed
tree: 45c2f18c7d48817bd9519ea533a3280d8bdb724b
  1. .github/
  2. contrib/
  3. src/
  4. CHANGELOG.md
  5. CONTRIBUTING.md
  6. COPYING
  7. COPYING.GPLv2
  8. COPYING.UBDL
  9. README.md
  10. RELEASE.md
  11. RELNOTES.tmpl.md
README.md

iPXE network bootloader

Build Coverity Release

iPXE is the leading open source network boot firmware. It provides a full PXE implementation enhanced with additional features such as:

  • boot from a web server via HTTP or HTTPS,

  • boot from an iSCSI, FCoE, or AoE SAN,

  • control the boot process with a script,

  • create interactive forms and menus.

You can use iPXE to replace the existing PXE ROM on your network card, or you can chainload into iPXE to obtain the features of iPXE without the hassle of reflashing.

iPXE is free, open-source software licensed under the GNU GPL (with some portions under GPL-compatible licences).

You can download the rolling release binaries (built from the latest commit), or use the most recent stable release.

For full documentation, visit the iPXE website.