[opensuse-autoinstall] Opensuse 11.0 image.sh fature grub problem
Hello everybody, After playing around with the experimental image feature in Autoyast, I have a broken grub configuration/ installation. We are using Opensuse 11.0 to install POS systems and want to reduce the installation data to the size of a CDROM. This works perfect with the image.sh process, but after the first stage the system hang and no bootloader is installed. There was nothing to find in the mailinglist archive and the web about this problem. So I have to explain the environment to give you all a chance to help me: The used image is created with kiwi. The installed rpm's are nearly the same like in the rpm based autoyast setup. All the files from the kiwi installation are compressed as 7z archive. This is the config.xml for the kiwi image: ----------------- <?xml version="1.0"?> <image schemeversion="2.4" name="suse-11.0-toolboxbased"> <description type="system"> <author>Marcel Froehlich</author> <contact>marcel.froehlich@torex.com</contact> <specification>openSUSE 11.0 oem preload system</specification> </description> <preferences> <type fsreadwrite="ext3" fsreadonly="squashfs" boot="oemboot/suse-11.0" format="iso">split</type> <version>1.1.2</version> <packagemanager>smart</packagemanager> <rpm-check-signatures>False</rpm-check-signatures> <rpm-force>True</rpm-force> <locale>en_US</locale> <keytable>us.map.gz</keytable> </preferences> <repository type="yast2"> <source path="http://10.220.10.215/install/mounted_iso_s/opensuse_11.0_org/"/> </repository> <packages type="image"> <ignore name="apparmor"/> <ignore name="smart"/> <ignore name="wireshark"/> <opensusePattern name="default"/> <opensusePattern name="X11"/> <package name="3ddiag"/> <package name="ConsoleKit-x11"/> <package name="ImageMagick"/> <package name="MozillaFirefox"/> <package name="MozillaFirefox-translations"/> <package name="MozillaThunderbird"/> <package name="MozillaThunderbird-translations"/> <package name="SDL_image"/> <package name="SuSEfirewall2"/> <package name="acl"/> <package name="acpid"/> <package name="alsa"/> <package name="alsa-oss"/> <package name="alsa-plugins"/> <package name="alsa-utils"/> <package name="apache2"/> <package name="apache2-prefork"/> <package name="attr"/> <package name="autofs"/> <package name="autoyast2"/> <package name="bind"/> <package name="bind-chrootenv"/> <package name="blktrace"/> <package name="bootsplash"/> <package name="bootsplash-theme-SuSE"/> <package name="bundle-lang-common-en"/> <package name="bundle-lang-gnome-en"/> <package name="cabextract"/> <package name="cdrkit-cdrtools-compat"/> <package name="compat-libstdc++"/> <package name="compat-openssl097g"/> <package name="cups-autoconfig"/> <package name="cups-drivers"/> <package name="cups-drivers-stp"/> <package name="cyrus-sasl-saslauthd"/> <package name="db-utils"/> <package name="dbus-1"/> <package name="dbus-1-x11"/> <package name="dejavu"/> <package name="deltarpm"/> <package name="dhcp-client"/> <package name="dhcp-server"/> <package name="dialog"/> <package name="dos2unix"/> <package name="dosfstools"/> <package name="eject"/> <package name="ethereal"/> <package name="ethtool"/> <package name="fetchmail"/> <package name="filters"/> <package name="findutils-locate"/> <package name="foomatic-filters"/> <package name="freeglut"/> <package name="gconf2-branding-openSUSE"/> <package name="genisoimage"/> <package name="ghostscript-cjk"/> <package name="ghostscript-fonts-other"/> <package name="ghostscript-fonts-std"/> <package name="ghostscript-omni"/> <package name="ghostscript-x11"/> <package name="gnutls"/> <package name="gpart"/> <package name="grub"/> <package name="gtk"/> <package name="gtk2-branding-openSUSE"/> <package name="gvfs-backends"/> <package name="gvfs-fuse"/> <package name="hal-resmgr"/> <package name="hdparm"/> <package name="hpijs-standalone"/> <package name="hunspell-tools"/> <package name="icedax"/> <package name="ifnteuro"/> <package name="ifplugd"/> <package name="initviocons"/> <package name="iptables"/> <package name="iputils"/> <package name="kernel-default"/> <package name="kernel-pae"/> <package name="libaio"/> <package name="libart_lgpl"/> <package name="libelf"/> <package name="libelf1"/> <package name="libevent"/> <package name="libgio-fam"/> <package name="libgnutls-extra26"/> <package name="libgsf"/> <package name="libgssglue1"/> <package name="libid3tag"/> <package name="libpoppler3"/> <package name="librpcsecgss"/> <package name="librsvg"/> <package name="libungif"/> <package name="lilo"/> <package name="linux-atm-lib"/> <package name="lsb"/> <package name="lsof"/> <package name="lsscsi"/> <package name="lukemftp"/> <package name="lynx"/> <package name="manufacturer-PPDs"/> <package name="mc"/> <package name="microcode_ctl"/> <package name="minicom"/> <package name="mozilla-xulrunner190-gnomevfs"/> <package name="mpt-firmware"/> <package name="net-snmp"/> <package name="netcat"/> <package name="nfs-client"/> <package name="nfsidmap"/> <package name="nscd"/> <package name="ntfs-3g"/> <package name="ntfsprogs"/> <package name="numlockx"/> <package name="open-vm-tools"/> <package name="openct"/> <package name="openldap2"/> <package name="openmotif-libs"/> <package name="openssh-askpass"/> <package name="opensuse-manual_en"/> <package name="openvpn"/> <package name="perl-Net-SNMP"/> <package name="perl-SNMP"/> <package name="pinentry-gtk2"/> <package name="poppler-data"/> <package name="poppler-tools"/> <package name="portmap"/> <package name="postfix"/> <package name="ppp"/> <package name="pptp"/> <package name="preload"/> <package name="pyxml"/> <package name="recode"/> <package name="reiserfs"/> <package name="rsync"/> <package name="samba"/> <package name="samba-client"/> <package name="sax2"/> <package name="sax2-gui"/> <package name="screen"/> <package name="setserial"/> <package name="sg3_utils"/> <package name="smartmontools"/> <package name="smp_utils"/> <package name="startup-notification"/> <package name="strace"/> <package name="sudo"/> <package name="suspend"/> <package name="syslinux"/> <package name="tcpdump"/> <package name="tightvnc"/> <package name="transfig"/> <package name="translation-update"/> <package name="ulimit"/> <package name="unace"/> <package name="unarj"/> <package name="unix2dos"/> <package name="unrar"/> <package name="unzip"/> <package name="usbutils"/> <package name="vim"/> <package name="vim-data"/> <package name="vmware-kmp-default"/> <package name="vmware-kmp-pae"/> <package name="wget"/> <package name="wine"/> <package name="wireless-tools"/> <package name="wodim"/> <package name="wxGTK"/> <package name="wxGTK-compat"/> <package name="x11-input-synaptics"/> <package name="x11-tools"/> <package name="xinetd"/> <package name="xmlstarlet"/> <package name="xntp"/> <package name="xorg-x11-Xvnc"/> <package name="xorg-x11-libX11-ccache"/> <package name="xosview"/> <package name="yast2-printer"/> <package name="yast2-qt"/> <package name="yast2-qt-pkg"/> <package name="yast2-samba-server"/> <package name="yast2-scanner"/> <package name="yast2-sound"/> <package name="yast2-trans-en_US"/> <package name="yast2-tv"/> <package name="yast2-x11"/> <package name="yp-tools"/> <package name="ypbind"/> <package name="zip"/> <package name="zisofs-tools"/> </packages> <packages type="bootstrap"> <package name="filesystem"/> <package name="glibc-locale"/> </packages> <split> <persistent> <file name="/etc"/> <file name="/etc/*"/> <file name="/var"/> <file name="/var/*"/> <file name="/boot"/> <file name="/boot/*"/> </persistent> </split> </image> ----------------- My autoyast control file is created by rules/ classes. There is one chroot script (create_grub.sh) that installs the grub loader manually as a workaround (after removing the exit command at the begin of the script), but this is not nice and very static. This is the merged autoinst.xml: ----------------- <?xml version="1.0"?> <!DOCTYPE profile> <profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns"> <bootloader> <global> <activate>true</activate> <boot_mbr>false</boot_mbr> <generic_mbr>false</generic_mbr> <prompt>1</prompt> <timeout config:type="integer">2</timeout> </global> <loader_type>grub</loader_type> <location>mbr</location> <repl_mbr config:type="boolean">true</repl_mbr> <sections config:type="list"> <section> <type>image</type> <vga>0x314</vga> <vgamode>0x314</vgamode> </section> </sections> </bootloader> <classes config:type="list"> <class> <class_name>general</class_name> <configuration>default.xml</configuration> </class> <class> <class_name>sysconfig</class_name> <configuration>default.xml</configuration> </class> <class> <class_name>software</class_name> <configuration>default.xml</configuration> </class> <class> <class_name>scripts</class_name> <configuration>default.xml</configuration> <dont_merge config:type="list"> <element>script</element> </dont_merge> </class> <class> <class_name>storage</class_name> <configuration>one_harddisk.xml</configuration> <dont_merge config:type="list"> <element>script</element> </dont_merge> </class> </classes> <dhcp-server> <start_service>0</start_service> <use_ldap>0</use_ldap> </dhcp-server> <dns-server> <start_service>0</start_service> <use_ldap>0</use_ldap> </dns-server> <firewall> <enable_firewall config:type="boolean">false</enable_firewall> <start_firewall config:type="boolean">false</start_firewall> </firewall> <general> <mode> <confirm config:type="boolean">false</confirm> <forceboot config:type="boolean">true</forceboot> <halt config:type="boolean">false</halt> <reboot config:type="boolean">false</reboot> <second_stage config:type="boolean">true</second_stage> </mode> <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> <http-server> <Listen config:type="list"> <listentry> <PORT>80</PORT> </listentry> </Listen> <firewall config:type="boolean">true</firewall> <hosts> <default config:type="list"> <listentry> <KEY>ServerName</KEY> <VALUE>localhost</VALUE> </listentry> <listentry> <KEY>ServerAdmin</KEY> <VALUE>root@localhost</VALUE> </listentry> <listentry> <KEY>DocumentRoot</KEY> <VALUE>/srv/www</VALUE> </listentry> </default> </hosts> <service config:type="boolean">false</service> <version>2.9</version> </http-server> <keyboard> <keymap>german</keymap> </keyboard> <language> <language>en_US</language> <languages>en_US</languages> </language> <networking> <dns> <dhcp_hostname config:type="boolean">true</dhcp_hostname> <dhcp_resolv config:type="boolean">true</dhcp_resolv> <domain>local</domain> <hostname>default</hostname> </dns> <interfaces config:type="list"> <interface> <bootproto>dhcp</bootproto> <device>eth0</device> <startmode>onboot</startmode> </interface> <interface> <bootproto>dhcp</bootproto> <device>eth1</device> <startmode>onboot</startmode> </interface> </interfaces> <modules config:type="list"> <module_entry> <device>eth0</device> </module_entry> <module_entry> <device>eth1</device> </module_entry> </modules> <routing> <ip_forward config:type="boolean">false</ip_forward> </routing> </networking> <partitioning config:type="list"> <drive> <initialize config:type="boolean">true</initialize> <partitions config:type="list"> <partition> <crypt>twofish256</crypt> <crypt_fs config:type="boolean">false</crypt_fs> <filesystem config:type="symbol">ext3</filesystem> <format config:type="boolean">true</format> <fstopt>ro</fstopt> <loop_fs config:type="boolean">false</loop_fs> <mount>/boot</mount> <mountby config:type="symbol">device</mountby> <noauto config:type="boolean">false</noauto> <partition_id config:type="integer">131</partition_id> <partition_nr config:type="integer">1</partition_nr> <partition_type>primary</partition_type> <resize config:type="boolean">false</resize> <size>150M</size> </partition> <partition> <crypt>twofish256</crypt> <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> <mount>swap</mount> <partition_id config:type="integer">130</partition_id> <partition_nr config:type="integer">2</partition_nr> <partition_type>primary</partition_type> <resize config:type="boolean">false</resize> <size>1024M</size> </partition> <partition> <crypt>twofish256</crypt> <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>/</mount> <partition_id config:type="integer">131</partition_id> <partition_nr config:type="integer">3</partition_nr> <partition_type>primary</partition_type> <resize config:type="boolean">false</resize> <size>10000M</size> </partition> <partition> <crypt>twofish256</crypt> <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>/var</mount> <partition_id config:type="integer">131</partition_id> <partition_type>primary</partition_type> <resize config:type="boolean">false</resize> <size>max</size> </partition> </partitions> <type config:type="symbol">CT_DISK</type> <use>all</use> </drive> </partitioning> <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>3</default> </runlevel> <scripts> <chroot-scripts config:type="list"> <script> <chrooted config:type="boolean">false</chrooted> <filename>save_autoyast_files.sh</filename> <interpreter>shell</interpreter> <source><![CDATA[#!/bin/sh setterm -powersave off -blank 0 -powerdown 0 cp -vf /tmp/profile/* /mnt/var/adm/ exit 0 ]]></source> </script> <script> <filename>create_grub.sh</filename> <interpreter>shell</interpreter> <source><![CDATA[#!/bin/sh exit 0 DEVICE="/$( fdisk -l|grep Disk.*dev|cut -d"/" -f2-3|cut -d":" -f1)" ROOT="${DEVICE}3" SWAP="${DEVICE}2" KVERSION="$( ls -la /mnt/boot/vmlinuz | cut -d">" -f2 | cut -d"-" -f2-)" if [ "$( grep -ci 'instmode=cd' /proc/cmdline )" != "0" ] ; then INSTALL="instmode=cd" else INSTALL="$(cat /proc/cmdline|tr -s " " "\n"|grep -i install=http)" fi cat > /mnt/boot/grub/menu.lst << EOF # added by autoyast chroot script default 0 timeout 3 gfxmenu (hd0,0)/boot/message 0 timeout 2 #YaST - generic_mbr gfxmenu (hd0,0)/message #YaST - activate #Don"t change this comment - YaST2 identifier: Original name: linux# title openSUSE 11.0 - $KVERSION root (hd0,0) kernel /vmlinuz-$KVERSION root=$ROOT $INSTALL resume=$SWAP splash=silent showopts vga=0x314 initrd /initrd-$KVERSION #Don"t change this comment - YaST2 identifier: Original name: failsafe# title Failsafe -- openSUSE 11.0 - $KVERSION root (hd0,0) kernel /vmlinuz-$KVERSION root=$ROOT showopts ide=nodma apm=off acpi=off noresume nosmp noapic maxcpus=0 edd=off x11failsafe vga=0x314 initrd /initrd-$KVERSION EOF cat /mnt/boot/grub/menu.lst cat > /mnt/etc/grub.conf << EOF setup --stage2=/boot/grub/stage2 --force-lba (hd0,0) (hd0,0) quit EOF cat /mnt/etc/grub.conf echo -e "a\n1\nw\n" | fdisk $DEVICE chroot /mnt /usr/sbin/grub-install ]]></source> </script> </chroot-scripts> <pre-scripts config:type="list"> <script> <filename>start.sh</filename> <interpreter>shell</interpreter> <source><![CDATA[#!/bin/sh echo "Starting installation" echo -e "\033[9;0]" >/dev/console exit 0 ]]></source> </script> <script> <filename>create_image.sh</filename> <interpreter>shell</interpreter> <source><![CDATA[#!/bin/sh cat > /image.sh << EOF #!/bin/sh LOG=/tmp/restore_image.log [ -d /media/cdrom ] || mkdir -pv /media/cdrom /bin/cp -vf /mnt/etc/fstab /tmp >> \$LOG 2>&1 if [ "\$(/bin/cat /proc/cmdline | /bin/grep -c "instmode=cd")" != "0" ] ; then /bin/mount /dev/cdrom /media/cdrom >> \$LOG 2>&1 cd /mnt >> \$LOG 2>&1 /bin/tar xjf /media/cdrom/p7zip_4.65_x86_linux_bin.tar.bz2 -C / >> \$LOG 2>&1 cp /p7zip_4.65/bin/* /bin >> \$LOG 2>&1 /bin/7za x -y /media/cdrom/OS11.0_kiwi.7z >> \$LOG 2>&1 elif [ "\$(/bin/cat /proc/cmdline | /bin/grep -c "install=http")" != "0" ] ; then PATH=\$(/bin/cat /proc/cmdline|/usr/bin/tr -s " " "\n"|/bin/grep install=|/usr/bin/cut -d"=" -f2) cd /mnt >> \$LOG 2>&1 /usr/bin/wget -O /tmp/p7zip_4.65_x86_linux_bin.tar.bz2 \$PATH/p7zip_4.65_x86_linux_bin.tar.bz2 >> \$LOG 2>&1 /bin/tar xjf /tmp/p7zip_4.65_x86_linux_bin.tar.bz2 -C / >> \$LOG 2>&1 cp /p7zip_4.65/bin/* /bin >> \$LOG 2>&1 /usr/bin/wget -O - \$PATH/OS11.0_kiwi.7z 2>/dev/null | /bin/7za x -y -si >> \$LOG 2>&1 fi /bin/cp -vf /tmp/fstab /mnt/etc >> \$LOG 2>&1 [ -f /mnt/etc/grub.conf ] && rm -vf /mnt/etc/grub.conf /bin/cp \$LOG /mnt/var/log exit 0 EOF ]]></source> </script> </pre-scripts> </scripts> <software> <image> <script_location>file:///image.sh</script_location> </image> </software> <sysconfig config:type="list"> <sysconfig_entry> <sysconfig_key>MAX_DAYS_IN_TMP</sysconfig_key> <sysconfig_path>/etc/sysconfig/cron</sysconfig_path> <sysconfig_value>90</sysconfig_value> </sysconfig_entry> <sysconfig_entry> <sysconfig_key>RUN_PARALLEL</sysconfig_key> <sysconfig_path>/etc/sysconfig/boot</sysconfig_path> <sysconfig_value>no</sysconfig_value> </sysconfig_entry> <sysconfig_entry> <sysconfig_key>SYSLOG_ON_NO_ERROR</sysconfig_key> <sysconfig_path>/etc/sysconfig/cron</sysconfig_path> <sysconfig_value>yes</sysconfig_value> </sysconfig_entry> </sysconfig> <tftp-server> <start_tftpd config:type="boolean">true</start_tftpd> <tftp_directory>/tftpboot</tftp_directory> </tftp-server> <timezone> <hwclock>localtime</hwclock> <timezone>Europe/Berlin</timezone> </timezone> <users config:type="list"> <user> <encrypted config:type="boolean">true</encrypted> <fullname>root</fullname> <gid>0</gid> <home>/root</home> <password_settings> <max>10000</max> <min>0</min> </password_settings> <shell>/bin/bash</shell> <uid>0</uid> <user_password>strong password</user_password> <username>root</username> </user> </users> <x11> <configure_x11 config:type="boolean">false</configure_x11> </x11> </profile> ----------------- After two days of trying, I added the latest driverupdate to the installation CD. But this changed nothing :( Is there anything wrong in my configuration file or image setup? Any help is welcome :) ----------------- BTW: Is there any chance to use the yast progress bar during the restore of the images from the image.sh script? THX for every help... best regards Marcel Fröhlich SOE-Development, Torex E: marcel.froehlich@torex.com Torex Retail Solutions GmbH, Salzufer 8, D-10587 Berlin T: +49 (0)30 49901-418 F: +49 (0)30 49901-139 www.torex.de Torex knows how to increase sales by 2%, increase conversion by 5% and decrease labour by 2%. Visit Torex Productivity Management to find out. This email and its attachments may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Torex (Torex Group of Companies). If you are not the intended recipient of this email and its attachments, you must take no action based upon them, nor must you copy or show them to anyone. Please contact the sender if you believe you have received this email in error. Torex Retail Solutions GmbH Gesellschaft: Berlin. HRB 102273B Amtsgericht Berlin, Charlottenburg. UST.-Id.-Nr. DE170817515. Steuer-Nr. 27/448/07028. WEEE-Reg.-Nr. DE 30664749. Directors /Geschaeftsfuehrer: Graeme Cooksley, Kirk Isaacson, Juergen Herbott . -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
on Thursday 18 June 2009 Fröhlich, Marcel wrote: I did not check your whole config but you should activate the kickoff client if you have bootloader issues with imaging:
<software> <image> <script_location>file:///image.sh</script_location>
<run_kickoff config:type="boolean">true</run_kickoff>
</image> </software>
I saw you are moving/writing bootloader config files in your scripts too. I assume you know what you are doing :) -- ciao, Uwe Gansert Uwe Gansert, Server Technologies Team SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) Business: http://www.suse.de/~ug -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
participants (2)
-
Fröhlich, Marcel
-
Uwe Gansert