Showing posts with label AutoYaST. Show all posts
Showing posts with label AutoYaST. Show all posts

Friday, April 8, 2011

Cobbler on openSUSE

Preamble


What is cobbler?


To answer that, I want to quote from the homepage of Cobbler


Cobbler is a Linux installation server that allows for rapid setup of network installation environments. It glues together and automates many associated Linux tasks so you do not have to hop between lots of various commands and applications when rolling out new systems, and, in some cases, changing existing ones.

With a simple series of commands, network installs can be configured for PXE, reinstallations, media-based net-installs, and virtualized installs (supporting Xen, qemu, KVM, and some variants of VMware). Cobbler uses a helper program called 'koan' (which interacts with Cobbler) for reinstallation and virtualization support.


This artice describes the installation and setup of Cobbler on openSUSE 11.4 and the basic steps of using it.

Preparation


Install the required software


First of all, you need it install an openSUSE 11.4 with the cobbler+cobbler-web package installed of course :)

Most people will have those repos already after the installation but anyway, if you don't have the default repos do:

zypper ar http://download.opensuse.org/distribution/11.4/repo/oss/ oss
zypper ar http://download.opensuse.org/update/11.4/ updates

There is cobbler v2.0.10 on openSUSE 11.4 (oss repo) but that version does not have all fixes and functionality you want. So you have to use the latest cobbler version you can find in this repo:


zypper ar http://download.opensuse.org/repositories/systemsmanagement/openSUSE_11.4/ cobbler
zypper ref -s

Make sure you have the latest mod_python module update installed. It has to be at least apache2-mod_python-3.3.1-161 because the 11.4 goldmaster version of mod_python has a bug and does not work with any python script. We released an online update for mod_python on 11.4 on openSUSE 11.4 in the beginning of march 2011, so maybe you already have it installed. In any case, do:

zypper up apache2-mod_python

Now we install cobbler:

zypper install cobbler cobbler-web atftp

That should install version 2.1.0 or later. We are done with the package installation and have to do some configuration now.


Basic configuration of Cobbler


If you want to use the cobbler web ui, you have to authenticate and there are multiple ways cobbler can authenticate a user. In the file /etc/cobbler/modules.conf we set the authentication module to authn_configfile. That will read the account information from /etc/cobbler/users.digest:

sed -i 's/module = authn_denyall/module = authn_configfile/' \
/etc/cobbler/modules.conf

There are more auth modules like for ldap-authentication and they are all documented in /etc/cobbler/modules.conf

Now we change the server settings in /etc/cobbler/settings. Search for "server: 127.0.0.1" in that file and replace it with the ip address of your cobbler server. That address will end later in the autoyast=..... and install=.... parameter.


YOUR_IP="....."
sed -i "s/^server: 127.0.0.1/server: $YOUR_IP/" \
/etc/cobbler/settings

We are done with the basic configuration now and it's time start cobbler for the first time:

insserv apache2
insserv cobblerd
rcapache2 restart
rccobblerd restart

First Steps


Look around


take your webbrowser and visit http://localhost/cobbler_web. You'll get a login mask where you can login with user: cobbler, password: cobbler. That's the default configuration in /etc/cobbler/users.digest and we did not change that so far. If you want to add your own accounts, you can do that by:


htdigest2 /etc/cobbler/users.digest "Cobbler" $USER

After the login, your webbrowser presents you a webpage like this:


We are ready to work with cobbler now.

Importing a Distro


To do installations, we need an installation source. So let us import one into Cobbler and we use the openSUSE 11.4 DVD for that. Please mount the DVD to /mnt and choose "Import DVD" on the left side of the webui. Fill out the form like you see on the screenshot:


If you press the "run" button, an import job is being scheduled. You can see the job by clicking on "Events" (third link from the top in "Configuration" on the left side). Your import job has the state "running" but that will change to "complete" in a while, when cobbler has copied the complete DVD to the harddisk.

When Cobbler has finished the import, two new distros are created like you can see on the Distros page


Distro is another word for installation source but why two? Because the DVD contains two bootable kernels. One for xen guests and one for a normal physical machine. You can see that one distro got a "xen" in the name and that's the installation source you can use to install virtual xen machines.
As you can see, an install=... parameter has already been added by Cobbler so the distro is ready for installations. You can add own kernel parameter if you wish but for this tutorial it's not needed.

Adding an Autoinstallation Profile


Profiles in Cobbler are connected to a distribution.

If you click on Profiles you can see that cobbler has created two empty autoinstallation profiles already - one for each distro. We will ignore those and create our own one by chosing "Create new profile" and click on "go". Copy your AutoYaST XML file to /var/lib/cobbler/kickstarts/ (or any other path you like) and fill out the form like I did:


You can see that I selected the non-xen version of our distros. If you want to install a virtual xen machine, you have to choose the other distro with the "xen" in the name.

If you press "save" you'll get back to the profile overview page where you can see three profiles now, including the one you just created.

On the right side of each profile is a link "view kickstart" and if you press on that, you'll see your XML file (cobbler has added some scripts but you don't have to care about that now).

Install a virtual machine


We have a distro and an AutoYaST XML file now and that's enough to create a virtual machine. I'll not explain here how to setup kvm or xen but I assume you have a physical machine configured for running virtual machines. I use kvm and need to to some little changes in the test_profile for that. I change the virt-type to qemu and the Virt Bridge from xenbr0 tp br0 because that's how the bridge is called on my virtual host platform.

You have to install koan from the same repo as cobbler on your virtual host platform (cobbler itself is not needed to be installed) and run:

koan --server=$your_cobbler_server.example.net \
--virt \
--profile=test_profile \
--virt-name=virt_host1

This will trigger the creation and autoinstallation of a virtual machine called "virt_host1". If you start virt-manager, you can see that the machine is installing the openSUSE 11.4 with the AutoYaST XML file.

Bare Metal Installation


If you want to do bare metal installations via PXE boot, you need to acticate the tftp server on the Cobbler machine:

rcatftpd start
insserv atftpd

For the bare metal installation we have to create a system record in Cobbler, so let's got to Systems -> create new system and configure the fields as I di in the screenshot:


When you press save you will be redirected to the systems-list and you can see your system there. If you switch to the console, you can see that a PXE boot config file was created in /srv/tftpboot/pxelinux.cfg/01-yo:r:mac:add:rr:ess so it'll start an installation next time it boots.

