On all openSUSE Leap versions, the automatic installation gets invoked by
adding autoyast=<PATH_TO_PROFILE>
to the kernel
parameter list. So for example adding
autoyast=http://MYSERVER/MYCONFIG.xml
will start an automatic installation where the profile with the AutoYaST
configuration gets fetched from the Web server
myserver
. See Section 9.3, “Invoking the auto-installation process” for
more information.
A profile is the AutoYaST configuration file. The content of the AutoYaST profile determines how the system will be configured and which packages will get installed. This includes partitioning, network setup, and software sources, to name but a few. Almost everything that can be configured with YaST in a running system can also be configured in an AutoYaST profile. The profile format is an ASCII XML file.
The easiest way to create an AutoYaST profile is to use an existing
openSUSE Leap system as a template. On an already installed system, start
› › . Now select › from the menu. Choose the system components you want to
include in the profile. Alternatively, create a profile containing the
complete system configuration by running sudo yast
clone_system
from the command line.
Both methods will create the file /root/autoinst.xml
.
The version created on the command line can be used to set up an identical
clone of the system on which the profile was created. However, usually you
will want to adjust the file to make it possible to install several
machines that are very similar, but not identical. This can be done by
adjusting the profile using your favorite text/XML editor.
The most efficient way to check your created AutoYaST profile is by using
jing
or xmllint
.
See Section 3.3, “Creating/editing a control file manually” for details.
If a section has not been defined in the AutoYaST profile the settings of the
general YaST installation proposal will be used. However, you need to
specify at least the root
password to be able to log in to the
machine after the installation.
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE profile> <profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns"> <users config:type="list"> <user> <encrypted config:type="boolean">false</encrypted> <user_password>linux</user_password> <username>root</username> </user> </users> </profile>
Use the following sound
section in your profile:
<sound> <autoinstall config:type="boolean">true</autoinstall> <configure_detected config:type="boolean">true</configure_detected> </sound>
Put the profile in the root of the DVD. Refer to it with
file:///PROFILE.xml
.
To merge two profiles, a.xml
with
base.xml
, run the following command:
>
/usr/bin/xsltproc --novalid --param replace "'false'" \
--param dontmerge1 "'package'" --param with "'a.xml'" --output out.xml \
/usr/share/autoinstall/xslt/merge.xslt base.xml
This requires sections in both profiles to be in alphabetical order (<software>, for example, needs to be listed after <add-on>). If you have created the profile with YaST, profiles are automatically sorted correctly.
The dontmerge1
parameter is optional and an example of
what to do when you use the dont_merge
element in your
profile. See Section 6.4, “Merging of rules and classes” for more information.
Zypper can only be called from AutoYaST init scripts, because during the post-script phase, YaST still has an exclusive lock on the RPM database.
If you really need to use other script types (for example a post-script) you will need to break the lock at your own risk:
<post-scripts config:type="list"> <script> <filename>yast_clone.sh</filename> <interpreter>shell</interpreter> <location/> <feedback config:type="boolean">false</feedback> <source><![CDATA[#!/bin/sh mv /var/run/zypp.pid /var/run/zypp.sav zypper in foo mv /var/run/zypp.sav /var/run/zypp.pid ]]></source> </script> </post-scripts>
Actually the order is not important. The order of sections in the profile has no influence on the AutoYaST workflow. However, to merge different profiles, sections need to be in alphabetical order.
linuxrc
blocks the installation with File not
signed
. I need to manually interact.
linuxrc
found an unsigned file, such as a driver
update. To use an unsigned file, you can suppress that message by passing
insecure=1
to the linuxrc
parameter
list (together with the autoyast=...
parameter).
You need to pass ifcfg
to linuxrc
.
This is required to set up the network, otherwise AutoYaST cannot download the
profile from the remote host. See Section C.3, “Advanced network setup” for
more information.
/
) possible?
Yes, but it is more complex than other methods. The environment (DHCP, TFTP, etc.) must be set up very carefully. The AutoYaST profile must look like the following:
<?xml version="1.0"?> <!DOCTYPE profile> <profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns"> <partitioning config:type="list"> <drive> <device>/dev/nfs</device> <initialize config:type="boolean">false</initialize> <type config:type="symbol">CT_NFS</type> <partitions config:type="list"> <partition> <filesystem config:type="symbol">nfs</filesystem> <fstopt>nolock</fstopt> <device>10.10.1.53:/tmp/m4</device> <mount>/</mount> </partition> </partitions> <use>all</use> </drive> </partitioning> </profile>
There is an AutoYaST mailing list where you can post your questions. Join us at https://lists.opensuse.org/opensuse-autoinstall/.