quick-docs/modules/ROOT/pages/anaconda/anaconda_product_image.adoc

32 lines
1.3 KiB
Text
Raw Normal View History

2018-02-27 11:43:10 +00:00
= Creating a Product image
include::{partialsdir}/unreviewed-message.adoc[]
2018-02-27 11:43:10 +00:00
Anaconda supports several ways to load new code at runtime.
2019-02-26 21:15:59 +00:00
Passing `inst.updates=<url>` is one way to do this and is documented on the xref:anaconda/anaconda_updates.adoc[updates] page.
2018-02-27 11:43:10 +00:00
Another is to include a product.img in the install tree, inside the `/images/` directory.
It will be applied at runtime and can overwrite any file on the system, just like the updates.img.
One use for a product.img is to add a new installclass to Anaconda.
A product image for a new installclass can be created from a directory of files like this:
[source,bash]
2018-02-27 11:43:10 +00:00
----
$ mkdir -p product/run/install/product/pyanaconda/installclasses/
$ vim product/run/install/product/pyanaconda/installclasses/custom.py
2018-02-27 11:43:10 +00:00
----
2018-02-27 17:33:34 +00:00
Create new installclass, see link:https://github.com/rhinstaller/anaconda/tree/master/pyanaconda/installclasses[Anaconda code] for examples.
2018-02-27 11:43:10 +00:00
Now you can create the product.img:
[source,bash]
2018-02-27 11:43:10 +00:00
----
$ cd product/
$ find . | cpio -c -o | pigz -9cv > ../product.img
2018-02-27 11:43:10 +00:00
----
Now you can include product.img in the tree, inside `/images/`.
Alternatively you can now use lorax to create product.img as part of the boot.iso creation process.
This is supported by lorax-21.27-1 and is documented link:http://rhinstaller.github.io/lorax/product-images.html[here] in the Lorax source tree.