If you set the option pxe_just_once in /etc/cobbler/settings to "1", autoyast will turn off the PXE boot before it reboots at the end of the 1st stage, so you don't have endless PXE boot loops. You can switch on/off the netboot option for a system in the web ui of cobbler.

What else?


There is a lot to discover in cobbler. For example:

  • You can create Snippets which are a kind of include files but way more powerful. They can be referenced by $SNIPPET(name_of_snippet) then in the AutoYaST XML file

  • You can let Cobbler manage your dhcp server, so all systems get a dhcp record automatically (very useful, I use it here in my testlab)
  • You can let Cobbler manage your dns server, so all systems get a dns record automatically (very useful too but I don't use it here)
  • You can create boot ISO images so you can do installations without network
  • You can register existing systems by calling cobbler-register to add a system-record based on the running system automatically (devel:tools:python-ethtool is needed for that on the client)

  • You can let koan reinstall a running machine. It'll copy kernel/initrd to the harddisk and rewrites the grub config. With the next reboot, a new system is getting installed on the machine
  • cobbler has a command line client tool called cobbler that lets you do everything you can do in the web ui via command line too
  • ...


As you can see, cobbler offers a lot more than I can cover in one blog.

If you have questions or look for more information go to:

Of course you can send me an eMail too.


have fun, Uwe

Friday, March 4, 2011

SUSE Manager Autoinstall Screenshots

as you might know, we published the SUSE Manager yesterday.
It was fun to work on that project and I learned really a lot.
Anyway, I read many announcement texts in the press and from Novell but I did not see any pictures. People love pictures. So here they come (most screenshots about autoinstallation - I guess you know why ;) ).

Overview page:

AutoYaST/Kickstart Profiles overview:
Edit an AutoYaST profile:

Overview of your systems (machines and virtual machines):
Reinstall a physical machine with AutoYaST/Kickstart:

Install a virtual machine on a physical host with AutoYaST:


Configure bare metal installations (assign an AutoYaST XML file to an ip address range):
that's it for now!
Have fun - Uwe

Thursday, September 30, 2010

AutoYaST and Image Creation/Installation

In openSUSE 11.3 I enhanced the AutoYaST image installation feature a bit and I added a nice useable UI to configure it.
It's still quite beta because I was not able to test it the way I should have but I think that if you are interested in that topic, it's worth a look already.
Let's start immediately and create an AutoYaST image with the UI.

Step 1 - make the openSUSE Installation Source available


taylor:~ # mount /dev/dvd /mnt

I simply mount the openSUSE 11.3 DVD here to the /mnt directory.

Step 2 - start the AutoYaST UI


taylor:~ # yast2 autoyast

When the UI is started, go to the software selection configuration. You'll be asked where the installation source is you want to use.
As you can see in the screenshot, I set the installation source to the mounted DVD by "file:///mnt/".

Hint: You can't create 64bit images on a 32bit system but 32bit images on a 64bit system

Step 3 - select your software for the image


I selected the base pattern and the kernel I want (don't forget the kernel. Linux is no fun without a kernel).




Select okay to return to the main UI when you have selected all the software you want to have in the image.
You probably want to configure anything non image related now, like root password, partitioning, ...

Step 4 - Create the Image





Choose "Image Deployment" in the AutoYaST UI and configure the location of the image. That's where AutoYaST can find it during the installation process.
I want to do a network installation and I'll put the image on my webserver and so I type the http address here.
As you can see in the screenshot, you can also create an ISO. Then you don't have to specify a name and the location, because a DVD ISO will be created that contains the image and the autoyast XML file plus everything you need to do an installation from the ISO by booting it.
Creating an ISO is probably easier in the beginning if you want to play with this feature.

Step 5 - Choose the location to store the image


I'll store it to /srv/www/htdocs/ because that's the document root of my webserver. Like mentioned in step 4, I'll fetch the image from my webserver.



If you create an ISO, you have to choose where to save the ISO now.

Step 6 (optional) - make changes to the image





AutoYaST will now create the image and you can do changes to it when all patterns and packages are installed. You can see that in the screenshot.
So if you want to put any files into the image, you can copy them now to the place shown in the popup, which is a directory that contains the system that will later be dumped to you harddisk. You can even chroot into that directory and let scripts run if you want.
This step is optional, so if you don't want to add files or anything, you can simply press "ok" here to compress the image.

Now you are done with the image creation. Let's take a look at what we have in the XML file now:

...
<software>
<image>
<image_location>http://taylor.suse.de/</image_location>
<image_name>my_image</image_name>
<run_kickoff config:type="boolean">true</run_kickoff>
<script_location>file:///usr/lib/YaST2/bin//fetch_image.sh</script_location>
<script_params config:type="list">
<listentry>http://taylor.suse.de//my_image.tar.gz</listentry>
</script_params>
</image>
<instsource>file:///mnt/</instsource>
<packages config:type="list">
<package>kernel-desktop</package>
</packages>
<patterns config:type="list">
<pattern>apparmor_opt</pattern>
<pattern>base</pattern>
<pattern>yast2_install_wf</pattern>
<pattern>sw_management</pattern>
<pattern>apparmor</pattern>
</patterns>
...


The XML file is prepared for an installation of the image. The fetch_image.sh is part of AutoYaST since openSUSE 11.3 and will fetch and unpack the image after the partitioning is done. That's why we can use "file:///" here, because autoyast will find it as it's part of the autoyast2-installation RPM.
You can replace that script by anything you want that can fetch and unpack the image. So if you have a complete different image type, you can write your own script to fetch and unpack the image. Of course if you have a different kind of image, you can't use the AutoYaST UI anymore to create it. AutoYaST will always create a tar.gz file that contains the installed system.

Installing images via AutoYaST has three major benefits compared to the RPM installation step:

  • multiple times faster

  • post-configuration can be done in the image instead of after the installation

  • very easy switching between image installation and RPM installation (with rules, even dynamically when starting the installation)


You can install images without losing any of the AutoYaST functionality. Ask-dialogs, all kind of scripts (even pre-scripts), complex partitioning and so on is still possible because only the slow RPM installation step is skipped and replaced by putting an image to the harddisk while you have all kinds of flexibility of how that image is created.

As mentioned in the beginning of this article, I had not enough time to test this through but if you are interested in it feel free to play with it and report feedback to me if anything fails or can be enhanced :)

Have fun!

ciao, Uwe

Tuesday, April 20, 2010

AutoYaST and it's Tools


"Al: Didn't you study the manual at all?
Tim: A real man doesn't need a manual. "


