Tuesday, April 17, 2012

Things you can do with packages based on time.

RPM keeps a history of installed things. In opensuse there is also a var log zypp history.  Here is an example of checking packages based on time.

    rpm -qa --qf '(%{INSTALLTIME:date})%{NAME}\n'

Will yield something like this:

 (Mon 20 Feb  2012  01:45:49  PM   UTC) libSDL-devel
 (Wed 30 Nov 2011  06:24:38  PM   UTC) kdebase4-workspace-liboxygenstyle
 (Sat   14 Apr  2012  07:27:40  AM   UTC) ffmpegthumbnailer
 (Wed 30 Nov 2011  06:19:28   PM  UTC) ptools
 (Thu  05 Jan   2012  07:41:54  AM   UTC) NetworkManager
 (Fri    11 Nov  2011  12:17:16  AM   UTC) xorg-x11-driver-video
 (Wed 01 Feb   2012  01:32:00  AM  UTC) libmysqlclient_r18
 (Wed 30 Nov  2011  09:22:45  PM   UTC) libwpg-0_2-2
 (Wed 30 Nov  2011  06:21:22  PM   UTC) gegl-0_1
 (Sun  01 Apr   2012  08:00:55  PM  UTC) glibc-locale-32bit

Saturday, March 10, 2012


This is an interactive script that can handle most of the task regarding systemd services. It is just a front end for systemctl and not a replacement. What it does is it make's your life easier by avoiding to type extension '*.service' again and again  while dealing with services. Imagine if you want to stop at least 4 services at once, hence you will type 'systemctl stop one.service two.service three.service four.service' , you need to type additional eight  characters on each service names  which means 32 characters long! Systemd-qserv will allow you to enter just their names without an extension '*.service or even a mix of like 'apache2 sshd msyql xinetd.service nfs.service' would be just fine.

So why did it came up in OBS? while other scripts that are well written did not end up in OBS? first of all kudos to Boris Manojlovic for packaging this stuff. Now to answer the question, most of the script's that are out there is specific to just one application. Come openSUSE 12.1 systemd is the default whether you like it or not and it does not care what DE do you use or if you even use one at all. You can find the package in my home repo.  The source is there too.

Tuesday, March 6, 2012

halt or Halt?

Some folks missed the old halt command which seems to work the same as power off. OpenSuSE now uses /sbin/shutdown for that matter, how ever you can still have the same command with some few steps as explained below.

Create  the file    /etc/bash/bashrc.local    (assuming that you are using bash as your shell ) or any place that a shell is sourced when it is invoked and put the line below.

  Halt() { if (( $EUID == 0 )); then  shutdown -h -P now; else su root -c'shutdown -h -P now'; fi ; }  

Verbose or Silent

When booting up OpenSuSE normally you will see the clean and green splash screen and if you want to see what is going on behind it you need to press the escape button. Now if you want to change it permanently and not having press the button every time you boot you need to do the following.

1. Legacy GRUB
If you are using the old legacy grub you can edit menu.lst directly or by using
   yast2 bootloader. 

When you are log in as a normal user open up a terminal and run.
  •  su root -c'grep -i silent  --colour=auto /boot/grub/menu.lst' 

Enter the root's password and you should see the red text that matches the string silent. This is the option the controls what to display during boot up. silent means to show nothing during the boot process you can do a quick edit to it by using perl. As always we need to back up everything we are editing as a good practice.

keeping packages locally

This might be useful if you have a limited internet band width. Just in case you need to reinstall or install from another machine, you do not need to download the packages again.

After the installation immediately before you run the update in your fresh installed suse run the command below, It will ask you the root's password and will tell you that rpm caching is enabled on the remote repositories.

phpVirtualBox on OpenSuSE 12.x

phpVirtualBox home page is in http://code.google.com/p/phpvirtualbox/. It is just a web interface which is written in php that controls, access and monitor your vms. In short a browser that controls your vms. You will need to install VirtualBox since it is  just a front end. Refer to my guide on how you can install vbox. One more thing to note is that the package from the distro does not have vboxwebsrv  this works only for the binary from Oracle. After you have installed vbox you will install a web server. We will use apache2 as an example. You can either use yast2 software management to install the lamp_server pattern and some php packages or use our friend zypper.

Java on OpenSuSE 12.1

Oracle Java license has changed so the normal rpm package that you will normally find in the repos like packman and such  does not exist anymore. icedtea-web is the plug-in for web browsers which works most of the time and openjdk as the alternative jre. You can find the binaries from java.com and install it. Here is a quick guide about installing the binary version. This is for 64 bit version only DO NOT use this guide if your using a 32 bit system.

DWM-152 on Opensuse 12.1

