Commit f7300783 authored by Rafael Monnerat's avatar Rafael Monnerat

Moved from slapos.toolbox

This is unused code, preserved here for reference with kiwi procedure for default vifib server.
parent c3bce464
------------------------------------------------
README for Kiwi source from SUSE Studio
------------------------------------------------
This tarball contains the Kiwi configuration, theming and overlay files that
were exported from SUSE Studio (http://susestudio.com). It allows you to
create your SUSE Studio configured appliance on your local system.
The user is expected to be familiar with using Kiwi. Details on Kiwi can be
found at http://kiwi.berlios.de.
We recommend installing the version of Kiwi found in the openSUSE
Virtualization:Appliances repository, eg:
http://download.opensuse.org/repositories/Virtualization:/Appliances/<distro_version>
Please send all your questions and feedback to feedback@susestudio.com.
----------------------
Directory structure
----------------------
bootsource/ - Contains the kiwi config for the boot image. Includes
bootsplash and grub theming.
source/ - Contains the kiwi config and overlay files for the
image.
README - This file.
create_appliance.sh - Helper script to create your appliance.
The create_appliance.sh script simplifies the applicance creation by
automatically running the kiwi prepare and create steps, for both the boot and
actual image.
It also prompts users to enter the URLs for internal repositories used by the
appliance (eg. SUSE Linux Enterprise repositories) and updates the
bootsource/config.xml and source/config.xml files accordingly. Backups of these
config files are made to config.xml.bak in the respective directories if
modifications are made by the script.
The script warns the user if the installed kiwi version does not match the
expected version. Minor version differences should be toleratable.
----------------------
Creating your appliance
----------------------
Simply run the create_appliance.sh script as root, eg:
sudo ./create_appliance.sh
If your appliance uses internal (non-public) repositories, you will be prompted
to specify the repo URL before continuing, eg:
> sudo ./create_appliance.sh
** Checking for internal repositories...
Enter repository URL for 'SLES 11 i386': http://my.repository/path/to/repo
A successful run looks like this:
> sudo ./create_appliance.sh
** Checking for internal repositories...
** Creating custom boot image (initrd)...
rm -rf bootbuild/root bootimage/initrd
mkdir -p bootbuild bootimage/initrd
/usr/bin/linux32 /usr/sbin/kiwi --prepare bootsource --root ...
Jun-09 14:45:26 <1> : Setting gzip command to: /usr/bin/pigz done
Jun-09 14:45:26 <1> : Setting log file to: boot-prepare.log
/usr/bin/linux32 /usr/sbin/kiwi --create bootbuild/root -d ...
Jun-09 14:49:21 <1> : Setting gzip command to: /usr/bin/pigz done
Jun-09 14:49:21 <1> : Setting log file to: boot-create.log
** Creating appliance...
rm -rf build/root
mkdir -p build image
/usr/bin/linux32 /usr/sbin/kiwi --prepare source --root build/root ...
Jun-09 14:55:17 <1> : Setting gzip command to: /usr/bin/pigz done
Jun-09 14:55:17 <1> : Setting log file to: prepare.log
/usr/bin/linux32 /usr/sbin/kiwi --create build/root -d image ...
Jun-09 14:58:09 <1> : Setting gzip command to: /usr/bin/pigz done
Jun-09 14:58:09 <1> : Setting log file to: create.log
** Appliance created successfully! (image/James_JeOS_32bit.i686-0.0.1.raw)
To boot the image using qemu-kvm, run the following command:
qemu-kvm -snapshot -m 512 image/James_JeOS_32bit.i686-0.0.1.raw &
You can tail the respective log files during the appliance creation to observe
the details of the kiwi operation. For example:
tail -f boot-prepare.log
----------------------
Troubleshooting
----------------------
You may need to manually edit bootsource/config.xml and source/config.xml to
remove repositories that are not available or failing in your environment.
For example, to remove the 'openSUSE 11.1 Updates' repositories, remove the
following lines from both config.xml:
<repository type='rpm-md'>
<source path='http://download.opensuse.org/update/11.1/'/>
</repository>
#!/bin/bash
#================
# FILE : config.sh
#----------------
# PROJECT : OpenSuSE KIWI Image System
# COPYRIGHT : (c) 2006 SUSE LINUX Products GmbH. All rights reserved
# :
# AUTHOR : Marcus Schaefer <ms@suse.de>
# :
# BELONGS TO : Operating System images
# :
# DESCRIPTION : configuration script for SUSE based
# : operating systems
# :
# :
# STATUS : BETA
#----------------
#======================================
# Functions...
#--------------------------------------
test -f /.kconfig && . /.kconfig
test -f /.profile && . /.profile
#======================================
# Greeting...
#--------------------------------------
echo "Configure image: [$kiwi_iname]..."
#======================================
# SuSEconfig
#--------------------------------------
suseConfig
#======================================
# Keep UTF-8 locale
#--------------------------------------
baseStripLocales \
$(for i in $(echo $kiwi_language | tr "," " ");do echo -n "$i.utf8 ";done)
baseStripTranslations kiwi.mo
#======================================
# Umount kernel filesystems
#--------------------------------------
baseCleanMount
exit 0
<?xml version='1.0' encoding='UTF-8'?>
<image name='initrd-oemboot-suse-11.3' schemaversion='4.7'>
<description type='boot'>
<author>Marcus Schaefer</author>
<contact>ms@novell.com</contact>
<specification>boot/initrd image used on OEM VMX disk</specification>
</description>
<preferences>
<type bootprofile='default' bootkernel='std' image='cpio'/>
<version>2.7.1</version>
<packagemanager>zypper</packagemanager>
<rpm-check-signatures>false</rpm-check-signatures>
</preferences>
<profiles>
<profile name='default' description='Booting default setup'/>
<profile name='xen' description='Boot with xen mboot.c32 setup'/>
<profile name='std' description='KERNEL: Default'/>
<profile name='xenk' description='KERNEL: Xen kernel/mboot.c32'/>
<profile name='pae' description='KERNEL: pae kernel'/>
<profile name='ec2' description='KERNEL: Ec2 kernel'/>
<profile name='rt' description='KERNEL: RealTime kernel'/>
<profile name='desktop' description='KERNEL: Desktop kernel'/>
</profiles>
<drivers type='drivers'>
<file name='crypto/*'/>
<file name='drivers/virtio/*'/>
<file name='drivers/block/cciss.ko'/>
<file name='drivers/block/virtio_blk.ko'/>
<file name='drivers/char/hw_random/virtio-rng.ko'/>
<file name='drivers/net/*'/>
<file name='net/packet/*'/>
<file name='drivers/md/*'/>
<file name='drivers/block/loop.ko'/>
<file name='drivers/hid/*'/>
<file name='drivers/input/keyboard/*'/>
<file name='drivers/input/mouse/*'/>
<file name='drivers/usb/*'/>
<file name='drivers/ide/*'/>
<file name='lib/zlib_deflate/zlib_deflate.ko'/>
<file name='lib/libcrc32c.ko'/>
<file name='fs/btrfs/*'/>
<file name='fs/ext3/*'/>
<file name='fs/ext4/*'/>
<file name='fs/ext2/*'/>
<file name='fs/fat/*'/>
<file name='fs/vfat/*'/>
<file name='fs/binfmt_aout.ko'/>
<file name='fs/binfmt_misc.ko'/>
<file name='fs/mbcache.ko'/>
<file name='fs/quota_v1.ko'/>
<file name='fs/quota_v2.ko'/>
<file name='fs/jbd/*'/>
<file name='fs/jbd2/*'/>
<file name='fs/hfs/*'/>
<file name='fs/exportfs/*'/>
<file name='fs/squashfs/*'/>
<file name='fs/nls/nls_utf8.ko'/>
<file name='fs/nls/nls_cp437.ko'/>
<file name='fs/nls/nls_iso8859-1.ko'/>
<file name='fs/fuse/*'/>
<file name='fs/udf/*'/>
<file name='drivers/ata/*'/>
<file name='drivers/scsi/*'/>
<file name='drivers/message/fusion/*'/>
<file name='drivers/cdrom/*'/>
<file name='drivers/parport/*'/>
<file name='drivers/char/lp.ko'/>
<file name='drivers/acpi/dock.ko'/>
<file name='drivers/firmware/edd.ko'/>
<file name='lib/crc-t10dif.ko'/>
<file name='lib/crc16.ko'/>
</drivers>
<drivers profiles='xen' type='drivers'>
<file name='drivers/xen/*'/>
</drivers>
<packages profiles='std' type='image'>
<package name='kernel-default'/>
</packages>
<packages profiles='pae' type='image'>
<package name='kernel-pae'/>
</packages>
<packages profiles='xenk' type='image'>
<package name='kernel-xen'/>
<package name='xen'/>
</packages>
<packages profiles='ec2' type='image'>
<package name='kernel-ec2'/>
</packages>
<packages profiles='rt' type='image'>
<package name='kernel-rt'/>
</packages>
<packages profiles='desktop' type='image'>
<package name='kernel-desktop'/>
</packages>
<packages type='image'>
<package name='curl'/>
<package name='atftp'/>
<package name='busybox'/>
<package name='parted'/>
<package name='adaptec-firmware'/>
<package name='dialog'/>
<package name='clicfs'/>
<package name='psmisc'/>
<package name='bind-libs'/>
<package name='bind-utils'/>
<package name='dhcpcd'/>
<package name='e2fsprogs'/>
<package name='btrfsprogs'/>
<package name='file'/>
<package name='hwinfo'/>
<package name='module-init-tools'/>
<package name='net-tools'/>
<package name='netcfg'/>
<package name='pciutils'/>
<package name='sysconfig'/>
<package name='sysfsutils'/>
<package name='util-linux'/>
<package name='grub'/>
<package name='squashfs'/>
<package name='fribidi'/>
<package name='make'/>
<package name='bootsplash'/>
<package name='eject'/>
<package name='tar'/>
<package name='lvm2'/>
<package name='bzip2'/>
<package name='kiwi-tools'/>
<package name='cryptsetup'/>
<package name='fbiterm'/>
<package name='bc'/>
<package name='gettext-runtime'/>
<package name='kexec-tools'/>
<package name='kpartx'/>
</packages>
<packages type='bootstrap'>
<package name='filesystem'/>
<package name='glibc'/>
<package name='glibc-locale'/>
<package name='diffutils'/>
<package name='procps'/>
</packages>
<packages type='delete'>
<package name='cracklib-dict-small'/>
<package name='cracklib-dict-full'/>
<package name='PolicyKit'/>
<package name='audit-libs'/>
<package name='blocxx'/>
<package name='cpio'/>
<package name='db'/>
<package name='expat'/>
<package name='fillup'/>
<package name='gdbm'/>
<package name='glib2'/>
<package name='gnome-filesystem'/>
<package name='gpg'/>
<package name='info'/>
<package name='insserv'/>
<package name='iproute2'/>
<package name='irqbalance'/>
<package name='limal'/>
<package name='limal-bootloader'/>
<package name='limal-perl'/>
<package name='logrotate'/>
<package name='mdadm'/>
<package name='mingetty'/>
<package name='openSUSE-release'/>
<package name='openslp'/>
<package name='pam'/>
<package name='pam-modules'/>
<package name='pcre'/>
<package name='perl'/>
<package name='perl-Bootloader'/>
<package name='perl-gettext'/>
<package name='permissions'/>
<package name='pm-utils'/>
<package name='pmtools'/>
<package name='suse-build-key'/>
<package name='make'/>
</packages>
<repository type='yast2'>
<source path='http://download.opensuse.org/distribution/11.3/repo/oss'/>
</repository>
<repository type='rpm-md'>
<source path='http://download.opensuse.org/update/11.3'/>
</repository>
</image>
\ No newline at end of file
#!/bin/sh
test -f /.kconfig && . /.kconfig
test -f /.profile && . /.profile
echo "Configure image: [$kiwi_iname]..."
#==========================================
# setup config.oempartition if required
#------------------------------------------
baseSetupOEMPartition
#==========================================
# remove unneded kernel files
#------------------------------------------
suseStripKernel
#==========================================
# setup gfxboot
#------------------------------------------
suseGFXBoot openSUSE grub
#==========================================
# remove unneeded packages
#------------------------------------------
rpm -e --nodeps --noscripts \
$(rpm -q `baseGetPackagesForDeletion` | grep -v "is not installed")
#==========================================
# remove unneeded files
#------------------------------------------
suseStripInitrd
#==========================================
# umount /proc
#------------------------------------------
umount /proc &>/dev/null
exit 0
This diff is collapsed.
# This is a bootsplash configuration file for
# SuSE based Image, resolution 1024x768.
#
# See www.bootsplash.org for more information.
# created by SUSE Image Builder
#
version=3
state=1
progress_enable=0
overpaintok=1
fgcolor=7
bgcolor=0
tx=20
ty=60
tw=994
th=708
jpeg=/etc/bootsplash/themes/NLD/images/bootsplash-1024x768.jpg
silentjpeg=/etc/bootsplash/themes/NLD/images/silent-1024x768.jpg
mnganim logo /etc/bootsplash/themes/NLD/images/logo.mng initframe logo silent center 512 384
mnganim logov /etc/bootsplash/themes/NLD/images/logov.mng initframe logov origin 0 0 0
trigger "isdown" quit
trigger "rlreached 5" toverbose
trigger "rlchange 0" tosilent
trigger "rlchange 6" tosilent
progress_enable=1
box silent noover 418 614 598 615 #ffffff10
box silent inter 418 613 418 615 #ffffff80
box silent 418 613 598 616 #ffffff80
# This is a bootsplash configuration file for
# SuSE based Image, resolution 1280x1024.
#
# See www.bootsplash.org for more information.
# created by SUSE Image Builder
#
version=3
state=1
progress_enable=0
overpaintok=1
fgcolor=7
bgcolor=0
tx=20
ty=60
tw=1250
th=964
jpeg=/etc/bootsplash/themes/NLD/images/bootsplash-1280x1024.jpg
silentjpeg=/etc/bootsplash/themes/NLD/images/silent-1280x1024.jpg
mnganim logo /etc/bootsplash/themes/NLD/images/logo.mng initframe logo silent center 640 512
mnganim logov /etc/bootsplash/themes/NLD/images/logov.mng initframe logov origin 0 0 0
trigger "isdown" quit
trigger "rlreached 5" toverbose
trigger "rlchange 0" tosilent
trigger "rlchange 6" tosilent
progress_enable=1
box silent noover 546 819 726 820 #ffffff10
box silent inter 546 818 546 820 #ffffff80
box silent 546 818 726 821 #ffffff80
# This is a bootsplash configuration file for
# SuSE based Image, resolution 800x600.
#
# See www.bootsplash.org for more information.
# created by SUSE Image Builder
#
version=3
state=1
progress_enable=0
overpaintok=1
fgcolor=7
bgcolor=0
tx=20
ty=60
tw=770
th=540
jpeg=/etc/bootsplash/themes/NLD/images/bootsplash-800x600.jpg
silentjpeg=/etc/bootsplash/themes/NLD/images/silent-800x600.jpg
mnganim logo /etc/bootsplash/themes/NLD/images/logo.mng initframe logo silent center 400 300
mnganim logov /etc/bootsplash/themes/NLD/images/logov.mng initframe logov origin 0 0 0
trigger "isdown" quit
trigger "rlreached 5" toverbose
trigger "rlchange 0" tosilent
trigger "rlchange 6" tosilent
progress_enable=1
box silent noover 306 480 486 481 #ffffff10
box silent inter 306 479 306 481 #ffffff80
box silent 306 479 486 482 #ffffff80
# This is a bootsplash configuration file for
# SuSE based Image, resolution 1024x768.
#
# See www.bootsplash.org for more information.
# created by SUSE Image Builder
#
version=3
state=1
progress_enable=0
overpaintok=1
fgcolor=7
bgcolor=0
tx=20
ty=60
tw=994
th=708
jpeg=/etc/bootsplash/themes/SLED/images/bootsplash-1024x768.jpg
silentjpeg=/etc/bootsplash/themes/SLED/images/silent-1024x768.jpg
mnganim logo /etc/bootsplash/themes/SLED/images/logo.mng initframe logo silent center 512 384
mnganim logov /etc/bootsplash/themes/SLED/images/logov.mng initframe logov origin 0 0 0
trigger "isdown" quit
trigger "rlreached 5" toverbose
trigger "rlchange 0" tosilent
trigger "rlchange 6" tosilent
progress_enable=1
box silent noover 418 614 598 615 #ffffff10
box silent inter 418 613 418 615 #ffffff80
box silent 418 613 598 616 #ffffff80
# This is a bootsplash configuration file for
# SuSE based Image, resolution 1280x1024.
#
# See www.bootsplash.org for more information.
# created by SUSE Image Builder
#
version=3
state=1
progress_enable=0
overpaintok=1
fgcolor=7
bgcolor=0
tx=20
ty=60
tw=1250
th=964
jpeg=/etc/bootsplash/themes/SLED/images/bootsplash-1280x1024.jpg
silentjpeg=/etc/bootsplash/themes/SLED/images/silent-1280x1024.jpg
mnganim logo /etc/bootsplash/themes/SLED/images/logo.mng initframe logo silent center 640 512
mnganim logov /etc/bootsplash/themes/SLED/images/logov.mng initframe logov origin 0 0 0
trigger "isdown" quit
trigger "rlreached 5" toverbose
trigger "rlchange 0" tosilent
trigger "rlchange 6" tosilent
progress_enable=1
box silent noover 546 819 726 820 #ffffff10
box silent inter 546 818 546 820 #ffffff80
box silent 546 818 726 821 #ffffff80
# This is a bootsplash configuration file for
# SuSE based Image, resolution 800x600.
#
# See www.bootsplash.org for more information.
# created by SUSE Image Builder
#
version=3
state=1
progress_enable=0
overpaintok=1
fgcolor=7
bgcolor=0
tx=20
ty=60
tw=770
th=540
jpeg=/etc/bootsplash/themes/SLED/images/bootsplash-800x600.jpg
silentjpeg=/etc/bootsplash/themes/SLED/images/silent-800x600.jpg
mnganim logo /etc/bootsplash/themes/SLED/images/logo.mng initframe logo silent center 400 300
mnganim logov /etc/bootsplash/themes/SLED/images/logov.mng initframe logov origin 0 0 0
trigger "isdown" quit
trigger "rlreached 5" toverbose
trigger "rlchange 0" tosilent
trigger "rlchange 6" tosilent
progress_enable=1
box silent noover 306 480 486 481 #ffffff10
box silent inter 306 479 306 481 #ffffff80
box silent 306 479 486 482 #ffffff80
# This is a bootsplash configuration file for
# SuSE based Image, resolution 1024x768.
#
# See www.bootsplash.org for more information.
# created by SUSE Image Builder
#
version=3