Because my last article was for the experts, this is more for the AutoYaST-newbies again.
It's not about AutoYaST itself but about the tools that orbit around it.

  • ayast_setup
    This tool is part of the autoyast2 RPM.
    Bubli wrote an excellent tutorial already so I'll just sum things up a little here.
    With ayast_setup you can reconfigure an already installed and running system without reinstalling it. All you need is an AutoYaST XML file and then call:
    yast2 ayast_setup setup filename=/tmp/my.xml

    The XML file will be read by AutoYaST and applied to your currently running system except (and that's good - you want it that way, believe me) all 1st stage configuration like partitioning, bootloader, pre- and chrootscripts and software selection. So if you use a XML file with partitioning information, your system will not get repartitioned.
    If you want to install packages, you have to use the <post-packages> section because the normal <software> section is evaluated during 1st stage only too.

  • yast2 clone_system
    This tool is also part of the autoyast2 RPM.
    This is kind of the opposite of ayast_setup. At the end of the normal installation, you have the option to clone the freshly installed system for AutoYaST but if you missed that opportunity, you can do that later in the running system with the clone_system client.
    Since openSUSE 11.3 you can call it like this:
    yast2 clone_system help

    and you'll get a list of "known modules" that can be cloned like this:
    known modules:
    bootloader dns-server
    firewall host
    http-server inetd
    iscsi-client kerberos
    lan ldap mail nfs
    ...

    and you can clone them like this:
    yast2 clone_system modules clone=lan,partitioning,software

    This will create an AutoYaST XML file in /root/autoinst.xml with the networking, partitioning and software section. If you don't specify any modules to clone, the same XML file will be created like with the "Clone this System" checkbox at the end of a normal installation.
    The "modules" parameter is new on openSUSE 11.3 and will not work on SLES11. On SLES11 you can only do the default cloning by calling
    yast2 clone_system

    Some customers are even doing remote-cloning with screen and ssh like this:
    ssh --batch root@myhost "screen -D -m yast clone_system &"


  • ayast_probe
    This tool is part of the autoyast2-installation RPM.
    It's not very useful in a running system but can become handy during the installation.
    When you use a rules.xml file, you can do things like (pseudocode) "if installed_product == 'SLES11' and memsize > 1024 use big_software.xml". The real syntax can be found
    here in the documentation.
    The question is, what are reasonable values of installed_product or memsize?
    /usr/lib/YaST2/bin/y2base ayast_probe ncurses
    shows you.


  • yast2 autoyast
    This tool is part of the autoyast2 RPM.
    If you start to look at AutoYaST for the first time, you'll probably get in touch with this tool immediately. It's the AutoYaST userinterface to create a XML file. Every module like networking, samba-client, partitioning, software configuration and so on has a UI here so you don't have to deal with XML code.
    But the AutoYaST UI can do more. You can clone single modules like you can do with the clone_system client by just pressing a single button (I painted that red in the screenshot, where the nfs-client is selected and would be cloned).
    You can apply the config of one module to the currently running system like with ayast_setup but with just a single button press again (green in the screenshot for the nfs-client config).
    And last but not least you can check your XML file for syntax errors.
    It's nearly impossible to create an invalid XML file with the UI and if you are not sure about certain XML parameters, the UI can be of a big help for you.



While the tools above were all 100% AutoYaST related and are only useful in combination with something autoyastish, the following tools are used by people who never heared of AutoYaST too.

  • xsltproc
    xsltproc is part of the libxslt RPM.
    This tool is used to apply XSLT files on a XML file.
    "What???!" - well, you only have to know that AutoYaST uses a XSLT file to merge multiple XML files into one big file. So when you use AutoYaST Rules or AutoYaST Classes your single XML files will be merged to a big one with the help of /usr/share/autoinstall/xslt/merge.xslt.
    It can be very useful to test the merging before you start the actual installation to make sure everything comes out as you planned it:
    /usr/bin/xsltproc --novalid \
    --param replace "'false'" \
    --param dontmerge1 "'package'" \
    --param with "'a.xml'" \
    --output out.xml \
    /usr/share/autoinstall/xslt/merge.xslt \
    b.xml

    a.xml and b.xml will be merged to out.xml. So take a look at out.xml to see if the merging led to the expected result.
    The dontmerge parameter is explained here. In short, you need that parameter if you want to merge two XML files that have the same sections. Like two XML files both with a <software> section.

  • create_update_source.sh and createrepo
    create_update_source.sh is part of the inst-source-utils RPM, createrepo is part of the createrepo RPM
    Both tools are for creating RPM repositories. If you create such a repo and add the location to your XML file, AutoYaST can install the RPMs from that repo too. So if you want to add own RPMs to your installation, don't change the actual SUSE Installation source, but create a new repo and add your RPM's there.
    How to do that is explained here.
    Even if you only want to install RPM's that are on openSUSE or SLES, you can use these tools. You can create a repo with all online-updates that were released and AutoYaST will install those updates then instead of the original RPM's.


I'd say those are the most important tools around AutoYaST - have fun using them for "more power" ;-)

ciao, Uwe

Tuesday, November 17, 2009

Interactive AutoYaST Rules

This article describes a new feature of AutoYaST in openSUSE 11.3 (a backport for 11.2 is available too).

The rules.xml file describes how AutoYaST creates the complete XML profile out of single XML snippet files. Like for example "if the main memory is more than 2GB, use kde.xml, else use windowmaker.xml", "if you find more than one harddisk, use lvm.xml, else use simple_partitioning.xml" ... and so on ...
That's available since ages in AutoYaST what's new now is, that you can present all XML snippets you have to the users so they can select which ones to use on their own.
Confused but curious? Then read on ....

A while ago I read a feature request on the AutoYaST mailinglist that it would be cool to have the <rules> visible and selectable during installation and I was thinking: "Sounds like a good idea. So why not?". So here it is.
People love pictures so lets start with a screenshot:

On the screenshot you can see a dialog where you can choose between two rules where the first one is pre-selected and the second one is greyed out because it conflicts with the first one (I'll explain later what that conflict means).
Lets take a look at the interesting part of the rules.xml file now to see how to create such a dialog.

<rules config:type="list">
...
<rule>
<custom1>
<script>
<![CDATA[
echo -n 100
]]>
</script>
<match>100</match>
<match_type>exact</match_type>
</custom1>
<result>
<profile>rules/kde.xml</profile>
<continue config:type="boolean">true</continue>
</result>
<dialog>
<element config:type="integer">0</element>
<question>KDE Desktop</question>
<title>Desktop Selection</title>
<conflicts config:type="list">
<element config:type="integer">1</element>
</conflicts>
<dialog_nr config:type="integer">0</dialog_nr>
<timeout config:type="integer">30</timeout>
</dialog>
</rule>
<rule>
<custom1>
<script>
<![CDATA[
echo -n 100
]]>
</script>
<match>101</match>
<match_type>exact</match_type>
</custom1>
<result>
<profile>rules/gnome.xml</profile>
<continue config:type="boolean">true</continue>
</result>
<dialog>
<element config:type="integer">1</element>
<dialog_nr config:type="integer">0</dialog_nr>
<question>Gnome Desktop</question>
<conflicts config:type="list">
<element config:type="integer">0</element>
</conflicts>
</dialog>
</rule>
<rule>
...
</rule>
...
</rules>

That's not a complete rules.xml but only the interesting part with the two rules that created the dialog you see in the screenshot.
Here comes the description of the single XML elements:

  • <dialog_nr config:type="integer">0</dialog_nr>

    That's a uniq id for the a popup dialog. All rules with the same dialog_nr are presented on the same popup dialog. This element is optional and the default for a missing dialog_nr is always "0". If you have one popup only anyway, you don't need to specify the dialog_nr.

  • <element config:type="integer">0</element>

    element needs to be a uniq id. Even if you have more than one dialog, you must not use the same id twice like an element-id "1" on dialog 1 and and element-id "1" on dialog 2 too. That's different than with <ask> dialogs, where you can have the same <element> id on multiple dialogs. I'll explain later why this is.

  • <title>Software Selection</title>

    that's a text string at the top of the dialog. A caption for that dialog if you want so and it's optional. If you configure multiple titles for one dialog, the last one is used.

  • <question>KDE Software Selection</question>

    That's the text string behind the checkbox. If you don't configure a question, the name of the XML file that is triggered by this rule will be shown instead (in our example above, that would be "rules/kde.xml" and "rules/gnome.xml"). If you know what's in kde.xml and gnome.xml you maybe don't need the <question> but I'd prefer a short explaining text over just a filename.

  • <timeout config:type=""integer">30</timeout>

    if you don't answer the dialog in "timeout" seconds, AutoYaST will continue.
    As soon as you touch one checkbox or button, the timeout stops for this popup and you have to press "okay" to continue. The next dialog can have a new timeout then.

  • <conflicts config:type="list">

    here you can specify a list of element id's that conflict with this XML file. If you select this XML file, the conflicting one(s) will be deselected and disabled. Be careful what you configure here, you can create deadlocks. An element can conflict with another element on a different dialog and that's the reason why element id's have to be uniq.


Whether a question is pre-selected or not is defined by the result of the rule. In my example above, I configured a rule that matches always (100 = 100) and a rule that matches never (101 = 100). Without dialogs, such a rule file would not make a lot of sense because gnome.xml would never be used but here I use them to do the default pre-selection.
So again, if a rule matches, the file (kde.xml in our example) is pre-selected.
That means, if you add dialogs to your already existing rules.xml that has no dialogs yet and you set a timeout, your autoinstallation process will be the same like before, except that you'll see a popup dialog for "timeout" seconds. The rules work like before and you can see which ones have matched in the popups.

To sum things up:

All dialog configuration is done in the rules.xml file. Each <rule> can have one <dialog> which represents one checkbox on a dialog popup. You can have multiple dialog popups and you can have multiple rules (checkboxes) on one dialog popup.


This feature is officially implemented for openSUSE 11.3 but since openSUSE 11.2 is brand new and out for just a few days now, I made a driverupdate_11.2.tar.bz2 to make the feature available for openSUSE 11.2 too. If you want to try it, download and extract the file and copy the "driverupdate" file to the root of your installation source to get that feature on openSUSE 11.2.
Feedback is appreciated.

Thanx to Stacey Murphy and Martin Vogt for the idea.


have fun creating your own rules ;)
Uwe

Thursday, October 22, 2009

Meet and Greet with AutoYaST

Bubli said that it might be a good idea to write an article of a very basic step by step instruction for AutoYaST and I had to agree with that. So this is more for people who don't ask questions like "can I use the 'ask' feature for 'rules' in AutoYaST?" ;)

So if you answer those questions with YES, then this article is for you:
  • you have never used AutoYaST
  • you just have a vague idea of what it is
  • you always thought it's too complicated and too much work for "just taking a quick look at it"
if you nodded three times, read on, I wrote this especially for you

What do we need for this tutorial?
  • an openSUSE boot CD/DVD like the openSUSE 11.2 DVD
  • a USB stick and a way to read/write to that stick (like an installed Windows or Linux system)
  • a physical machine for the test run (needs a DVD/CD drive and a USB port). The machine CAN be installed but you'll have the chance to abort the process before anything happened, so nothing will have changed then except that you'll know more about AutoYaST :-)
