tips‎ > ‎

SuSE cobbler

A customer I work with as recently ditched Redhat in favor of SuSE
They had existing infrastructure already in place to support provisioning new systems with cobbler 

I was delighted to Find a blog from Uwe Gansert covering the base install of a slightly patched version of cobbler to allow support for Autoyast



Follow Uwe's instructions then add some more spice:

my base "kickstart" autoyast file for OpenSuSE 11.4

<?xml version="1.0"?>

<!DOCTYPE profile>

<profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns">

  <firewall>

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

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

  </firewall>

  <general>

    <ask-list config:type="list"/>

    <mode>

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

      <final_reboot config:type="boolean">true</final_reboot>

    </mode>

    <mouse>

      <id>none</id>

    </mouse>

    <proposals config:type="list"/>

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

 <networking>

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

      <dns>

        <dhcp_hostname config:type="boolean">true</dhcp_hostname>

        <dhcp_resolv config:type="boolean">true</dhcp_resolv>

        <hostname>$hostname</hostname>

      </dns>

  </networking>

 <partitioning config:type="list">

        $SNIPPET('snippets_sles/partitioning_default_lvm_sles11')

  </partitioning>

  <software>

        $SNIPPET('snippets_sles/packages_os11')

  </software>

  <timezone>

    <hwclock>UTC</hwclock>

    <timezone>Europe/Zurich</timezone>

  </timezone>

  <users config:type="list">

    <user>

      <encrypted config:type="boolean">true</encrypted>

      <fullname>root</fullname>

      <gid>0</gid>

      <home>/root</home>

      <password_settings>

        <expire></expire>

        <flag></flag>

        <inact></inact>

        <max></max>

        <min></min>

        <warn></warn>

      </password_settings>

      <shell>/bin/bash</shell>

      <uid>0</uid>

      <user_password>$rootpw</user_password>

      <username>root</username>

    </user>

  </users>

  <report>

    <errors>

      <log config:type="boolean">true</log>

      <show config:type="boolean">true</show>

      <timeout config:type="integer">0</timeout>

    </errors>

    <messages>

      <log config:type="boolean">true</log>

      <show config:type="boolean">true</show>

      <timeout config:type="integer">0</timeout>

    </messages>

    <warnings>

      <log config:type="boolean">true</log>

      <show config:type="boolean">true</show>

      <timeout config:type="integer">0</timeout>

    </warnings>

    <yesno_messages>

      <log config:type="boolean">true</log>

      <show config:type="boolean">true</show>

      <timeout config:type="integer">0</timeout>

    </yesno_messages>

  </report>

  <runlevel>

    <default>5</default>

      <service>

        <service_name>sshd</service_name>

        <service_start>3 5</service_start>

        <service_status>enable</service_status>

      </service>

  </runlevel>

  <scripts>

    <post-scripts config:type="list">

      <script>

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

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

        <feedback_type></feedback_type>

        <filename>post_install</filename>

        <interpreter>shell</interpreter>

        <location><![CDATA[]]></location>

        <network_needed config:type="boolean">true</network_needed>

        <notification>Please Wait ...</notification>

        <source><![CDATA[/etc/init.d/sshd restart

echo 'search sus.local' >> /etc/resolv.conf

chkconfig sshd on

zypper update -y

zypper dist-upgrade -y

      </script>

    </post-scripts>

  </scripts>

</profile>


the Snippets


partitioning_default_lvm_sles11

(debugged by Patrick :) 

# requires: ksmeta Swap : (optional) containing the size of swap in megabytes

    <drive>

      <initialize config:type="boolean">true</initialize>

      <partitions config:type="list">

        <partition>

          <create config:type="boolean">true</create>

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

          <filesystem config:type="symbol">ext3</filesystem>

          <format config:type="boolean">true</format>

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

          <mount>/boot</mount>

          <mountby config:type="symbol">device</mountby>

          <partition_id config:type="integer">131</partition_id>

          <partition_nr config:type="integer">1</partition_nr>

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

          <size>500M</size>

        </partition>

        <partition>

          <create config:type="boolean">true</create>

          <lvm_group>vg00</lvm_group>

          <mountby config:type="symbol">device</mountby>

          <partition_id config:type="integer">142</partition_id>

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

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

          <size>max</size>

        </partition>

      </partitions>

      <pesize></pesize>

      <type config:type="symbol">CT_DISK</type>

      <use>all</use>

    </drive>

    <drive>

      <device>/dev/vg00</device>

      <initialize config:type="boolean">true</initialize>

      <partitions config:type="list">

        <partition>

          <create config:type="boolean">true</create>

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

          <filesystem config:type="symbol">swap</filesystem>

          <format config:type="boolean">true</format>

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

          <lv_name>lv_swap</lv_name>

          <mount>swap</mount>

          <mountby config:type="symbol">device</mountby>

          <partition_id config:type="integer">130</partition_id>

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

#if $getVar("Swap","") != ""

          <size>${Swap}M</size>

#else

          <size>2048M</size>

#end if

        </partition>

        <partition>

          <create config:type="boolean">true</create>

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

          <filesystem config:type="symbol">ext3</filesystem>

          <format config:type="boolean">true</format>

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

          <lv_name>lv_root</lv_name>

          <mount>/</mount>

          <mountby config:type="symbol">device</mountby>

          <partition_id config:type="integer">131</partition_id>

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

          <size>max</size>

        </partition>

      </partitions>

      <pesize>4M</pesize>

      <type config:type="symbol">CT_LVM</type>

      <use>all</use>

    </drive>



packages_os11

Fairly minimal opensuse package install


<patterns config:type="list">

      <pattern>base</pattern>

      <pattern>apparmor</pattern>

      <pattern>gnome</pattern>

      <pattern>file_server</pattern>

      <pattern>x11</pattern>

    </patterns>

    <packages  config:type="list">

      <package>nss_ldap</package>

      <package>pam_ldap</package>

## required for kdump

      <package>kexec-tools</package>

      <package>kdump</package>

    </packages>




Thanks Also to Patrick , who took my original debugged it and expanded the kickstart to do more .


Comments