How to Build openSUSE Minimal System LiveCD

Note : It’s the second article for “Remastering openSUSE : How to Build your own openSUSE Based Distro” series.

In the previous article, we have discussed about kiwi imaging system and preparing kiwi as our tools for building openSUSE based distro. Now, we will try another interesting guide, how to make our first openSUSE minimal system liveCD.

Why I choose openSUSE minimal system and not another result, e.g. : openSUSE server or openSUSE desktop liveCD or openSUSE liveDVD, or even openSUSE LiveUSB ? The answer is because the tutorial is the easiest choice ! We can build openSUSE minimal system with a simple configuration, without complicated schema, and get the result within few minutes. Let’s try this :

  1. (Optional) Preparing Local Repositories. We could used online repos if we have fast internet connection but I would like to recommended  local repos for our testing. Create local repositories by making a new folder and copying all of DVD contents (or mounted iso image) into the folder. I will used /home/vavai/suse11 as my based source on the following article. Adjust this with yours.
  2. Add configuration sample
  3. zypper in kiwi-desc-misc
  4. Open /usr/share/kiwi/image/ctso-minimal-suse-11.0/config.xml
  5. Replace the repositories address below with your specified repositories or used online repositories for updated software
    <repository type="yast2">
    <!--<source path="/mounts/machcd2/consistent/full-i386"/>-->
    <source path="/image/CDs/full-i386"/>
    </repository>

    e.g. :

    <repository type="yast2">
    <!--<source path="/mounts/machcd2/consistent/full-i386"/>-->
    <source path="/home/vavai/suse11"/>
    </repository>
  6. Run kiwi command for processing the first stage (creates a so called physical extend according to the provided image description)
    kiwi --prepare /usr/share/kiwi/image/ctso-minimal-suse-11.0/ --root /tmp/mykiwi --logfile terminal

    The command should be ended with “Kiwi exited successfully done”
    Oct-16 11:19:47 <1> : Umounting path: /tmp/mykiwi/dev
    Oct-16 11:19:47 <1> : EXEC [umount "/tmp/mykiwi/dev" 2>&1]
    Oct-16 11:19:47 <1> : Umounting path: /tmp/mykiwi/proc
    Oct-16 11:19:47 <1> : EXEC [umount "/tmp/mykiwi/proc" 2>&1]
    Oct-16 11:19:47 <1> : KIWI exited successfully   done

  7. Run kiwi command for processing the second stage (creates an operating system image from a physical extend. The result of the second stage is called a logical extend or short an image)
    kiwi --type iso --create /tmp/mykiwi/ -d /tmp/mykiwi-image --logfile terminal

    If you found an error like :
    Oct-16 11:24:55 <3> : Couldn’t create squashfs filesystem   failed
    Oct-16 11:24:55 <3> :
    Oct-16 11:24:55 <1> : EXEC [rm -rf /tmp/mykiwi-image/mykiwi-read-write]
    Oct-16 11:24:55 <1> : EXEC [rm -rf /tmp/mykiwi-image/mykiwi]
    Oct-16 11:24:58 <3> : KIWI exited with error(s)   done
    Then, install squashfs from the repositories (zypper in squashfs from konsole)
    Kiwi must be ended with “KIWI exited successfully done”. If you got an error, please take care and resolve the problem because you will not get the iso :-)

  8. Goto /tmp/mykiwi-image and find ctso-minimal-suse-11.0.i686-1.1.2.iso file. It’s an iso image. You could burn the iso image into CD or used the iso image as dvd rom source with your virtualbox or vmware.

Good luck, you has been successfully building your first openSUSE based distro, but please wait. This step is not completed either :-)

Try to run the iso image. It will get you a standard and nice openSUSE boot process and ended with the user login on console. It’s normal because openSUSE minimal system used text mode only and run on init 3 by default. The abnormal situation is that we could get into the system with any user name ! :-D