First of all you have to save the small AutoYaST XML snippet below in a file onto the USB stick. It doesn't matter which filesystem you have on the USB stick. It can be a Linux filesystem like for example ext4 but it can also be fat32 too, as long as openSUSE can mount the stick for reading.
Here is the file we want to use:

<?xml version="1.0"?>
<!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>s3cr3t</user_password>
<username>root</username>
</user>
</users>
</profile>
copy that file to the USB stick and name it for example "my.xml". You can name it like you want but I'll refer to it by "my.xml". Later we will take a closer look to the XML file but for now we just want to see AutoYaST in action.
Put the SUSE DVD into the machine and plug the USB stick in too. Now boot from that DVD until you see the bootmenu:
Move the cursor to "Installation" and then type "autoyast=usb:///my.xml" to the prompt, like I did on the screenshot. That "autoyast=...." parameter triggers the automatic installation instead of the manual installation. Of course "usb:///..." is just an example and tells AutoYaST to look for the XML file on all USB devices.

After a while, yast will show up and will present you the so called "proposal screen" that you have to confirm if you are happy with the settings. That screen can be seen during the manual installation too, so it'll be familiar to you. You can do all kind of changes now.

To get a real "free-hand" installation you can turn that confirmation screen off in the AutoYaST XML file but the default is to show it and for this tutorial it's a good idea to take that break to see what AutoYaST will do. Nothing has happened so far to your machine. We could turn off the computer now and your system would be the same like before you booted AutoYaST.

Since we did not specify any partitioning in the AutoYaST XML file, AutoYaST will calculate a reasonable partition plan that you can see on the proposal screen now. It might look different on your hardware than on mine in the screenshot because it depends on your hardware and what kind of partitions you already have on the harddisk.

