Novell Home

SLE10: Create a YaST Installation Source for Auto Installation

Novell Cool Solutions: Feature
By Cameron Seader

Digg This - Slashdot This

Posted: 14 Sep 2007
 

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:

  1. 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.)
    mkdir /Installation_Source/test_directory

  2. Change directory to the directory you just created
    cd /Installation_Source/test_directory

  3. Create another Directory called media.1 and also one called RPMS
    mkdir media.1 RPMS

  4. Create a file called content

    The content file contains a medium content description consisting of the following components:
  5.    	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

  6. 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>

    Example:

    Cameron
    20070907104055
    1

    Note: An easy way to generate the Date of Creation would be date +%Y%m%d%H%M%S


  7. 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.

  8. 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/
  9. 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.

  1. Change your directory to the root of your distribution install source.

  2. 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

  3. 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.

Enjoy!

References:


Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

© 2014 Novell