Spin openSUSE Live CD or USB stick image “easily”
by cyberorg,
Friday, September 5th, 2008 @ 1:43 pm
Introducing easy-kiwi-build, a tool to create openSUSE Live CD or deploy it on USB stick easily. Jan Weber would be doing a GUI to complement this utility soon.
KIWI is system imaging toolkit created by Marcus Schäfer (SaX2), it is also the engine behind http://studio.suse.com and LTSP5 implementation on openSUSE. Instructions to build images using KIWI were little complicated for everyday users, so hopefully this will make it much simpler.
Here is how it works:
* Install required packges:
Or via command line:
zypper ar http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.0 openSUSE:Tools
zypper ar http://download.opensuse.org/repositories/home:/cyberorg:/kiwi/openSUSE_11.0 home:cyberorg:kiwi
zypper refresh
zypper in easy-kiwi-build
zypper up -t package -r openSUSE:Tools # Always make sure kiwi packages are up to date.
* Build your own Live CD or deploy it on USB stick
1. Select the image you want to build in /etc/sysconfig/kiwi-build, choices such as :example, kde3, kde4 and gnome are available.
2. Mount openSUSE 11.0 DVD at /mnt/11.0, this will be used as installation source of all the packages in the image.
3. Run as root: kiwi-build-image -cd (to build Live CD) or kiwi-build-image -u (for USB, keep USB stick plugged in when running this)
The example image is lightweight openSUSE with FVWM and few basic applications such as Firefox and Xterm installed. The kde3 image is created by Carlos Goncalves, and gnome as well as kde4 by Stephan Kulow. Most of these images create installable live CD. There is also an icecream image which can be used to turn other computers in your network in to a Icecream build farm nodes.
If you want to add more packages to the image add a space separated list of packages in this file:
/usr/share/kiwi/image/yourselectedimage/suse-11.0/additional_apps
Create the file if it does not exist. To install packages not available in the DVD, download the rpm packages and put them in this folder:
/usr/share/kiwi/extra-packages-repo/
A GUI would definitly help with this part.
Have a lot of fun with it, you can send in your own custom images you want to share with others to include in this package.
: sharms, September 6, 2008 @ 6:00 am
Thanks for the info this should make things a bit easier
: Boycott Novell » Do-No-Evil Saturday - Part I: Several New OpenSUSE Releases, September 6, 2008 @ 10:40 pm
[...] There is also an OpenSUSE CD based on the very latest KDE4 release and similar spins can trivially be put together on a USB stick. Here is Google Chrome running on [...]
: d33d, September 6, 2008 @ 11:04 pm
This should be the default on the next version of opensuse
: » Cómo hacer tu propia imagen Live-CD o USB OpenSUSE. TooManySecrets HeadQuarters: FreeBSD, BSD, GNU/Linux, y demás historias., September 7, 2008 @ 1:21 pm
[...] linux, live-XX, live-usb, opensuse En el presente hago una traducción (más o menos afortunada), de cómo crearte tu propia imagen Live-CD o USB OpenSUSE, de Jigish Gohil, usando para ello KIWI, como introducción a easy-kiwi-buildun toolkit creado para [...]
: david, September 9, 2008 @ 7:12 am
Looks like a great way to spin new versions. I have tried Kiwi, but have only gotten about 3/4 of the way through I just don’t have time to keep trying. So I was really looking forward to using this, but when I try to install I get a dependency problem. It wants Perl 5.8, but the latest version in the repositories is 5.10. Should it be looking for 5.08? I’m trying the “easy” version because I’m a little challenged with these things at time, so any help would be much appreciated. Thanks
: cyberorg, September 9, 2008 @ 8:14 am
Enable openSUSE:Tools, and OSS main repositories enabled too, you should not have any dep issue.
: jsuchome, September 9, 2008 @ 11:48 am
Is yet another GUI needed? Have you tried YaST Image-Creator (http://en.opensuse.org/YaST/Modules/Image_Creator)? Does it have some major flows?
: cyberorg, September 9, 2008 @ 12:34 pm
Hi Jiri
We aiming to create extremely simple GUI with no image editing bits in it, just a selection of already available images, and option to build different image types from those. We are not building anything from scratch, we’d using stuff from GUI we already use for kiwi-ltsp.
YaST Image-Creator is the best and comprehensive tool out there for kiwi, would be still be recommended for creating new or customizing the images.
Cheers
-J
: david, September 11, 2008 @ 5:49 am
Thanks, I checked and when using the One Click install the Tools/10.3 repository was added instead of the 11.0 repository and I hadn’t noticed. Fixed that, changed “example” to “kde3″ in kiwi-build, mounted suse11.0 as /mnt/11.0, but now when I try to create either a cd or usb image I get:
You have to be root to run this script
If you did ’su’ to become root, please redo it with ’su -’
Which is strange since I am running this a root. Could this be a problem since I am using an image in VirtualBox? I can’t see why?
Also tried YaST Image-Creator in 10.3 and in this 11.0 virtual machine and it always crashes. Locks up in 10.3, but at least gave me an error message in 11.0. I haven’t checked that out yet as I thought I’d give this a shot first.
Thanks again for help.
: cyberorg, September 11, 2008 @ 8:54 am
How are you becoming root the script checks if echo $USER is root.
Running in Virtualbox should not matter, but you need free space about twice the amount of image size, so for CD image, about 2.5 GB, and for USB about 4GB.
: Boletín Semanal nº37 de openSuSE | KDE Blog, September 11, 2008 @ 8:25 pm
[...] Consejos y trucos: Cómo hacer un openSUSE Live CD o un Live USB de forma “sencilla”, po… [...]
: Nik, September 16, 2008 @ 3:18 pm
I’m trying this out in OpenSuse 11.0 x64 but installing easy-kiwi-build fails because
Problem: nothing provides perl = 5.8.8 needed by kiwi-2.76-80.1.i586
I’ve made sure to install perl, but unfortunately nothing satisfies the req. Any ideas?
: cyberorg, September 16, 2008 @ 3:20 pm
Make sure you have all of 11.0 main, openSUSE:Tools and home:cyberorg:kiwi repositories enabled.
: Henry, September 16, 2008 @ 6:33 pm
I have a problem at point 2: Mount openSUSE 11.0 DVD at /mnt/11.0, his will be used…
The bash replies : mount point /mnt/11.0 does not exist.
Could you please give a more detailed instruction?
Thank you,
Henry
: cyberorg, September 16, 2008 @ 6:43 pm
mkdir /mnt/11.0 first
: Henry, October 1, 2008 @ 6:47 pm
Easy-kiwi-build to create an openSUSE Live CD with kde4 image worked perfectly. There was no problem to produce an iso-file from which the CD was burnt.
However, when I tried to create openSUSE Live on a 4GB USB stick the program ended up with an error. After typing kiwi-build-image -u, the bash started with “Creating boot USB stick from: /tmp/kde4-image-usb/initrd-usbboot-suse11.0.i686-2.1.1splash.gz…” and soon ended with “Couldn’t find initrd file: /tmp/kde4-image-usb/initrd-usbboot-suse-11.0.i686-2.1.1splsh.gz”
Indeed, the directory /tmp/kde4-image-usb was empty. Do you know the reason for this and do you have a solution?
Regards, Henry
: cyberorg, October 5, 2008 @ 3:48 pm
release 0.0.6 should fix it, if not please paste complete log on http://pastebin.com and attach a link here.
: Stefanos, October 29, 2008 @ 9:16 am
The app looks great and promising. Example works great, however I have difficulty creating a kde{3,4} or gnome image, getting the exit code 104. Is there a list of what each exit code means ?
Also, is there a special reason why I should put the extra apps requirement in ./images/suse-11.0/additional_apps and not edit directly the config.xml ?
Regards,
Stefanos
: The_Code of live » Blog Archive » Announcing Easy-KIWI-GUI, November 3, 2008 @ 1:02 am
[...] introduced easy-kiwi-build, a command line tool to create KIWI images. He also announced that i will do a little GUI for it [...]
: Annunciata la Easy-KIWI-GUI - Crismon’s Blog, November 3, 2008 @ 4:21 pm
[...] notizia di oggi, in particolare, riguarda "easy-kiwi.build", un tool da linea di comando per creare immagini KIWI ed più precisamente serve per la [...]
: I Butler, November 6, 2008 @ 12:51 am
I’m having a problem using this to build the Lime JeOS image.
I hate to post dumps but that’s the only lead I can give.
example: 2008-11-05-17:45:00: ====== Starting ======
example: 2008-11-05-17:45:00: Running the KIWI creation stage1.
example: 2008-11-05-17:45:00: /tmp/example-image-tmp exists. Moving to “/tmp/example-image-tmp.0811051745″
Nov-05 17:45:01 : Setting log file to: terminal
Nov-05 17:45:01 : Reading image description [Prepare]…
Nov-05 17:45:01 : EXEC [uname -m]
Nov-05 17:45:01 : EXEC [xsltproc -o /usr/share/kiwi/image/example/suse-11.0/config.xml-next /usr/share/kiwi/xsl/convert14to20.xsl /usr/share/kiwi/image/example/suse-11.0/config.xml 2>&1]
Nov-05 17:45:01 : XSL: Already at version > 2.0… skipped
Nov-05 17:45:01 : EXEC [xsltproc -o /usr/share/kiwi/image/example/suse-11.0/config.xml-next /usr/share/kiwi/xsl/convert20to24.xsl /usr/share/kiwi/image/example/suse-11.0/config.xml 2>&1]
Nov-05 17:45:01 : XSL: Already at version 2.4… skipped
Nov-05 17:45:01 : EXEC [pwd]
Nov-05 17:45:01 : EXEC [pwd]
Nov-05 17:45:01 : Description provides no MD5 hash, check skipped
Nov-05 17:45:01 : Checking for default baseroot in XML data… notset
Nov-05 17:45:01 : EXEC [pwd]
Nov-05 17:45:01 : EXEC [pwd]
Nov-05 17:45:01 : EXEC [pwd]
Nov-05 17:45:01 : EXEC [pwd]
Nov-05 17:45:01 : EXEC [pwd]
Nov-05 17:45:01 : EXEC [pwd]
Nov-05 17:45:02 : EXEC [pwd]
Nov-05 17:45:02 : local URL path not found: /mnt/11.0 skipped
Nov-05 17:45:02 : Setting up package manager: zypper done
Nov-05 17:45:02 : EXEC [rm -f /var/cache/kiwi/zypp.conf*]
Nov-05 17:45:02 : EXEC [echo '[main]‘ > /var/cache/kiwi/zypp.conf.15867]
Nov-05 17:45:02 : Set package manager lock
Nov-05 17:45:02 : EXEC [touch /var/lock/kiwi-init.lock]
Nov-05 17:45:02 : Creating default template files for new root system
Nov-05 17:45:02 : EXEC [mkdir -p /tmp/example-image-tmp/dev]
Nov-05 17:45:02 : EXEC [mkdir -m 755 -p /tmp/example-image-tmp/dev/pts]
Nov-05 17:45:02 : EXEC [mknod -m 666 /tmp/example-image-tmp/dev/null c 1 3]
Nov-05 17:45:02 : EXEC [mknod -m 666 /tmp/example-image-tmp/dev/zero c 1 5]
Nov-05 17:45:02 : EXEC [mknod -m 622 /tmp/example-image-tmp/dev/full c 1 7]
Nov-05 17:45:02 : EXEC [mknod -m 666 /tmp/example-image-tmp/dev/random c 1 8]
Nov-05 17:45:02 : EXEC [mknod -m 644 /tmp/example-image-tmp/dev/urandom c 1 9]
Nov-05 17:45:02 : EXEC [mknod -m 666 /tmp/example-image-tmp/dev/tty c 5 0]
Nov-05 17:45:02 : EXEC [mknod -m 666 /tmp/example-image-tmp/dev/ptmx c 5 2]
Nov-05 17:45:02 : EXEC [ln -s /proc/self/fd /tmp/example-image-tmp/dev/fd]
Nov-05 17:45:02 : EXEC [ln -s fd/2 /tmp/example-image-tmp/dev/stderr]
Nov-05 17:45:02 : EXEC [ln -s fd/0 /tmp/example-image-tmp/dev/stdin]
Nov-05 17:45:03 : EXEC [ln -s fd/1 /tmp/example-image-tmp/dev/stdout]
Nov-05 17:45:03 : EXEC [mknod -m 640 /tmp/example-image-tmp/dev/loop0 b 7 0]
Nov-05 17:45:03 : EXEC [mknod -m 640 /tmp/example-image-tmp/dev/loop1 b 7 1]
Nov-05 17:45:03 : EXEC [mknod -m 640 /tmp/example-image-tmp/dev/loop2 b 7 2]
Nov-05 17:45:03 : EXEC [mknod -m 640 /tmp/example-image-tmp/dev/loop3 b 7 3]
Nov-05 17:45:03 : EXEC [mkdir -p /tmp/example-image-tmp/etc/sysconfig]
Nov-05 17:45:03 : EXEC [mkdir -p /tmp/example-image-tmp/var/log/YaST2]
Nov-05 17:45:03 : EXEC [mkdir -p /tmp/example-image-tmp/var/lib/dpkg]
Nov-05 17:45:03 : EXEC [touch /tmp/example-image-tmp/var/lib/dpkg/status]
Nov-05 17:45:03 : EXEC [mkdir -p /tmp/example-image-tmp/var/lib/dpkg/updates]
Nov-05 17:45:03 : EXEC [touch /tmp/example-image-tmp/var/lib/dpkg/available]
Nov-05 17:45:03 : EXEC [touch /tmp/example-image-tmp/.buildenv]
Nov-05 17:45:03 : EXEC [touch /tmp/example-image-tmp/etc/mtab]
Nov-05 17:45:03 : EXEC [touch /tmp/example-image-tmp/etc/sysconfig/bootloader]
Nov-05 17:45:03 : EXEC [cp /var/adm/fillup-templates/group.aaa_base /tmp/example-image-tmp/etc/group 2>&1]
Nov-05 17:45:03 : EXEC [cp /var/adm/fillup-templates/passwd.aaa_base /tmp/example-image-tmp/etc/passwd 2>&1]
Nov-05 17:45:03 : EXEC [cp /etc/resolv.conf /tmp/example-image-tmp/etc 2>&1]
Nov-05 17:45:04 : EXEC [cp /usr/share/kiwi/modules/KIWIConfig.sh /tmp/example-image-tmp/.kconfig 2>&1]
done
Nov-05 17:45:04 : EXEC [mkdir -p /tmp/example-image-tmp//var/cache/zypp 2>&1]
Nov-05 17:45:04 : EXEC [mount --bind /var/cache/zypp /tmp/example-image-tmp//var/cache/zypp 2>&1]
Nov-05 17:45:04 : EXEC [mkdir -p /tmp/example-image-tmp//var/cache/kiwi 2>&1]
Nov-05 17:45:04 : EXEC [mount --bind /var/cache/kiwi /tmp/example-image-tmp//var/cache/kiwi 2>&1]
Nov-05 17:45:04 : EXEC [rm -f /var/cache/kiwi/zypper/*.repo]
Nov-05 17:45:04 : Adding bootstrap zypper service: usr_share_kiwi_image_example_suse-11.0_extra-packages
Nov-05 17:45:04 : EXEC [/usr/bin/zypper --non-interactive --no-gpg-checks --reposd-dir /var/cache/kiwi/zypper --cache-dir /var/cache/kiwi/zypper --raw-cache-dir /var/cache/kiwi/zypper --root "/tmp/example-image-tmp" addrepo --type Plaindir 'file:///usr/share/kiwi/image/example/suse-11.0/extra-packages' usr_share_kiwi_image_example_suse-11.0_extra-packages 2>&1]
done
Nov-05 17:45:04 : Initializing image system on: /tmp/example-image-tmp…
Nov-05 17:45:04 : EXEC [chmod 755 /tmp/example-image-tmp/screenrc.smart]
+ trap clean INT TERM
+ export ZYPP_MODALIAS_SYSFS=/tmp
+ ZYPP_MODALIAS_SYSFS=/tmp
+ export YAST_IS_RUNNING=true
+ YAST_IS_RUNNING=true
+ export ZYPP_CONF=/tmp/example-image-tmp//var/cache/kiwi/zypp.conf.15867
+ ZYPP_CONF=/tmp/example-image-tmp//var/cache/kiwi/zypp.conf.15867
+ /usr/bin/zypper –non-interactive –no-gpg-checks –reposd-dir /var/cache/kiwi/zypper –cache-dir /var/cache/kiwi/zypper –raw-cache-dir /var/cache/kiwi/zypper –root /tmp/example-image-tmp refresh
+ SPID=16051
+ wait 16051
Downloading repository ‘usr_share_kiwi_image_example_suse-11.0_extra-packages’ metadata [done]
Building repository ‘usr_share_kiwi_image_example_suse-11.0_extra-packages’ cache [done]
All repositories have been refreshed.
+ test 0 = 0
+ /usr/bin/zypper –non-interactive –no-gpg-checks –reposd-dir /var/cache/kiwi/zypper –cache-dir /var/cache/kiwi/zypper –raw-cache-dir /var/cache/kiwi/zypper –root /tmp/example-image-tmp install –auto-agree-with-licenses –no-recommends filesystem glibc-locale zypper
+ SPID=16060
+ wait 16060
Reading installed packages…
‘filesystem’ not found.
‘glibc-locale’ not found.
‘zypper’ not found.
Nothing to do.
+ ECODE=104
+ echo 104
+ exit 104
Nov-05 17:45:05 : EXEC [rm -f /tmp/example-image-tmp/screenrc.smart*]
Nov-05 17:45:05 : EXEC [rm -f /tmp/example-image-tmp/screenrc.ctrls]
failed
Nov-05 17:45:05 : Removing zypper service(s): usr_share_kiwi_image_example_suse-11.0_extra-packages
Nov-05 17:45:05 : EXEC [bash -c "/usr/bin/zypper --non-interactive --no-gpg-checks --reposd-dir /var/cache/kiwi/zypper --cache-dir /var/cache/kiwi/zypper --raw-cache-dir /var/cache/kiwi/zypper --root /tmp/example-image-tmp removerepo usr_share_kiwi_image_example_suse-11.0_extra-packages 2>&1"]
done
Nov-05 17:45:05 : Removing zypper service(s): usr_share_kiwi_image_example_suse-11.0_extra-packages
Nov-05 17:45:05 : EXEC [bash -c "/usr/bin/zypper --non-interactive --no-gpg-checks --reposd-dir /var/cache/kiwi/zypper --cache-dir /var/cache/kiwi/zypper --raw-cache-dir /var/cache/kiwi/zypper --root /tmp/example-image-tmp removerepo usr_share_kiwi_image_example_suse-11.0_extra-packages 2>&1"]
done
Nov-05 17:45:05 : Umounting path: /tmp/example-image-tmp//var/cache/kiwi
Nov-05 17:45:05 : EXEC [umount "/tmp/example-image-tmp//var/cache/kiwi" 2>&1]
Nov-05 17:45:05 : Umounting path: /tmp/example-image-tmp//var/cache/zypp
Nov-05 17:45:05 : EXEC [umount "/tmp/example-image-tmp//var/cache/zypp" 2>&1]
Nov-05 17:45:06 : Release package manager lock
Nov-05 17:45:06 : EXEC [rm -f /var/lock/kiwi-init.lock]
Nov-05 17:45:06 : Base initialization failed failed
[*** back trace follows ***]
Trace Level 1 at /usr/share/kiwi/modules/KIWIManager.pm line 318
KIWIManager::setupScreenCall(’KIWIManager=HASH(0×8f3f364)’) called at /usr/share/kiwi/modules/KIWIManager.pm line 1563
KIWIManager::setupRootSystem(’KIWIManager=HASH(0×8f3f364)’, ‘filesystem’, ‘glibc-locale’) called at /usr/share/kiwi/modules/KIWIRoot.pm line 356
KIWIRoot::init(’KIWIRoot=HASH(0×8f161dc)’) called at /usr/sbin/kiwi line 367
main::main() called at /usr/sbin/kiwi line 2067
Trace Level 2 at /usr/sbin/kiwi line 368
main::main() called at /usr/sbin/kiwi line 2067
[*** end ***]
Nov-05 17:45:06 : KIWI exited with error(s) done
example: 2008-11-05-17:45:06: Could not create KIWI Image stage1. Aborting!
: cyberorg, November 6, 2008 @ 6:05 am
“Nov-05 17:45:02 : local URL path not found: /mnt/11.0 skipped”
You need 11.0 DVD media mounted in /mnt/11.0 before running this.
: I.Butler, November 7, 2008 @ 12:06 am
Thanks so much. I really appreciate it. I guess I missed that part. However, I’m being told that the checksum for the config.xml file failed:
Nov-06 17:03:29 : EXEC [cd /usr/share/kiwi/image/vmxboot/suse-11.0 && md5sum -c .checksum.md5 2>&1]
Nov-06 17:03:29 : Integrity check for /usr/share/kiwi/image/vmxboot/suse-11.0 failed:
./root/linuxrc: OK
./root/preinit: OK
./config.xml: FAILED
./images.sh: OK
md5sum: WARNING: 1 of 4 computed checksums did NOT match failed
Nov-06 17:03:29 : EXEC [rm -rf /tmp/kiwi-VMX.p8bwru/kiwi-VMXboot-31907]
Nov-06 17:03:29 : EXEC [rm -rf /tmp/kiwi-VMX.p8bwru]
[*** back trace follows ***]
Trace Level 1 at /usr/share/kiwi/modules/KIWIXML.pm line 129
KIWIXML::new(’KIWIXML’, ‘KIWILog=HASH(0×8f15b6c)’, ‘/usr/share/kiwi/image/vmxboot/suse-11.0′, ‘HASH(0×8506ab4)’, undef, ‘ARRAY(0×8d74a14)’) called at /usr/sbin/kiwi line 263
main::main() called at /usr/share/kiwi/modules/KIWIImage.pm line 847
KIWIImage::createImageUSB(’KIWIImage=HASH(0×8ffeb2c)’, ‘ext3:vmxboot/suse-11.0′, ‘VMX’) called at /usr/share/kiwi/modules/KIWIImage.pm line 942
KIWIImage::createImageVMX(’KIWIImage=HASH(0×8ffeb2c)’, ‘ext3:vmxboot/suse-11.0′) called at /usr/sbin/kiwi line 659
main::main() called at /usr/sbin/kiwi line 2067
[*** end ***]
Any insight into this one? Again I apologize for he dump.
: cyberorg, November 7, 2008 @ 7:00 am
It means you manually edited /usr/share/kiwi/image/vmxboot/suse-11.0/config.xml
reinstall the package containing that file and try again.
: I.Butler, November 10, 2008 @ 11:24 pm
Unfortunately, even after I reinstalled the kiwi-vmxboot package, it continues to give me the same error. I uninstalled everything Kiwi-related and re-installed it, but still I get the same error. Should I reinstall SUSE on my virtual machine, or is there something else I can do?
: cyberorg, November 11, 2008 @ 6:24 am
rpm -e kiwi-vmxboot
rm -rf /usr/share/kiwi/image/vmxboot
zypper in kiwi-vmxboot
If you still get that error:
rm /usr/share/kiwi/image/vmxboot/suse-11.0/.checksum.md5
: I.Butler, November 11, 2008 @ 5:21 pm
Thanks, I re-installed only the vmxboot package and it seems to have worked. Thanks for the help!
: Marco, November 11, 2008 @ 8:20 pm
I get this:
http://pastebin.com/m2cda5221
The stupid error is: Nov-11 19:10:14 : zypper: chroot: cannot run command `/usr/bin/zypper’: No such file or directory
I have zypper in /usr/bin