If you look at the software proposal on the screen, you can see that it's quite minimalist. It will only install 526 MB of software, which is just the base pattern and does not even include a X Window system. We can change that in our my.xml file of course but lets click "Install" for now on the bottom right, to start the installation (or turn off the machine if you don't want to apply any changes).

AutoYaST will partition the harddisk now and will install the software, which looks like during a manual installation.
While AutoYaST is doing it's job, we can take a look at the XML file again.
Every AutoYaST profile starts with the same header:

<?xml version="1.0"?>
<!DOCTYPE profile>
<profile xmlns="http://www.suse.com/1.0/yast2ns"
xmlns:config="http://www.suse.com/1.0/configns">

and ends with the same footer:

</profile>

Everything between the <profile> elements is your configuration.
In our my.xml file it's only the configuration of the root user with the password "s3cr3t". Actually not even that would be needed for an installation but without a root user, you can not login at the end.
You probably want to configure an own software selection too because we already saw that the system which is installing right now is very small.
The partitioning is something many people want to customize too, to have control on how exactly it looks like in the end and to be able to configure more complex setups like LVM or RAID.

So that would add a <software> and <partitioning config:type="list"> section to the profile like this:

<?xml version="1.0"?>
<!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>s3cr3t</user_password>
<username>root</username>
</user>
</users>
<software>
...
</software>
<partitioning config:type="list">
...
</partitioning>
</profile>

Since this text is for unexperienced AutoYaST users, I want to recommend to use the AutoYaST UI to configure a profile instead of a texteditor. You need to install the autoyast2 package for that and then you can start the UI by typing "yast2 autoyast" on the command line or by clicking on "Miscellaneous" and then on "Autoinstallation" in the YaST2 control center.

In the meantime our automatic installation should have rebooted and AutoYaST has finished the so called "2nd stage installation" where some post configuration happens. There is not so much to see there and AutoYaST will terminate without user interaction when it's finished. At the end you'll see the login prompt where you can login with username "root" and password "s3cr3t". I think you deserved a delicious piece of cheesecake now ;-)

That's it. The very basic steps of using AutoYaST to install a system. Maybe there will be more articles like this in the future, making the installation more and more complex because this were really just the basics.

Some important links:
AutoYaST Homepage
Archive of the AutoYaST mailinglist
Subscription to the AutoYaST mailinglist

thanks for flying AutoYaST - have fun ;)

P.S.: if you want to skip the confirmation screen, add this to your XML file between the <profile> tags:

<general>
<mode>
<confirm config:type="boolean">false</confirm>
</mode>
</general>

Tuesday, July 7, 2009

More Timeouts for AutoYaST

Run, Lola, Run!
a famous german movie

Today I want to introduce you some new timeouts you can configure in AutoYaST.
On openSUSE 11,2 you can use timeouts in two new places.

  • The feedback popups of your scripts can timeout now if you want

  • The ask-dialogs can timeout now too


So even with feedback and ask-questions, you can now have a non-stop installation.
How does it work? Lets start with the feedback dialogs:

<script>
<source>
<![CDATA[
echo "this feedback will timeout"
]]>
</source>
<feedback config:type="boolean">true</feedback>
<feedback_type>message</feedback_type>
<debug config:type="boolean">false</debug>
</script>
...
<report>
<messages>
<log config:type="boolean">false</log>
<show config:type="boolean">true</show>
<timeout config:type="integer">5</timeout>
</messages>
</report>

This is an ordinary AutoYaST script which makes use of the feedback mechanism and there is nothing special with it except for the new feedback_type. This type can be "message", "warning" or "error" and if you are experienced with AutoYaST, you might notice that these are the same values that you can configure timeouts for in the <report> section.
Your scripts will timeout like you configure it in the report section if you specify a feedback_type for them.
Without that feedback_type, the old behaviour of a blocking popup is used.

On ask dialogs it works a bit different:

<ask>
<title>Password: root</title>
<path>users,0,user_password</path>
<question>Password for root</question>
<password config:type="boolean">true</password>
<default>lousypassword</default>
<timeout config:type="integer">20</timeout>
</ask>

You can configure the timeout in seconds for each dialog and if the user does not answer the dialog in time, it will continue with the assumption that the default value is wanted.
Without that <timeout ...>, the old behaviour of a blocking ask-dialog is used.

Run, AutoYaST, Run!

au revoir, Uwe

Thursday, June 18, 2009

One string to rule them all ...

... one string to find them
Lord of the Rings (almost)

On openSUSE 11.2 I did a little change with the handling of how AutoYaST looks for the profile on devices. Currently you have to do it this way:

autoyast=device://sde2/mydir/myprofile.xml

to find the profile on /dev/sde2 in the path /mydir/myprofile.xml.
On openSUSE 11.2 you can use one string to find a profile on every device AutoYaST can find. So with:

autoyast=device:///mydir/myprofile.xml

AutoYaST will look for the profile on every device it can mount and will stop looking when the profile is found. Take care that you use three slashes if you want to use that feature. The old syntax with naming the device still works of course.
Actually that can even make the autoyast=usb://myprofile.xml superfluously because USB devices are found and mounted too with the new feature. I'll still keep the old USB syntax for a while but I might change the code underneath the veil to use the new "devices://" code.

Ciao! - Uwe

Wednesday, June 10, 2009

Two AutoYaST Features by One Char

and the star char is - The Slash!

Feature 1:
On openSUSE 11.2, if you add a "/" at the end of a filename in the <files> section, AutoYaST will create a directory:


<files config:type="list">
<config_file>
<file_path>/myData/</file_path>
<file_permissions>644</file_permissions>
</config_file>
...
</files>


Maybe nothing which makes the crowd go wild but might be useful from time to time and saves you from writing a script just for that.

Feature 2:
That's a bit more impressive than the first. If you use a "/" at the beginning of a <package> or <pattern>, you tell AutoYaST to interpret it as a regular expression like this:


<software>
<patterns config:type="list">
<pattern>/.*_server</pattern>
</patterns>
<packages config:type="list">
<pattern>/kde4.*</pattern>·
</packages>
</software>


Beware of using <package>/.*</package> because that will select every package and some of them conflict.

happy slashing ;) - Uwe

Tuesday, June 2, 2009

AutoYaST and LVM striping

