From Fedora Project Wiki
fp-wiki>ImportUser
(Imported from MoinMoin)
 
(Alternatively)
 
(5 intermediate revisions by 4 users not shown)
Line 3: Line 3:
How to Create an Anaconda Product Image
How to Create an Anaconda Product Image


<pre> dd if=/dev/zero of=product.img bs=1k count=1440
Anaconda supports several ways to load new code at runtime. Passing inst.updates=<url> is one way to do this and is documented on the [[Anaconda/Updates|  updates]] page. Another is to include a product.img in the install tree, inside the <code>/images/</code> directory. It will be applied at runtime and can overwrite any file on the system, just like the updates.img.
mke2fs product.img
mount -o loop product.img /mnt </pre>


* Create a custom install class in /mt - see anaconda/installclasses in the
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:
anaconda source
* umount /mnt
* Amend setSteps and setGroupSelection appropriately for your desired customisation


Put product.img in Fedora/base of your disc1.
<pre>
mkdir -p product/run/install/product/pyanaconda/installclasses/
vim product/run/install/product/pyanaconda/installclasses/custom.py
</pre>
 
Create new installclass, see [https://git.fedorahosted.org/cgit/anaconda.git/tree/pyanaconda/installclasses Anaconda] for examples. Now you can create the product.img:
 
<pre>
cd product/
find . | cpio -c -o | pigz -9cv > ../product.img
</pre>
 
Now you can include product.img in the tree, inside <code>/images/</code>.
 
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 [http://rhinstaller.github.io/lorax/product-images.html here] in the Lorax source tree.


<BR>
<BR>
----
----
[[Category:Anaconda]]
[[Category:Anaconda]]

Latest revision as of 08:35, 8 August 2018

Product image

How to Create an Anaconda Product Image

Anaconda supports several ways to load new code at runtime. Passing inst.updates=<url> is one way to do this and is documented on the updates page. 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:

mkdir -p product/run/install/product/pyanaconda/installclasses/
vim product/run/install/product/pyanaconda/installclasses/custom.py

Create new installclass, see Anaconda for examples. Now you can create the product.img:

cd product/
find . | cpio -c -o | pigz -9cv > ../product.img

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 here in the Lorax source tree.