To add the default root user with blank password and standard Linux user, follow this instruction :

  1. Edit the /usr/share/kiwi/image/ctso-minimal-suse-11.0/config.sh file and add following code after baseCleanMount and before exit 0
    #======================================
    # /etc/sudoers hack to fix #297695
    # (Installation Live CD: no need to ask for password of root)
    #--------------------------------------
    sed -i -e "s/ALL ALL=(ALL) ALL/ALL ALL=(ALL) NOPASSWD: ALL/" /etc/sudoers
    chmod 0440 /etc/sudoers
    
    /usr/sbin/useradd -m -u 999 linux -c "Live-CD User" -p ""
    
    # delete passwords
    passwd -d root
    passwd -d linux
    # empty password is ok
    pam-config -a --nullok
  2. Remove existing physical extend
  3. rm -rf /tmp/mykiwi
  4. Rebuild your iso by run the command on first stage and second stage :
    kiwi --prepare /usr/share/kiwi/image/ctso-minimal-suse-11.0/ --root /tmp/mykiwi --logfile terminal
    kiwi --type iso --create /tmp/mykiwi/ -d /tmp/mykiwi-image --logfile terminal

The tutorial above is quite simple, but we could extend the result by adding another application into config.xml schema. KIWI is smart enough to add the application and their dependencies, so don’t be afraid with the installation process for every application. KIWI also smart enough for finding relevant repositories if we providing multiple repos.

If you wish to add desktop environment, GUI application or another 3rd party application, ad the package within <package name=”name-of-package”/>. It may be too complicated for adding every package into the config.xml schema but we can avoid these by using KIWI features : pattern usability.

We will learn more about using KIWI and Pattern for “Building openSUSE 11.0 KDE 3.5 LiveCD” on next article.

Random Post

4 Responses for “How to Build openSUSE Minimal System LiveCD”

  1. [...] We will learn more about kiwi configuration schema on next tutorial : How to Build openSUSE Minimal System liveCD [...]

  2. Blog Vavai says:

    [...] Remastering openSUSE : Bagaimana Membuat Distro Linux openSUSE Sesuai Keinginan • Friday, October 17. 2008 Bayangkan jika kita dapat membuat distro Linux openSUSE dengan isi paket dan konfigurasi yang kita inginkan. Bayangkan jika itu semua ternyata dapat dengan mudah dilakukan dalam beberapa tahapan mudah dan tidak sesulit yang dibayangkan semula.Itulah materi yang saya sampaikan saat pertemuan bulanan openSUSE ke 10 hari Minggu lalu. Saat pertemuan, saya memang langsung melakukan presentasi dan langsung melakukan demo namun belum merangkumnya dalam satu paket tulisan.Mengingat saya sendiri lagi belajar menulis dan melakukan testing untuk openSUSE 11.1 yang akan diluncurkan di bulan November 2008, saya menuliskan artikelnya di blog yang baru. Berikut adalah link-nya (mohon maaf kalau ada salah kata, penulisan, grammar dan sejenisnya).[1] : Remastering openSUSE : Kiwi Imaging System[2] : Remastering openSUSE : How to Build openSUSE Minimal System LiveCD [...]

  3. masrust says:

    Kalau mau nambahin aplikasi caranya gimana ya mas?

  4. Von Klinner says:

    Some interesting and intelligent content you have here on your site. I have several wordpress sites and like your theme. I do notice that you are not monetising your traffic to its maximum which is what I used to do until someone pointed out to me that you can actually earn yourself some decent amounts to help pay your hosting and domain fees etc. Looking at your Alexa rankings I can see you obtain some decent traffic which for very little work could help you out. I use this Wordpress Plugin which effectively turns words and phrases in all (or just some if you like) your content, making contexual links which your visitors will click upon. Take a look at it and see what I mean, I easily clear my hosting and other fees each month using this. Hope that helps you out – we fellow wordpress bloggers have to stick together!

Leave a Reply

About Vavai

Masim Vavai Sugianto Masim Vavai Sugianto, Indonesian, male, 32 years old, born and live in Bekasi-West Java, a small town near Jakarta – main city of Indonesia – since 17 May 1976. Founder of Indonesian openSUSE and Zimbra Community, an adventure, travelling and book lover.



I live in a tropical country, Indonesia that only has two seasons, dry season and rainy season. I love the dry season with bright sunshine and rare rain…There is a joke about the seasons in Indonesia. Indonesia is known as a country with so many season, ie : durian season, mango season, married season and much more...



ContactI'm currently working as an IT support for a small company based on Jakarta. My career has led me to specialize in Sysadmin, networking and software implementation with current focus on Linux and open source area. I have experience on MRP, ERP, Gemba Kaizen, Just in Time, Six Sigma and TQC/TQM. Please use my contact page if you wish to contact me.
Log in - BlogNews Theme by Gabfire themes