A less known fact of the AutoYaST LVM configuration is, that it can do striping too. The reason for that being less known might be, that I just documented it a few weeks ago, even though that feature was available since ages.
If you now say "I want that!!! What is it good for?" you can read this article. In a nutshell, with striping you spread the harddisk IO across multiple physical devices which increases the IO performance but also the risk of data loss, so never use that without a RAID system below.

How to use that in AutoYaST? Just configure the number of physical devices and the blocksize in KB like this:


<drive>
<device>/dev/data_vg</device>
<is_lvm_vg config:type="boolean">true</is_lvm_vg>
<type config:type="symbol">CT_LVM</type>
<partitions config:type="list">
<partition>
<filesystem config:type="symbol">ext3</filesystem>
<lv_name>my_data_lv</lv_name>
<mount>/data</mount>
<stripes config:type="integer">2</stripes>
<stripesize config:type="integer">4</stripesize>
<size>10G</size>
</partition>
</partitions>
<pesize>4M</pesize>
<use>all</use>
</drive>

That's the same like you would do without striping, except for those two keys:

<stripes config:type="integer">2</stripes>

which is the number of physical devices you use. And:

<stripesize config:type="integer">4</stripesize>

which is the size of a block in KB. So after writing 4kb the physical device will be switched.
That's all you need to activate striping on a logical volume.


happy striping - Uwe

Thursday, April 30, 2009

Keep what you got

Let's say the docs present a simplified view of reality...
Larry Wall

Recently I got a bugreport against SLES11 by a customer who uses an undocumented a secret feature of AutoYaST that is quite fancy. It's hidden in the <networking> section and that option can not be configured with the UI. It's called:

<keep_install_network config:type="boolean">false</keep_install_network>

unfortunately that feature is broken on openSUSE 11.1 and SLES11 (that's why there was a bugreport) but will be fixed for openSUSE 11.2 and maybe on SP1 for SLES11.
What does it do? Well, actually you can take it literally. A networking section like this ...

<networking>
<keep_install_network config:type="boolean">true</keep_install_network>
</networking>

... will keep the network configuration that was created by linuxrc by doing an installation of the system over a network. linuxrc will raise the network then to connect the installation source and with that boolean set to true in the XML file, AutoYaST will copy that network configuration into the installed system. So if the network configuration during the installation is the same you want in the running system, you don't have to configure it in the XML file. Just set that boolean to true and you'll keep your installation network in the running system.

Thanx to Bubli and Michal for supporting me with that bug.

au revoir - Uwe

Friday, April 3, 2009

A new kind of Script

I love flying. I've been to almost as many places as my luggage.
Bob Hope

Since openSUSE 11.2 (not in SLES11) you can use a new kind of script called "postpartitioning-script". That script runs between the pre-scripts and the chroot-scripts after the partitioning is done by autoyast and the system is mounted to /mnt. The fstab is written too but nothing is installed yet, so the system is quite empty currently (and can not be called "system" actually at that stage).
You can mount something into the system for example that was not specified in the XML file but is required during the installation.
The script definition in the XML file is very similar to the other scripts:

<postpartitioning-scripts config:type="list">
<script>
<filename>postpart.sh</filename>
<interpreter>shell</interpreter>
<debug config:type="boolean">false</debug>
<feedback config:type="boolean">true</feedback>
<source><![CDATA[
touch /mnt/a_test
echo Hi
]]>
</source>
</script>
</postpartitioning-scripts>


have a nice weekend, Uwe

Friday, March 20, 2009

imag(in)e AutoYaST

"Come to the edge.
We might fall.
Come to the edge.
It’s too high!
COME TO THE EDGE!
And they came,
and he pushed,
and they flew."

Christopher LOGUE

Since openSUSE 11.1 you can use the deploy_image element to use the pre-defined images of openSUSE. I have written an article about that a few weeks ago already. It's very easy to use and can speed up your installation remarkable but it's a bit inflexible.
Today I want to show you an experimental feature of AutoYaST that is available since a few releases and is a lot more flexible and a lot faster too. I did an installation of a kde4 system and measured the time from the proposal screen until the reboot happened and here are the numbers:



kde4 system with RPMs only1051 RPMs19 minutes
kde4 system with pre defined images1051 RPMs13 minutes
kde4 system with a kiwi image1031 RPMs3,5 minutes

All systems were about 2,8GB in size.

What you have to do for that is to create an image that AutoYaST dumps on the harddisk instead of installing RPMs. You specify it like
this in the AutoYaST XML file:

<software>
<image>
<script_location>http://10.10.0.162/image.sh</script_location>
<run_kickoff config:type="boolean">true</run_kickoff>
</image>
</software>

The kickoff is needed to configure the bootloader.

You can't configure any packages or patterns anymore, because all software has to be in your image. Here comes the image.sh I have used for my test:

#!/bin/sh
# if you don't want to deal with the fstab,
# you can also remove that file from your image
# so the one created by autoyast is not overwritten
# by your image extraction
mv /mnt/etc/fstab /tmp/
wget -O - http://10.10.0.162/kiwi_image.tgz 2>/dev/null| tar xfz - -C /mnt
mv /tmp/fstab /mnt/etc

as you can see, the script AutoYaST will run fetches an image from a HTTP server and pipes it into tar, which will extract it into the /mnt directory. The /mnt directory is the directory where your freshly partitioned and formated system is mounted to during the installation.
So the last question to answer is, how to create such an image? Well, the way you create an image is up to you because AutoYaST can do all kind of things in the script but in my case, I have used kiwi. Install the following packages:

kiwi-desc-usbboot
kiwi-desc-vmxboot
kiwi-pxeboot-prebuild
kiwi-instsource
kiwi-pxeboot
kiwi-tools
kiwi-desc-xenboot
kiwi-doc
kiwi-config-openSUSE-11.1
kiwi-desc-isoboot
kiwi
kiwi-instsource-plugins-openSUSE-11-1
kiwi-desc-oemboot
kiwi-desc-netboot

not all of them are needed but it can't hurt to install them all. Then do (as root):

cp -a /usr/share/doc/packages/kiwi/examples/suse-11.1/suse-oem-preload .

and edit the XML file in that directory. All I did was changing the location of my installation source, removed the example user (I let autoyast configure the users) and changed the patterns to install to "kde4". Then call:

kiwi --prepare ./suse-oem-preload --root /space/kiwi_image

This will take a while and kiwi will install the complete system into that directory. When it's done, all you have to do is to tar that directory into the kiwi_image.tgz tarball and put it on your webserver. Of course you can do all kind of changes to that before you tar it (like removing /etc/fstab, which is created by AutoYaST anyway)

Try it out, create yourself a nice image ;)
Keep in mind that this is still an experimental feature but a nice one to play with :)
Feedback is appreciated.

