SLE10: Create a YaST Installation Source for Auto Installation
There are many needs that arise to be able to create a YaST Installation Source that can be used during an Auto Installation or a Network installation. This method can be used to install new packages, or it can be used to update existing ones such as a PTF, patch, etc. that you either get from our support group or some other method.
In the course of this document I am assuming that your environment already has an Installation Source created. I will be using an HTTP Installation Source, but this will also apply with any other source as well whether its NFS, FTP, TFTP, etc. it does not matter. Please read ahead so you don’t make any mistakes before you get to the end of this document.
Creation of the YaST Installation Source:
- Create a Directory within the Installation Source that will contain your new YaST Source. ( replace Installation_Source with the path to your source, and replace test_directory with the directory you would like to create.)
- Change directory to the directory you just created
- Create another Directory called media.1 and also one called RPMS
mkdir media.1 RPMS
- Create a file called contentThe content file contains a medium content description consisting of the following components:
Key Content PRODUCT Product name VERSION Product version VENDOR Product vendor LABEL Source designation to be used in YaST ARCH.<base> Supported architectures for the base architecture DEFAULTBASE Default base architecture DESCRDIR The directory containing the package descriptions DATADIR The directory containing the packages
The following is an example content file:
Product test Version 10.1 Vendor Test Co. LABEL Test Add On ARCH.i586 i586 i386 noarch src DEFAULTBASE i586 DESCRDIR setup/descr DATADIR RPMS
- Create a file called media under the directory media.1
The media file contains a medium description consisting of the following components:
<Author> <Date of Creation (YYYYMMDDhhmmss)> <Number of media>
Cameron 20070907104055 1
Note: An easy way to generate the Date of Creation would be date +%Y%m%d%H%M%S
- Now we need to drop the rpm’s into the proper directory. So under the RPMS directory we created we need to create an i586, x86_64, noarch, src, nosrc, i386 etc. directory pertaining to our needs, and drop the rpm into its respective directory.
- Now lets generate the setup/descr/* directory and meta data content with the command below. (When you run this command make sure your pwd states that your at the root of the source you created i.e. /Installation_Source/test_directory)
create_package_descr -d RPMS/
- The final thing is to generate a file called directory.yast which has the directory contents. We can easily create this from the following command.
ls -A1 > directory.yast
That concludes the creation of the YaST Source, and we are ready to move onto the incorporation of the source into an Auto Installation. Below is a Tree view of the YaST Source we just created. (of course your RPMS directory will contain some rpm’s).
|-- content |-- directory.yast |-- media.1 | |-- media |-- setup | |-- descr | |-- packages | |-- packages.DU | |-- packages.en | |-- RPMS |-- i386 |-- i586 |-- noarch |-- src
Auto Installation Preparation:
Two things need to be done at this point. First we need to create a file in the root of the Distribution install source directory, such as for SLES10 or SLES10SP1. Second we need to modify our autoinst.xml file so that we have proper signature handling. Follow the steps below finish up.
- Change your directory to the root of your distribution install source.
- Create a file called add_on_products with the contents of the URL to the YaST source you created above. example of the contents below. (note: you can have more than one URL, just make sure that they are on a different line)http://10.10.10.10/install/test
- Edit your autoinst.xml file and make sure that your signal handling section appears like the contents below. ( This should go in the general section of your autoinst.xml file)
<signature-handling> <accept_unsigned_file config:type="boolean">true</accept_unsigned_file> <accept_file_without_checksum config:type="boolean">true</accept_file_without_checksum> <accept_verification_failed config:type="boolean">true</accept_verification_failed> <accept_unknown_gpg_key config:type="boolean">true</accept_unknown_gpg_key> <import_gpg_key config:type="boolean">true</import_gpg_key> <accept_non_trusted_gpg_key config:type="boolean">true</accept_non_trusted_gpg_key> </signature-handling>
The reason for the added signal handling is because we created a YaST source that does not have any GPG key signing of any of our files used in the source, so therefore we need the extra signature handling so that AutoYaST won’t fail when adding the source. If you would like to do GPG key signing in your source then you are welcome to do so and can follow some of the extra documentation that I added as a reference.
This concludes our setup to Create a YaST Installation Source for Auto Installation. There are other ways of accomplishing this same objective, however I have put this together because I deemed this as the quickest and easiest way of doing it. Hopefully you find the same.
- Creating Add-Ons