Recent Changes - Search:

Bob Brandt

Linux Projects


Server Projects

Desktop Projects

Novell Projects


VMware Projects


N900 (Maemo) Projects


Python Projects


OpenOffice.org Projects


Other Projects


PmWiki

edit SideBar

Creating an AutoYaST file to automate a SuSE installation

I started working on AutoYaST XML files without really understanding them. I made the mistake of thinking that they were the equivalent of answer files or sysprep files in SuSE. They aren't, they are kind of the opposite. In windows and answer files in general, the answer you provide in the file take the place of the answers the installer would need to provide; anything you don't provide will be asked by the installation program. But in AutoYaST, the process is meant to completely hands-off; so any answers you don't provide will be given defaults.

With this new understanding of AutoYaST files I moved forward and learned that AutoYaST files have a few break points. YaST performs its install in two different stages. The first stage partitions the disk and installs the packages, while the second is where all the package configuration.

YaST has a switch "second_stage" which controls whether or not YaST automatically completes the second stage or not. YaST also has a switch "confirm" which tells YaST to pause just before starting the first stage. This is useful if you want the installer to stop before wiping out a workstation where the install disk was left in, or allowing an installer to verify the disk partitioning ans software packages before starting.

For the project below I choose only to perform the first stage (since too many things can vary between different workstations in the second) and I also choose to confirm the installation (which allows me to setup default packages which junior admins can just select OK, but senior admins can alter using the same AutoYast script).