ahoj Uwe

Friday, March 13, 2009

The minimum profile

"All The Small Things" - Blink 182

On SLES9 the smallest AutoYaST profile had to contain a partitioning and a software section (well, and a user section with a root user if you wanted to login). On SLES10 the software section was no longer required because AutoYaST has chosen a very small system to install (only the base pattern) if no software section was there.
Now, on openSUSE 11.1/SLES11 not even the partitioning section is required anymore. If you don't provide the partitioning information, AutoYaST will ask the storage code of YaST2 what it would suggest in a manual installation to the user and that suggestion is used by AutoYaST too then. Those suggestions are often quite conservative and YaST tries to keep other Linux/Windows partitions intact.

So on openSUSE 11.1 / SLES11 the smallest profile looks like this:


<?xml version="1.0"?>
<!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>myrootpassword</user_password>
<username>root</username>
</user>
</users>
</profile>


well, actually it looks like this:


<?xml version="1.0"?>
<!DOCTYPE profile>
<profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns">
</profile>


but you can not login then.

You might say, "that's nice but where is the sense in a totally unconfigured system?" and you are right. There is not so much use in it. All I wanted to show with this article is, that you can try out AutoYaST without configuring a full blown XML file. Now you can start to fill that XML file with flesh step by step, section by section. Put it on an USB stick for example and add autoyast=usb:///my.xml to the boot menu of an openSUSE 11.1/SLES11 DVD and that's it. You just fired up an autoinstallation.

bye bye, Uwe

P.S.: don't forget to buy the latest Diary of Dreams album that is released today ;)

Monday, February 9, 2009

AutoYaST and SLP on openSUSE 11.2

Tell it to me and I will forget.
Show it to me and I might remember.
Make me do it and I will know.

Konfucius

Since openSUSE 11.2 AutoYaST supports the SLP. With autoyast=slp you can tell AutoYaST to query via SLP where it can find the profile. So for example, you can burn a DVD with "autoyast=slp" in the isolinux.cfg file and you can use that DVD in different network topologys then because the location of the autoyast profile is configured on the SLP server in the network. Here is a little example section from my /etc/slp.reg file:

# autoyast
service:autoyast:http://192.168.0.1/my_autoyast.xml,en,65535

AutoYaST will fetch the my_autoyast.xml file then from 192.168.0.1 via http. Of course it's not necessary that the SLP server is running on 192.168.0.1 too.
Another cool feature you get when using SLP is that you can choose between different profiles. If AutoYaST gets more than one profile location from the SLP server it pops up a dialog box to let you choose the right profile:



# /etc/slp.reg
# simple
service:autoyast:http://10.10.0.162/part1.xml,en,65535

# lvm
service:autoyast:http://10.10.0.162/part3.xml,en,65535

have a nice week

bye, Uwe

Tuesday, January 27, 2009

Why to Confirm?

"To err is human, but to really foul things up requires a computer." - Paul Ehrlich

y2confirm - the proposal screen

Sometimes it happens that something in the autoyast process does not work like you expect it to work. Like an add-on product is not added or the partitioning looks different than you expected it to look like. What to do now? How to debug the autoinstallation process? That's something I want to shed some light onto now.

If you use a fully automatic installation, it's a good start to turn on the confirmation of the proposal screen like this:

<general>
<mode>
<confirm config:type="boolean">true</confirm>
...
</mode>
...
</general>

if you don't want to change your profile (for example because it's on a read only media) you can use y2confirm on the kernel parameter command line. So before the kernel and initrd are loaded, add "y2confirm" (either in your PXE config or in the boot menu of the installation DVD). That will make autoyast stop too at the proposal screen before anything has happened (except for your pre-scripts which are already executed at that time) and you can take a look at what autoyast wants to do - you can even change values and if you press the "ok" button, the autoinstallation continues with your changed values.
y2confirm also changes the starting process of the services in the second stage - you can confirm/reject every single service in the second stage then
... anyway... back to stage 1 ...
Imagine you have problems with the software selection because of a failed resolver run, you'll see a red "Software" link in the proposal screen then. Click on that and confirm the software selection then again. A popup will raise up that'll show you the resolver error message.
You can see all added respositories on the Software screen too, so you can check if your add-on section works like expected. That's how the proposal screen might help you to get closer to the root of the problem - click on everything that is red ;)

Log Files
"The logs - the answers are all in the logs" (Wietse Venema - author of postfix)

If you can not get any further interesting information from the proposal screen that helps you to track down your problem, it's time to start to dig in the dirt now. Switch to the console via "CTRL+ALT+F2" and change to the /var/log/YaST2/ directory. There are multiple log files but the y2log file is the one with the most information about the autoinstallation process but there are special log files from the software resolver too. The y2log file might scare you and you need to know what you are looking for (like an url of an add-on) to find anything useful at all and it makes no sense to read the y2log from the beginning to the end.
When you are in stage2 (after the first reboot) you'll find the y2log from the first stage file in "/var/log/YaST2/y2log-1".

Installation via SSH
If I want to repeat first stage tests without rebooting after each test, I add:

usessh=1 nosshkey sshpassword=a

to the linuxrc parameter list (the same place that I mentioned above where you have to add "y2confirm"). Yast will not start then but I can login via "ssh -X" and start it on my own by entering "yast". I can terminate yast as often as I want via"CTRL+c". Keep in mind that when you terminate yast after the partitioning is done, and you want to restart it, you have to umount and "swapoff" the used partitions. The ssh way requires network of course and you can find a list of linuxrc parameters here.

I have splitted this blog post into two parts because it got too large. Read the second part next week.

Happy bug squashing now! :) See you next week ...

au revoir, Uwe Gansert

Thursday, January 22, 2009

openSUSE 11.1 / SLES11 and add-ons

Today I want to take you on a little journey into the world of add-on repositories on openSUSE 11.1 and SLES11.
If you want to add an extra repository to your autoinstallation process, like a repository containing all updates or some self created RPMs, you have two options to do so. You can specify it in your autoyast XML file like this:

<add-on>
<add_on_products config:type="list">
<listentry>
<media_url>http://192.168.66.1/11.1_install/updates</media_url>
<product>SuSE-Linux-Updates</product>
<product_dir>/</product_dir>
<name>MyUpdates</name>
</listentry>
</add_on_products>
</add-on>

