Show Table of Contents
15.4. Extending the Discovery Image
It is possible to extend the Satellite Discovery image with custom facts, software, or device drivers. You can also provide a compressed archive file containing extra code for the image to use.
First, create the following directory structure:
.
├── autostart.d
│ └── 01_zip.sh
├── bin
│ └── ntpdate
├── facts
│ └── test.rb
└── lib
├── libcrypto.so.1.0.0
└── ruby
└── test.rb
Where:
- The
autostart.ddirectory contains scripts that are executed in POSIX order by the image when it starts, but before the host is registered to Satellite. - The
bindirectory is added to the $PATH variable; you can place binary files here and use them in the autostart scripts. - The
factsdirectory is added to the FACTERLIB variable so that custom facts can be configured and sent to Satellite. - The
libdirectory is added to the LD_LIBRARY_PATH variable andlib/rubyis added to the RUBYLIB variable, so that binary files in/bincan be executed correctly.
New directives and options are appended to the existing environment variables (PATH, LD_LIBRARY_PATH, RUBYLIB and FACTERLIB). If you need to specify the path to something explicitly in your scripts, the zip contents are extracted to the
/opt/extension directory on the image.
After creating the above directory structure, package it into a zip archive with the following command:
zip -r my_extension.zip .
You can create multiple zip files but be aware they will be extracted to the same place on the Discovery image, so files in later zips will overwrite earlier ones if they have the same file name.
To inform the Discovery image of the extensions it should use, place your zip files on your TFTP server with the Discovery image, and then update the APPEND line of the PXELinux template with the
fdi.zips option where the paths are relative to the TFTP root. For example, if you have two archives at $TFTP/zip1.zip and $TFTP/boot/zip2.zip, use the following syntax:
fdi.zips=zip1.zip,boot/zip2.zip
See Section 15.1.2, “Configuring PXE-booting” for more information on updating the PXE template.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.