Linux Only install
<?xml version="1.0"?>
<!DOCTYPE profile>
<profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns">
  <add-on>
    <add_on_products config:type="list">
      <listentry>
        <media_url>http://repository.client.dns//Mozilla-SLE10</media_url>
        <product>No product found in the catalog</product>
        <product_dir>/</product_dir>
      </listentry>
      <listentry>
        <media_url>http://repository.client.dns//Novell-Client</media_url>
        <product>Novell Client for Linux</product>
        <product_dir>/</product_dir>
      </listentry>
      <listentry>
        <media_url>http://repository.client.dns//CLIENTCUSTOM</media_url>
        <product>No product found in the catalog</product>
        <product_dir>/</product_dir>
      </listentry>
      <listentry>
        <media_url>http://repository.client.dns//OOo-SLED10</media_url>
        <product>No product found in the catalog</product>
        <product_dir>/</product_dir>
      </listentry>
    </add_on_products>
  </add-on>

  <general>
    <mode>
      <confirm config:type="boolean">true</confirm>
      <halt config:type="boolean">false</halt>
      <second_stage config:type="boolean">false</second_stage>
    </mode>
    <mouse>
      <id>probe</id>
    </mouse>
    <signature-handling>
      <accept_file_without_checksum config:type="boolean">true</accept_file_without_checksum>
      <accept_non_trusted_gpg_key config:type="boolean">true</accept_non_trusted_gpg_key>
      <accept_unknown_gpg_key config:type="boolean">true</accept_unknown_gpg_key>
      <accept_unsigned_file config:type="boolean">true</accept_unsigned_file>
      <accept_verification_failed config:type="boolean">true</accept_verification_failed>
      <import_gpg_key config:type="boolean">true</import_gpg_key>
    </signature-handling>
  </general>

  <keyboard>
    <keymap>english-uk</keymap>
  </keyboard>

  <partitioning config:type="list">
    <drive>
      <initialize config:type="boolean">true</initialize>
      <partitions config:type="list">
        <partition>
          <filesystem config:type="symbol">ext2</filesystem>
          <format config:type="boolean">true</format>
          <mount>/boot</mount>
          <partition_id config:type="integer">131</partition_id>
          <partition_nr config:type="integer">1</partition_nr>
          <partition_type>primary</partition_type>
          <size>64MB</size>
        </partition>
        <partition>
          <format config:type="boolean">false</format>
          <lvm_group>system</lvm_group>
          <partition_id config:type="integer">142</partition_id>
          <partition_nr config:type="integer">2</partition_nr>
          <partition_type>primary</partition_type>
          <size>max</size>
        </partition>
      </partitions>
      <use>all</use>
    </drive>
    <drive>
      <device>/dev/system</device>
      <partitions config:type="list">
        <partition>
          <filesystem config:type="symbol">swap</filesystem>
          <format config:type="boolean">true</format>
          <lv_name>swap</lv_name>
          <mount>swap</mount>
          <partition_id config:type="integer">130</partition_id>
          <partition_nr config:type="integer">1</partition_nr>
          <size>auto</size>
        </partition>
        <partition>
          <filesystem config:type="symbol">reiser</filesystem>
          <format config:type="boolean">true</format>
          <lv_name>root</lv_name>
          <mount>/</mount>
          <partition_id config:type="integer">131</partition_id>
          <partition_nr config:type="integer">2</partition_nr>
          <size>20GB</size>
        </partition>
        <partition>
          <filesystem config:type="symbol">reiser</filesystem>
          <format config:type="boolean">true</format>
          <lv_name>home</lv_name>
          <mount>/home</mount>
          <partition_id config:type="integer">131</partition_id>
          <partition_nr config:type="integer">3</partition_nr>
          <size>25GB</size>
        </partition>
      </partitions>
      <pesize>4M</pesize>
      <type config:type="symbol">CT_LVM</type>
      <use>all</use>
    </drive>
  </partitioning>

  <software>
    <packages config:type="list">
      <package>helix-banshee-plugins-extra</package>
      <package>yast2-novell-client</package>
      <package>novell-qtgui</package>
      <package>zypper</package>
      <package>kdebase3</package>
      <package>OpenOffice_org-officebean</package>
      <package>kdebase3-beagle</package>
      <package>novell-client-script</package>
      <package>novell-xplatlib</package>
      <package>pax</package>
      <package>glibc-i18ndata</package>
      <package>mDNSResponder-lib</package>
      <package>zlib-devel</package>
      <package>yast2-trans-en_GB</package>
      <package>novell-NLDAPsdk-dyn</package>
      <package>gcc-info</package>
      <package>vpnc</package>
      <package>kdebase3-ksysguardd</package>
      <package>perl-libwww-perl</package>
      <package>libopensync</package>
      <package>xalan-j2</package>
      <package>glade-sharp2</package>
      <package>cdrdao</package>
      <package>loudmouth</package>
      <package>wpa_supplicant</package>
      <package>sensors</package>
      <package>libsyncml</package>
      <package>sablot</package>
      <package>mono-winforms</package>
      <package>novell-iprint-xclient-sl</package>
      <package>OpenOffice_org-galleries</package>
      <package>gconf-sharp2</package>
      <package>novell-xtier-base</package>
      <package>powertweak-extra</package>
      <package>novell-nautilus-plugin</package>
      <package>novell-xtier-core</package>
      <package>compat-openssl097g</package>
      <package>OpenOffice_org-templates-en</package>
      <package>suspend</package>
      <package>libicu</package>
      <package>boost</package>
      <package>libpng-devel</package>
      <package>perl-Compress-Zlib</package>
      <package>perl-XML-Writer</package>
      <package>lvm2</package>
      <package>gnome-vfs-sharp2</package>
      <package>libzypp-zmd-backend</package>
      <package>OpenOffice_org-mono</package>
      <package>compiz</package>
      <package>xorg-x11-devel</package>
      <package>Mesa-devel</package>
      <package>art-sharp2</package>
      <package>kdelibs3-doc</package>
      <package>libquicktime</package>
      <package>avahi</package>
      <package>pango-devel</package>
      <package>libsvg</package>
      <package>pciutils-ids</package>
      <package>perl-XML-Parser</package>
      <package>dhcp</package>
      <package>fontconfig-devel</package>
      <package>pam_mount</package>
      <package>atk-devel</package>
      <package>libsvg-cairo</package>
      <package>pkgconfig</package>
      <package>htop</package>
      <package>libart_lgpl-devel</package>
      <package>freetype2-devel</package>
      <package>dcraw</package>
      <package>gtkhtml-sharp2</package>
      <package>novell-ui-base</package>
      <package>novell-novfs</package>
      <package>novell-konqueror-plugin</package>
      <package>powertweak</package>
      <package>OpenOffice_org-templates-labels-letter</package>
      <package>gnome2-user-docs</package>
      <package>novell-NLDAPbase-dyn</package>
      <package>openvpn</package>
      <package>gcc-c++</package>
      <package>glib-sharp2</package>
      <package>python-gdbm</package>
      <package>novell-lum</package>
      <package>esound</package>
      <package>libnjb</package>
      <package>gcc-java</package>
      <package>libgcj-devel</package>
      <package>yast2-linux-user-mgmt</package>
      <package>libsexy</package>
      <package>helix-dbus-server</package>
      <package>cairo-devel</package>
      <package>intel-i810-agpgart-kmp-smp</package>
      <package>xscreensaver</package>
      <package>glib2-devel</package>
      <package>libstdc++-devel</package>
      <package>irqbalance</package>
      <package>glibc-devel</package>
      <package>perl-IO-Zlib</package>
      <package>perl-Archive-Tar</package>
      <package>patch</package>
      <package>libiniparser</package>
      <package>gle</package>
      <package>fileshareset</package>
      <package>liboil</package>
      <package>novell-client</package>
      <package>novell-nmasclient</package>
      <package>release-notes-sled</package>
      <package>OpenOffice_org-templates-labels-a4</package>
      <package>avahi-glib</package>
      <package>k3b</package>
      <package>rrdtool</package>
      <package>perl-Net_SSLeay</package>
      <package>python-ldap</package>
      <package>python-cairo</package>
      <package>libgcj</package>
      <package>opal</package>
      <package>OpenOffice_org-en-GB</package>
      <package>nici</package>
      <package>novell-novfsd</package>
      <package>gnome-sharp2</package>
      <package>kde3-i18n-en_GB</package>
      <package>OpenOffice_org-templates-presentation-layouts</package>
      <package>taglib</package>
      <package>gcc</package>
      <package>neon</package>
      <package>gnokii</package>
      <package>glib-sharp</package>
      <package>xerces-j2</package>
      <package>rsync</package>
      <package>perl-IO-Socket-SSL</package>
      <package>glitz-devel</package>
      <package>java-1_4_2-gcj-compat</package>
      <package>novfs-kmp-smp</package>
      <package>gtk2-devel</package>
      <package>perl-URI</package>
      <package>yast2-control-center-qt</package>
      <package>openclipart</package>
      <package>audiofile</package>
      <package>libmudflap</package>
      <package>libdaemon</package>
    </packages>
    <patterns config:type="list">
      <pattern>x11</pattern>
      <pattern>desktop-base</pattern>
      <pattern>documentation</pattern>
      <pattern>desktop-gnome</pattern>
    </patterns>
    <remove-packages config:type="list">
      <package>release-notes</package>
      <package>novfs-kmp</package>
      <package>mcelog</package>
      <package>bootloader-theme-NLD</package>
      <package>linux32</package>
      <package>mDNSResponder</package>
      <package>gnome-games</package>
      <package>openh323</package>
      <package>neo</package>
    </remove-packages>
  </software>

  <language>
    <language>en_GB</language>
    <languages>en_GB</languages>
  </language>

  <timezone>
    <hwclock>localtime</hwclock>
    <timezone>Europe/Dublin</timezone>
  </timezone>

  <runlevel>
    <default>5</default>
  </runlevel>

</profile>

References:
http://forgeftp.novell.com/yast/doc/SL10.0/autoinstall/index.html
http://www.suse.com/~ug/

http://www.linuxquestions.org/questions/showthread.php?t=362506
http://www.willempen.org/ipod/ipodlinux-ipod-mini/

Edit - History - Print - Recent Changes - Search
Page last modified on November 06, 2007, at 03:55 PM