Hey, I realized that I won't have time to work on openSUSE express installation in the near future. I just wanted to send you my preliminary work on this which already worked with openSUSE 13.1 but not with 13.2 anymore which kept me from submitting the patch. I wasn't able to investigate that issue further. But anyways here are the patches in case anyone plans to continue working on that. I'll be there if any questions arise of course. Lasse
From bb8d196ac3bd4950bbc5b600057050af52101b73 Mon Sep 17 00:00:00 2001 From: Lasse Schuirmann <lasse.schuirmann@xxxxxxxxx> Date: Sun, 10 Aug 2014 16:10:32 +0200 Subject: [PATCH 1/2] openSUSE: Add JEOS express installation script This script should be fully backward compatible to openSUSE until version 11.0. Since AutoYaST is a very stable and backwards compatible thing it is secure to offer express installation for future versions so even users with a more stable distribution can use the express installation for recent images. openSUSE does a two-stage installation so we need a reboot during the installation. The settings in the general section of the script have been carefully tested so the user gets a usable system right from the first manual boot. --- data/install-scripts/Makefile.am | 1 + data/install-scripts/opensuse.xml | 112 ++++++++++++++++++++++++++++++++++++++ data/oses/opensuse.xml.in | 64 ++++++++++++++++------ 3 files changed, 161 insertions(+), 16 deletions(-) create mode 100644 data/install-scripts/opensuse.xml diff --git a/data/install-scripts/Makefile.am b/data/install-scripts/Makefile.am index 78decc2..c53dc79 100644 --- a/data/install-scripts/Makefile.am +++ b/data/install-scripts/Makefile.am @@ -5,6 +5,7 @@ database_DATA = \ fedora.xml \ rhel.xml \ ubuntu.xml \ + opensuse.xml \ windows-sif.xml \ windows-cmd.xml \ windows-reg.xml \ diff --git a/data/install-scripts/opensuse.xml b/data/install-scripts/opensuse.xml new file mode 100644 index 0000000..4c3d155 --- /dev/null +++ b/data/install-scripts/opensuse.xml @@ -0,0 +1,112 @@ +<libosinfo version="0.0.1"> + + <!-- JEOS PROFILE --> + <install-script id='http://opensuse.org/scripts/opensuse/jeos'> + <profile>jeos</profile> + <expected-filename>autoinst.xml</expected-filename> + <config> + <!-- Localization options --> + <param name="l10n-keyboard" policy="optional" value-map="http://libosinfo.fedorahosted.org/x11-keyboard"/> + <param name="l10n-language" policy="optional"/> + <param name="l10n-timezone" policy="optional"/> + + <param name="admin-password" policy="optional"/> + </config> + <injection-method>initrd</injection-method> + <injection-method>cdrom</injection-method> + <!-- FIXME: disk injection only works when the floppy isnt inserted as an + usb device (with an own partition) or really as a floppy. + Providing the injection method would therefore break openSuse + express installation in gnome-boxes --> + <template> + <xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version="1.0"> + + <xsl:output method="text"/> + + <xsl:template name="l10n-language"> + <xsl:choose> + <xsl:when test="config/l10n-language != '' and config/l10n-language != 'C'"> + <xsl:value-of select="config/l10n-language"/> + </xsl:when> + <xsl:otherwise> + <xsl:text>en_US</xsl:text> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + + <xsl:template name="l10n-keyboard"> + <xsl:choose> + <xsl:when test="config/l10n-keyboard != '' and config/l10n-keyboard != 'C'"> + <xsl:value-of select="config/l10n-keyboard"/> + </xsl:when> + <xsl:otherwise> + <xsl:text>us</xsl:text> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + + <xsl:template match="/command-line"> + <xsl:text> autoyast </xsl:text> + </xsl:template> + +<xsl:template match="/install-script-config"> + +<profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns"> + + <clock> + <hwclock>UTC</hwclock> + <timezone><xsl:value-of select="config/l10n-timezone"/></timezone> + </clock> + <keyboard> + <keymap><xsl:value-of select="config/l10n-keyboard"/></keymap> + </keyboard> + <language><xsl:value-of select="config/l10n-language"/></language> + + <general> + <mode> + <halt config:type="boolean">false</halt> + <forceboot config:type="boolean">false</forceboot> + <final_reboot config:type="boolean">false</final_reboot> + <final_halt config:type="boolean">true</final_halt> + <confirm config:type="boolean">false</confirm> + </mode> + </general> + + <users config:type="list"> + <user> + <username>root</username> + <user_password><xsl:value-of select="config/admin-password"/></user_password> + <encrypted config:type="boolean">false</encrypted> + <forename/> + <surname/> + </user> + </users> + + <software> + <patterns config:type="list"> + <pattern>base</pattern> + <pattern>enhanced_base</pattern> + <pattern>yast2_basis</pattern> + </patterns> + </software> + + <!-- We need to configure pam to accept login with an empty password. --> + <scripts> + <init-scripts config:type="list"> + <script> + <source> + pam-config -a --unix-nullok + </source> + </script> + </init-scripts> + </scripts> + +</profile> + +</xsl:template> + </xsl:stylesheet> + </template> + </install-script> +</libosinfo> diff --git a/data/oses/opensuse.xml.in b/data/oses/opensuse.xml.in index 1c89d00..644f60f 100644 --- a/data/oses/opensuse.xml.in +++ b/data/oses/opensuse.xml.in @@ -68,7 +68,7 @@ <upgrades id="http://opensuse.org/opensuse/11.2" /> <derives-from id="http://opensuse.org/opensuse/11.2" /> - <media arch="i686"> + <media arch="i686" installer-reboots="2"> <url>http://download.opensuse.org/distribution/11.3/iso/openSUSE-11.3-DVD-i586.iso</url> <iso> <volume-id>openSUSE-DVD-i586-Build0702..001</volume-id> @@ -78,7 +78,7 @@ <kernel>boot/i386/loader/linux</kernel> <initrd>boot/i386/loader/initrd</initrd> </media> - <media arch="x86_64"> + <media arch="x86_64" installer-reboots="2"> <url>http://download.opensuse.org/distribution/11.3/iso/openSUSE-11.3-DVD-x86_64.iso</url> <iso> <volume-id>openSUSE-DVD-x86_64.0702..001</volume-id> @@ -110,6 +110,10 @@ <initrd>boot/x86_64/loader/initrd</initrd> </media> + <installer> + <script id='http://opensuse.org/scripts/opensuse/jeos' /> + </installer> + <resources arch="all"> <minimum> <cpu>500000000</cpu> @@ -134,7 +138,7 @@ <upgrades id="http://opensuse.org/opensuse/11.3" /> <derives-from id="http://opensuse.org/opensuse/11.3" /> - <media arch="i686"> + <media arch="i686" installer-reboots="2"> <url>http://download.opensuse.org/distribution/11.4/iso/openSUSE-11.4-DVD-i586.iso</url> <iso> <volume-id>openSUSE-DVD-i586-Build0024</volume-id> @@ -144,7 +148,7 @@ <kernel>boot/i386/loader/linux</kernel> <initrd>boot/i386/loader/initrd</initrd> </media> - <media arch="x86_64"> + <media arch="x86_64" installer-reboots="2"> <url>http://download.opensuse.org/distribution/11.4/iso/openSUSE-11.4-DVD-x86_64.iso</url> <iso> <volume-id>openSUSE-DVD-x86_640024</volume-id> @@ -176,6 +180,10 @@ <initrd>boot/x86_64/loader/initrd</initrd> </media> + <installer> + <script id='http://opensuse.org/scripts/opensuse/jeos' /> + </installer> + <resources arch="all"> <minimum> <cpu>500000000</cpu> @@ -200,7 +208,7 @@ <upgrades id="http://opensuse.org/opensuse/11.4" /> <derives-from id="http://opensuse.org/opensuse/11.4" /> - <media arch="i686"> + <media arch="i686" installer-reboots="2"> <url>http://download.opensuse.org/distribution/12.1/iso/openSUSE-12.1-DVD-i586.iso</url> <iso> <volume-id>openSUSE-DVD-i586-Build0039</volume-id> @@ -210,7 +218,7 @@ <kernel>boot/i386/loader/linux</kernel> <initrd>boot/i386/loader/initrd</initrd> </media> - <media arch="x86_64"> + <media arch="x86_64" installer-reboots="2"> <url>http://download.opensuse.org/distribution/12.1/iso/openSUSE-12.1-DVD-x86_64.iso</url> <iso> <volume-id>openSUSE-DVD-x86_640039</volume-id> @@ -242,6 +250,10 @@ <initrd>boot/x86_64/loader/initrd</initrd> </media> + <installer> + <script id='http://opensuse.org/scripts/opensuse/jeos' /> + </installer> + <resources arch="all"> <minimum> <cpu>500000000</cpu> @@ -267,7 +279,7 @@ <upgrades id="http://opensuse.org/opensuse/12.1" /> <derives-from id="http://opensuse.org/opensuse/12.1" /> - <media arch="i686"> + <media arch="i686" installer-reboots="2"> <url>http://download.opensuse.org/distribution/12.2/iso/openSUSE-12.2-DVD-i586.iso</url> <iso> <volume-id>openSUSE-DVD-i586-Build0167</volume-id> @@ -277,7 +289,7 @@ <kernel>boot/i386/loader/linux</kernel> <initrd>boot/i386/loader/initrd</initrd> </media> - <media arch="x86_64"> + <media arch="x86_64" installer-reboots="2"> <url>http://download.opensuse.org/distribution/12.2/iso/openSUSE-12.2-DVD-x86_64.iso</url> <iso> <volume-id>openSUSE-DVD-x86_640167</volume-id> @@ -309,6 +321,10 @@ <initrd>boot/x86_64/loader/initrd</initrd> </media> + <installer> + <script id='http://opensuse.org/scripts/opensuse/jeos' /> + </installer> + <resources arch="all"> <minimum> <cpu>500000000</cpu> @@ -334,7 +350,7 @@ <upgrades id="http://opensuse.org/opensuse/12.2" /> <derives-from id="http://opensuse.org/opensuse/12.2" /> - <media arch="i686"> + <media arch="i686" installer-reboots="2"> <url>http://download.opensuse.org/distribution/12.3/iso/openSUSE-12.3-DVD-i586.iso</url> <iso> <volume-id>openSUSE-12.3-DVD</volume-id> @@ -344,7 +360,7 @@ <kernel>boot/i386/loader/linux</kernel> <initrd>boot/i386/loader/initrd</initrd> </media> - <media arch="x86_64"> + <media arch="x86_64" installer-reboots="2"> <url>http://download.opensuse.org/distribution/12.3/iso/openSUSE-12.3-DVD-x86_64.iso</url> <iso> <volume-id>openSUSE-12.3-DVD-x86_64</volume-id> @@ -355,6 +371,10 @@ <initrd>boot/x86_64/loader/initrd</initrd> </media> + <installer> + <script id='http://opensuse.org/scripts/opensuse/jeos' /> + </installer> + <resources arch="all"> <!-- http://en.opensuse.org/Hardware_requirements --> <minimum> @@ -381,7 +401,7 @@ <upgrades id="http://opensuse.org/opensuse/12.3" /> <derives-from id="http://opensuse.org/opensuse/12.3" /> - <media arch="i686"> + <media arch="i686" installer-reboots="2"> <url>http://download.opensuse.org/distribution/13.1/iso/openSUSE-13.1-DVD-i586.iso</url> <iso> <volume-id>openSUSE-13.1-DVD</volume-id> @@ -391,7 +411,7 @@ <kernel>boot/i386/loader/linux</kernel> <initrd>boot/i386/loader/initrd</initrd> </media> - <media arch="x86_64"> + <media arch="x86_64" installer-reboots="2"> <url>http://download.opensuse.org/distribution/13.1/iso/openSUSE-13.1-DVD-x86_64.iso</url> <iso> <volume-id>openSUSE-13.1-DVD-x86_64</volume-id> @@ -425,6 +445,10 @@ <initrd>boot/x86_64/loader/initrd</initrd> </media> + <installer> + <script id='http://opensuse.org/scripts/opensuse/jeos' /> + </installer> + <resources arch="all"> <!-- http://en.opensuse.org/Hardware_requirements --> <minimum> @@ -456,7 +480,7 @@ <derives-from id="http://opensuse.org/opensuse/13.1" /> <release-status>prerelease</release-status> - <media arch="i686"> + <media arch="i686" installer-reboots="2"> <iso> <volume-id>openSUSE-([1-9][4-9]\.[0-9]+|13\.[2-9])-DVD</volume-id> <system-id>LINUX</system-id> @@ -465,7 +489,7 @@ <kernel>boot/i386/loader/linux</kernel> <initrd>boot/i386/loader/initrd</initrd> </media> - <media arch="x86_64"> + <media arch="x86_64" installer-reboots="2"> <iso> <volume-id>openSUSE-([1-9][4-9]\.[0-9]+|13\.[2-9])-DVD-x86_64</volume-id> <system-id>LINUX</system-id> @@ -475,6 +499,10 @@ <initrd>boot/x86_64/loader/initrd</initrd> </media> + <installer> + <script id='http://opensuse.org/scripts/opensuse/jeos' /> + </installer> + <resources arch="all"> <!-- http://en.opensuse.org/Hardware_requirements --> <minimum> @@ -502,7 +530,7 @@ <derives-from id="http://opensuse.org/opensuse/13.1" /> <release-status>snapshot</release-status> - <media arch="i686"> + <media arch="i686" installer-reboots="2"> <iso> <volume-id>openSUSE-.*-DVD-Snapshot.*</volume-id> <system-id>LINUX</system-id> @@ -511,7 +539,7 @@ <kernel>boot/i386/loader/linux</kernel> <initrd>boot/i386/loader/initrd</initrd> </media> - <media arch="x86_64"> + <media arch="x86_64" installer-reboots="2"> <iso> <volume-id>openSUSE-.*-DVD-x86_64-Snapshot.*</volume-id> <system-id>LINUX</system-id> @@ -521,6 +549,10 @@ <initrd>boot/x86_64/loader/initrd</initrd> </media> + <installer> + <script id='http://opensuse.org/scripts/opensuse/jeos' /> + </installer> + <resources arch="all"> <!-- http://en.opensuse.org/Hardware_requirements --> <minimum> -- 2.1.0
From 8fc582453bdbeb6778be8ce70864527232ab714c Mon Sep 17 00:00:00 2001 From: Lasse Schuirmann <lasse.schuirmann@xxxxxxxxx> Date: Sat, 29 Nov 2014 12:11:18 +0100 Subject: [PATCH 2/2] opensuse add desktop script --- data/install-scripts/opensuse.xml | 180 ++++++++++++++++++++++++++++++++++++++ data/oses/opensuse.xml.in | 8 ++ 2 files changed, 188 insertions(+) diff --git a/data/install-scripts/opensuse.xml b/data/install-scripts/opensuse.xml index 4c3d155..973c8bf 100644 --- a/data/install-scripts/opensuse.xml +++ b/data/install-scripts/opensuse.xml @@ -109,4 +109,184 @@ </xsl:stylesheet> </template> </install-script> + + <!-- DESKTOP PROFILE --> + <install-script id='http://opensuse.org/scripts/opensuse/desktop'> + <profile>desktop</profile> + <expected-filename>autoinst.xml</expected-filename> + <config> + <!-- Localization options --> + <param name="l10n-keyboard" policy="optional" value-map="http://libosinfo.fedorahosted.org/x11-keyboard"/> + <param name="l10n-language" policy="optional"/> + <param name="l10n-timezone" policy="optional"/> + + <!-- Network options --> + <param name="hostname" policy="optional"/> + <param name="domain" policy="optional"/> + + <!-- Account options --> + <param name="admin-password" policy="optional"/> + <param name="user-fullname" policy="optional"/> + <param name="user-login" policy="required"/> + <param name="user-password" policy="required"/> + <param name="avatar-location" policy="optional"/>TODO + <param name="avatar-disk" policy="optional"/>TODO + </config> + <injection-method>initrd</injection-method> + <injection-method>cdrom</injection-method> + <!-- FIXME: disk injection only works when the floppy isnt inserted as an + usb device (with an own partition) or really as a floppy. + Providing the injection method would therefore break openSuse + express installation in gnome-boxes --> + <avatar-format> + <mime-type>image/png</mime-type> + </avatar-format> + <template> + <xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version="1.0"> + + <xsl:output method="text"/> + + <xsl:template name="l10n-language"> + <xsl:choose> + <xsl:when test="config/l10n-language != '' and config/l10n-language != 'C'"> + <xsl:value-of select="config/l10n-language"/> + </xsl:when> + <xsl:otherwise> + <xsl:text>en_US</xsl:text> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + + <xsl:template name="l10n-keyboard"> + <xsl:choose> + <xsl:when test="config/l10n-keyboard != '' and config/l10n-keyboard != 'C'"> + <xsl:value-of select="config/l10n-keyboard"/> + </xsl:when> + <xsl:otherwise> + <xsl:text>us</xsl:text> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + + <xsl:template match="/command-line"> + <xsl:text> autoyast </xsl:text> + </xsl:template> + +<xsl:template match="/install-script-config"> + +<profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns"> + + <clock> + <hwclock>UTC</hwclock> + <timezone><xsl:value-of select="config/l10n-timezone"/></timezone> + </clock> + <keyboard> + <keymap><xsl:value-of select="config/l10n-keyboard"/></keymap> + </keyboard> + <language><xsl:value-of select="config/l10n-language"/></language> + + <general> + <mode> + <halt config:type="boolean">false</halt> + <final_reboot config:type="boolean">false</final_reboot> + <final_halt config:type="boolean">true</final_halt> + <confirm config:type="boolean">false</confirm> + </mode> + </general> + + <networking> + <dns> + <domain><xsl:value-of select="config/domain"/></domain> + <hostname><xsl:value-of select="config/hostname"/></hostname> + </dns> + </networking> + + <users config:type="list"> + <user> + <username>root</username> + <user_password><xsl:value-of select="config/admin-password"/></user_password> + <encrypted config:type="boolean">false</encrypted> + <forename/> + <surname/> + </user> + <user> + <username><xsl:value-of select="config/user-login"/></username> + <user_password><xsl:value-of select="config/user-password"/></user_password> + <encrypted config:type="boolean">false</encrypted> + <forename/> + <surname/> + <fullname><xsl:value-of select="config/user-fullname"/></fullname> + </user> + </users> + + <software> + <patterns config:type="list"> + <pattern>base</pattern> + <pattern>enhanced_base</pattern> + <pattern>yast2_basis</pattern> + <pattern>x11</pattern> + <pattern>gnome</pattern> + <pattern>gnome_office</pattern> + <pattern>gnome_internet</pattern> + <pattern>gnome_basis</pattern> + <pattern>print_server</pattern> + <pattern>fonts</pattern> + </patterns> + <packages config:type="list"> + <package>gdm</package> + </packages> + </software> + + <scripts> + <chroot-scripts config:type="list"> + <script> + <chrooted config:type="boolean">true</chrooted> + <source> + # We need to configure pam to accept login with an empty password. + pam-config -a --unix-nullok + pam-config -a --nullok + + <xsl:choose> + <xsl:when test="config/user-password != ''"> + useradd <xsl:value-of select='config/user-login'/> + passwd -d <xsl:value-of select='config/user-login'/> + </xsl:when> + </xsl:choose> + + <xsl:choose> + <xsl:when test="config/avatar-location != ''"> + # Set user avatar + mkdir /mnt/unattended-media + mount <xsl:value-of select='config/avatar-disk'/> /mnt/unattended-media + cp /mnt/unattended-media<xsl:value-of select="config/avatar-location"/> /var/lib/AccountsService/icons/<xsl:value-of select="config/user-login"/> + umount /mnt/unattended-media + + echo " +[User] +Language= +XSession= +Icon=/var/lib/AccountsService/icons/<xsl:value-of select="config/user-login"/> +" >> /var/lib/AccountsService/users/<xsl:value-of select="config/user-login"/> + </xsl:when> + </xsl:choose> + + # Set gdm as display manager to avoid the ugly default logon screen + sed -i 's,DISPLAYMANAGER_XSERVER="Xorg",DISPLAYMANAGER_XSERVER="gdm",' \ + /etc/sysconfig/displaymanager + sed -i 's,DISPLAYMANAGER="",DISPLAYMANAGER="gdm",' \ + /etc/sysconfig/displaymanager + + </source> + </script> + </chroot-scripts> + </scripts> + +</profile> + +</xsl:template> + </xsl:stylesheet> + </template> + </install-script> </libosinfo> diff --git a/data/oses/opensuse.xml.in b/data/oses/opensuse.xml.in index 644f60f..1d7fa2b 100644 --- a/data/oses/opensuse.xml.in +++ b/data/oses/opensuse.xml.in @@ -112,6 +112,7 @@ <installer> <script id='http://opensuse.org/scripts/opensuse/jeos' /> + <script id='http://opensuse.org/scripts/opensuse/desktop' /> </installer> <resources arch="all"> @@ -182,6 +183,7 @@ <installer> <script id='http://opensuse.org/scripts/opensuse/jeos' /> + <script id='http://opensuse.org/scripts/opensuse/desktop' /> </installer> <resources arch="all"> @@ -252,6 +254,7 @@ <installer> <script id='http://opensuse.org/scripts/opensuse/jeos' /> + <script id='http://opensuse.org/scripts/opensuse/desktop' /> </installer> <resources arch="all"> @@ -323,6 +326,7 @@ <installer> <script id='http://opensuse.org/scripts/opensuse/jeos' /> + <script id='http://opensuse.org/scripts/opensuse/desktop' /> </installer> <resources arch="all"> @@ -373,6 +377,7 @@ <installer> <script id='http://opensuse.org/scripts/opensuse/jeos' /> + <script id='http://opensuse.org/scripts/opensuse/desktop' /> </installer> <resources arch="all"> @@ -447,6 +452,7 @@ <installer> <script id='http://opensuse.org/scripts/opensuse/jeos' /> + <script id='http://opensuse.org/scripts/opensuse/desktop' /> </installer> <resources arch="all"> @@ -501,6 +507,7 @@ <installer> <script id='http://opensuse.org/scripts/opensuse/jeos' /> + <script id='http://opensuse.org/scripts/opensuse/desktop' /> </installer> <resources arch="all"> @@ -551,6 +558,7 @@ <installer> <script id='http://opensuse.org/scripts/opensuse/jeos' /> + <script id='http://opensuse.org/scripts/opensuse/desktop' /> </installer> <resources arch="all"> -- 2.1.0
_______________________________________________ Libosinfo mailing list Libosinfo@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libosinfo