Details of this D-Link modem you can  find here. Once plug in
 lsusb    will show   07d1:a804 D-Link System  

and  dmesg 

OpenSUSE on USB (Reloaded)

There are many guides on how to install suse on an external media such as  usb drive including my previous posts. This guide will try to make it as easy as possible so people  that do not have any experience in installing suse on an external drive can cope up with this guide.

Please read the whole tutorial first before you proceed!!!

Things you will need:

External drive or a pendrive  ( at least 5 GB )
Installation media DVD/CD, net-install CD and so on.

Lets get started, insert the installer to its drive or boot from the installer while your usb-drive is inserted to its port and make sure that your machine is set to boot with a usb device!

Start the installation.

Look Mah, I got a new DVD drive

Replacing a dvd drive in any OS is due to happen and it's inevitable. either because its broken, busted or you just want to replace it with  a new shiny full featured dvd drive. In SuSE  It will work-out-of-the-box as i assume it would  be in any other distro  but sooner or later you will encounter some annoying message, you will get an error while using the "eject" command.

Chroot explained

For one reason or another you broke your system and don't know what to do? There is still one fix that you can try and that is chroot. As explained from this  howto chroot not be scared. we will try to dig a little bit more about how it works. You should know the basic of the Linux file system Hierarchy.


Distribution upgrade is a good thing for folks that do not want to start from scratch and re-install the whole thing. It is also one way of Upgrading without DVD.  A quick way  would be to  modify your repo file configuration. As usual before we modify or edit something it is a good practice to backup that file/data that we are messing with.

1. backup the directory which contains your repo file.

    cp -Rv /etc/zypp/repos.d/ /etc/zypp/repos.old/

VirtualBox on openSuSE

VirtualBox is a free and opensource virtualization client from Oracle. Before being acquired by Oracle VirtualBox was originally from innotek GMBh. First of all you need to update your system before installing vbox, you can use either   
 zypper   or    yast2 online_update  

To update using zypper.
  •   zypper ref && zypper up  
Reboot if you have a kernel update so the new kernel kicks in, this is specially from a new installation, you DO NOT want to jump into installing VirtualBox on a fresh installed SuSE because this might cause some unnecessary packages to be installed and later cause some issues which will cause you some headache and later blame the package or even openSUSE for screwing things up! There are two VirtualBox rpm packages that you can install, one from the suse repo and the other from VirtualBox website. Starting from version 4.0 the base package is released under the GPL v2. See editions on https://www.virtualbox.org/wiki/Editions to know the difference between the two.

Upgrade without DVD drive

For one reason or another you do not have a working DVD drive but you have the DVD.iso at hand and your BIOS does not support booting from external devices such as usb then this might save you some pain :

The idea is 2 computer's that can communicate at each other, the first is the source or repository which will host the .iso file and the second is your SuSE box that you want to upgrade You need to have a working network at least between 2 computers. This howto will show you how to do it between 2 openSuSE box with in your lan. The SuSE box that is going to be your installation source will use the http protocol.

OpenSuSE 11.3 on usb

The trick for 11.3 is you need to format and create a file system on your usbhdd before you do the installation in vbox, do the pre partitions/file system that you want/need. After that install SuSE from vbox (as usual). You dont need to reformat/create the partitions/file system as what would the installer will say since it has been done already, You will get an error similar to this.

you can ignore that warning :-) click yes and continue the installation one thing that was not tested by me is this reiserfs thing, so feel free to test it :-).

You can choose the D.E. that you want to install directly without having to install the text mode version of OpenSuSE as oppose to my 11.2 install

Thats just it

OpenSuSE on a pendrive

If you just want a persistent pendrive install of openSuSE then this is probably what you want,
but if you have a large size external hdd then you might want to check this HOWTO
We will assume that you have a basic knowledge on how to use VirtualBox.
Check out the manual.

Things you will need:
  1. x86 hardware (so VirtualBox can run on it)
  2.  VirtualBox program running in your system.
  3. A working install of openSuSE inside VirtualBox.
  4. A pen drive at least 6.0 GB data capacity.

Alright lets go step by step:

Rawdisk access to your usb install

          Running your usb-install parallel with your normal installed system. This can
          also boot an  existing SuSE partition in your disk. This procedure assumes
          that you have a Linux host.

          Raw disk might cause irreversible damage to
          the partition you are going  access.

          Backup first all the important data on the disk that you will access via rawdisk.
          You need  to do the following modifications in your usb-install before you can
          access it via rawdisk

My persistent usb-hdd install of OpenSuSE

This is how i manage to do a persistent usb install of OpenSuSE
This does not require a working OpenSuSE system to do this.

I have used VirtualBox version that support usb devices. you can download it in their website If you are not familiar with VirtualBox i suggest reading the manual.