FAQ:Customize the Appliance Installer
From rPath Wiki
| FAQ | ||
| Question: How can I customize the installer for my appliance? | ||
Answer: You can create customized Anaconda installer templates for your project to modify the initial installation environment for your distribution project, such as specifying a particular kernel to use during the installation.
To create custom Anaconda templates for your project's installer, you must shadow an existing anaconda-templates trove, and customize the required elements via a configuration file. After adjusting the configuration, you then cook the customized anaconda-templates trove into your project's repository.
The customized anaconda-templates trove will then be automatically imported and used by your project's release images.
The following example demonstrates modification of anaconda-templates to change the project name as it appears in the installer:
Contents |
Shadow the Anaconda Templates
The first step in the customization process is to shadow the anaconda-templates trove into your project:
[you@yourhost ~]$ cd myproject [you@yourhost myproject]$ cvc shadow yourproj.rpath.org@rpl:devel anaconda-templates=conary.rpath.com@rpl:1
Modify the Configuration
Next, modify the template.conf file according to your project requirements. For example, if you want to change the name of the distribution to "Purpose-Built Linux", you modify the value of distroname in the file:
# distroname is the string used for distribution identification # during installation distroname="Purpose-Built Linux"
Cook Your Custom Anaconda Templates
Now, it's time to cook your custom anaconda-templates trove. You can cook the trove in your local filesystem to verify it (see note below) or cook it into your project's repository. First, cook the trove locally with the following command:
[you@yourhost yourproject]$ cvc cook anaconda-templates.recipe + Building anaconda-templates ... Changeset written to: anaconda-templates-0.5.ccs
| Examine the changeset file; the file's size should be approximately 220MB. If so, then the custom trove is cooking properly, and you can proceed to cooking it into your project repository |
Provided the changeset file from a local cook looks good, go ahead and cook the trove into your project's repository:
[you@yourhost yourproject]$ cvc cook anaconda-templates + Building anaconda-templates ... Changeset committed to the repository.
The custom Anaconda templates will now be automatically used in the group cook and subsequent release generation.
Notes
- The Anaconda template customization process is quite time consuming, and can require up to several hours to complete.
- Use the
$installlabelin thetemplate.conffile to specify additional install label paths to use for your custom components, but leave the default labels intact, as they reference important standard Anaconda runtime components.
- The cook logs will display numerous errors regarding missing troves, and this is an expected behavior. Remember to examine the changeset file size from a local cook to ensure the trove is cooked properly
- If you are customizing the Anaconda templates to use a particular installation kernel with support for a certain network or storage driver, this driver needs to be added to the
loader2/module-infofile in the anaconda source tarball. After adding the reference to your driver, you need to commit and cook the new anaconda source tarball. Use this new anaconda to cook your anaconda-templates package.
