SLE10: Create a YaST Installation Source for Auto Installation | SUSE Communities

SLE10: Create a YaST Installation Source for Auto Installation

Share
Share

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

 

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

 

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

 

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

 

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

 

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

 

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

 

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

 

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

 

 

 

 

Share
(Visited 1 times, 1 visits today)

Comments

  • Avatar photo anonymous says:

    Hi

    please explain this step “create_package_descr -d RPMS/” as there is no real command exec.

    –bboy

  • Leave a Reply

    Your email address will not be published. Required fields are marked *

    Avatar photo
    4,477 views
    cseader Senior Innovative Technologist with over 15 years of experience delivering creative, customer-centric value and solutions. Broad experience in many different verticals, architectures, and data center environments. Proven leadership experience ranging from evaluating technology, collaborating across engineering teams and departments, competitive analysis, and strategic planning. Highly-motivated with a track record of success in consistent achievement of projects and goals, and driving business function and management. Skilled problem identifier and troubleshooter, continually learning and adapting, and strong analytical skills. Efficient, organized leader with success in coordinating efforts within internal-external teams to reach and surpass expectations. Expert-level skills in the implementation, analysis, optimization, troubleshooting, and documentation of mode 1 and mode 2 data center systems.