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 :
- (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.
- Add configuration sample
- Open /usr/share/kiwi/image/ctso-minimal-suse-11.0/config.xml
- Replace the repositories address below with your specified repositories or used online repositories for updated software
[code language=’cpp’] [/code]
e.g. :
[code language=’cpp’] [/code]
- Run kiwi command for processing the first stage (creates a so called physical extend according to the provided image description)
[code language=’cpp’]kiwi –prepare /usr/share/kiwi/image/ctso-minimal-suse-11.0/ –root /tmp/mykiwi –logfile terminal[/code]
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 - 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)
[code language=’cpp’]kiwi –type iso –create /tmp/mykiwi/ -d /tmp/mykiwi-image –logfile terminal[/code]
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 🙂 - 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.
[code language=’cpp’]zypper in kiwi-desc-misc[/code]
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 ! 😀
To add the default root user with blank password and standard Linux user, follow this instruction :
- Edit the /usr/share/kiwi/image/ctso-minimal-suse-11.0/config.sh file and add following code after baseCleanMount and before exit 0
[code language=’cpp’]#======================================
# /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[/code] - Remove existing physical extend
- Rebuild your iso by run the command on first stage and second stage :
[code language=’cpp’]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[/code]
[code language=’cpp’]rm -rf /tmp/mykiwi[/code]
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.
Kalau mau nambahin aplikasi caranya gimana ya mas?
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!