"Buddy, that's nothing new" you might say and you are right, because it's possible that way since SLES10 / openSUSE 10.1 and it's the easiest way to add an add-on.
The other option is something that has changed now and is a bit more complex but you don't have to specify the add-on in your autoyast XML file then.
In the past you could add a file called "add_on_products" to the root of the installation source. The format of that file was pretty simple - too simple for such a complex world maybe because it has changed to a way more complex XML format now. Look:

<?xml version="1.0"?>
<add_on_products xmlns="http://www.suse.com/1.0/yast2ns"
xmlns:config="http://www.suse.com/1.0/configns">
<product_items config:type="list">
<product_item>
<name>11.1 updates</name>
<url>http://10.10.0.162/11.1_install/DVD1/updates</url>
<path>/</path>
<ask_user config:type="boolean">false</ask_user>
<selected config:type="boolean">true</selected>
</product_item>
<!-- Another product item -->
<product_item />
</product_items>
</add_on_products>

The complete format description can be found here.
When you created that file, it's not as easy like just adding it to the root of the installation source to make things fly, because in SLES11 and openSUSE 11.1 every file on the installation source needs a checksum in the "content" or the "SHA1SUMS" file and those files have to be signed. Update for SLES11 SP1 and openSUSE 11.2: the checksum for add_on_products.xml and the add_on_products file is optional now. So if you use openSUSE 11.2 or newer or SLES11 SP1, you can skip the following steps!
I'll guide you through the process of using and signing an add_on_products.xml file now.

Step one is to create the XML file like described above and to copy it to the root of your installation source with the name "add_on_products.xml". Then you have to calculate the sha1sum of that file and store it in a file called SHA1SUMS like this:

sha1sum add_on_products.xml > SHA1SUMS

The file should look like this then (with a different sum of course)

taylor:/space/11.1_install/DVD1 # cat SHA1SUMS
a3813f6a5d64459b3727389bcf632c2038abc627 add_on_products.xml

okay, that was easy right? Now the SHA1SUMS file needs to be signed by your gpg key. I assume you already have a gpg key but if not, you can easily create one like described here. When you have your gpg key, you can sign the file by the following command with your private gpg key:

gpg -b --sign --armor SHA1SUMS

a file SHA1SUMS.asc will be created which contains the signature for the SHA1SUMS file. That means, if you change the SHA1SUMS file from now on, you have to recreate the SHA1SUMS.asc file too.
The installer needs to know your public gpg key now, so it can check the signature of that file. You need to add your public gpg key to the initrd AND you have to store it in a file called SHA1SUMS.key (yes, two places - I'd call that a bug). First of all you need to export your public gpg key like this:

cd /inst/source/openSUSE-11.1/DVD1/
gpg --export --armor $KEYID > SHA1SUMS.key
ls > directory.yast
cp SHA1SUMS.key my-key.gpg

$KEYID has to be replaced by your keyid. Mine is "30FC5F6B" for example and you can see all keys in your keyring by "gpg --list-public-keys". Your key will be in that list too and the id is in a line starting with "pub".

pub 1024D/30FC5F6B 2001-06-13
uid Uwe Gansert <ug@suse.de>
sub 1024g/55DBC73E 2001-06-13

now you have to add that key to the initrd in /boot/i386/loader/initrd on the DVD or on your tftp server for PXE booting. Add the key like this:

mv initrd initrd.gz
gunzip initrd.gz
find my-key.gpg | cpio -o -A -F initrd -H newc
gzip initrd
mv initrd.gz initrd

You can take a breath now because you are nearly done :-). You can remove my-key.gpg if you want. The SHA1SUMS file is signed and the key is known to the installation system in the initrd and by the SHA1SUMS.key file. You can verify the content of the initrd by "cpio -it <>
gpg -b --sign --armor content

ATTENTION: don't accidentally overwrite the content.asc file in the root of your 11.1/SLES11 installation source or the conent.key file will not match anymore with the signature.

Congratulation! You made it!


bye, Uwe Gansert

Wednesday, November 12, 2008

image installation with openSUSE 11.1

With openSUSE 11.1 (not SLES11) you can use pre configured images for the software installation with AutoYaST. It's just a simple boolean that indicates to use or don't use images:

<deploy_image>
<image_installation config:type="boolean">true</image_installation>
</deploy_image>

Those images are in the "/images" directory on the installation media.
YaST will calculate on it's own which images to use to fulfill the requirements in your <software> section. At the end, a system which was installed via RPMs only and a system that was installed by using images + some RPMS will look exactly the same.
I did a test with the following in my autoyast profile:

<deploy_image>
<image_installation config:type="boolean">false</image_installation>
</deploy_image>
<software>
<patterns config:type="list">
<pattern>base</pattern>
<pattern>enhanced_base</pattern>
<pattern>sw_management</pattern>
<pattern>games</pattern>
<pattern>imaging</pattern>
<pattern>kde4</pattern>
<pattern>kde4_basis</pattern>
<pattern>multimedia</pattern>
<pattern>x11</pattern>
<pattern>xgl</pattern>
</patterns>
</software>

the installation took about 25 minutes via network and 738 RPMs were installed - no images of course because the boolean was set to "false". The system was about 1,9GB in size.
Then I changed image_installation to "true" and did the installation again. This time it took about 13 minutes and besides the images, 114 additional RPMs (638MB) were installed. Those RPMs were not covered by the images and so they needed to be installed as RPM.

Take a look at image installation on your own with openSUSE beta5. Maybe you can speed up your autoinstallations.

Tuesday, September 2, 2008

remote files during autoinstallation

With AutoYaST you could always store complete files in the XML profile to save them somewhere into the installed system later. With openSUSE 11.1 and SLES11 you can specify the location of those file to a remote source like an HTTP server for example, so there is no need to store the files directly in the XML profile anymore.

<files config:type="list">
<file>
<file_path>/bla</file_path>
<file_location>http://10.10.0.162/file_test.txt</file_location>
</file>
</files>

The section is evaluated after the network configuration is done so start_immediately should be set to true for the needed network interface, which is the default anyway if it's not specified. Protocols are the same like for the AutoYaST profile (http(s), ftp, nfs, tftp, ...)
Here you can read more about the files section in AutoYaST.

Monday, August 25, 2008

post-patterns in AutoYaST

with openSUSE 11.1 and SLES 11 you can install patterns in stage 2 and not only in stage 1. For packages that was already possible since quite a while via
<post-packages config:type="list">
and now this configuration option got a sibling called ... surprise surprise ...
<post-patterns config:type="list">
here is the documentation.