:B~ Customizing the binary image

1~customizing-binary Customizing the binary image

2~ Bootloader

live-build uses /{syslinux}/ and some of its derivatives (depending on the image type) as bootloaders by default. They can be easily customized in two ways.

In order to use a full theme, copy #{/usr/share/live/build/bootloaders}# into #{config/bootloaders}# and edit files in there. If you do not want to bother modifying all supported bootloader configurations, only providing a local customized copy of one of the bootloaders, e.g. *{isolinux}* in #{config/bootloaders/isolinux}# is enough too, depending on your use case.

There is also the possibility of making smaller changes. For instance, syslinux derivatives are configured by default with a timeout of 0 (zero) which means that they will pause indefinitely at their splash screen until you press a key.

To modify the boot timeout of a default #{iso-hybrid}# image just edit a default *{isolinux.cfg}* file specifying the timeout in units of seconds and add it to #{config/includes.binary/isolinux/}#

A modified *{isolinux.cfg}* to boot after five seconds would be similar to this:

code{

 include menu.cfg
 default vesamenu.c32
 prompt 0
 timeout 50

}code

An alternative way of achieving the same goal could be writing a hook and adding it to #{config/hooks/}#. Remember to add the #{.binary}# suffix to run in the binary stage. A proposed example:

code{

 #!/bin/sh

 sed -i -e 's|timeout 0|timeout 50|' binary/isolinux/isolinux.cfg

}code

Likewise, if you want to use a personalized splash.png image, add a picture of 640x480 pixels to #{config/includes.binary/isolinux/}#

2~ ISO metadata

When creating an ISO9660 binary image, you can use the following options to add various textual metadata for your image. This can help you easily identify the version or configuration of an image without booting it.

_* #{LB_ISO_APPLICATION/--iso-application NAME}#: This should describe the application that will be on the image. The maximum length for this field is 128 characters.

_* #{LB_ISO_PREPARER/--iso-preparer NAME}#: This should describe the preparer of the image, usually with some contact details. The default for this option is the live-build version you are using, which may help with debugging later. The maximum length for this field is 128 characters.

_* #{LB_ISO_PUBLISHER/--iso-publisher NAME}#: This should describe the publisher of the image, usually with some contact details. The maximum length for this field is 128 characters.

_* #{LB_ISO_VOLUME/--iso-volume NAME}#: This should specify the volume ID of the image. This is used as a user-visible label on some platforms such as Windows and Apple Mac OS. The maximum length for this field is 32 characters.
