Wednesday, 16 December 2009

Improving boot time on Gentoo

Continuing with my attempts at reducing boot time on my Gentoo x86_64 running desktop, I tried switching off interactive boot and booted in about 20 seconds.

To improve booting, I tried prelinking. However, to my surprise it increased boot time.

Wednesday, 2 December 2009

Slower boot on newer kernels

Recently, I upgraded my kernel on my Gentoo x86 and patched my kernel on openSUSE 11.1 x86_64. I found both booted slower than when I charted booting last time, earlier this year.

The increase in boot-time was more in case of openSUSE compared to Gentoo.

Insecure gmail POP

Recently, after a long time (about a month time) I accessed gmail through pop. Interestingly, I found many older mails being pushed to me. Those mails were supposed to be deleted by gmail as I had selected "delete gmail's copy after sending" option. It seems like gmail just marks them as deleted; but keeps them for deletion at idle time. This is okay as long as gmail deletes them in time. However, when I accessed my mail after a month, I got mails that dated about 6 months back.

The insecurity lies in the fact that if my password is compromised, the person shall have access to mails that I thought I had deleted. Even if I notify my contacts about my password compromise, the person shall still access vital information from those past mails if he attempts POP access.

Saturday, 28 November 2009

Monday, 23 November 2009

E17 vs KDE 4.3.1 -II

After my previous post comparing E17 and KDE 4.3.1, I tried to improve performance on both environments. On KDE, I could not go below 50 degree Celsius.

However, on E17, CPU temperature easily reached to 40 degree Celsius.

I have heard criticisms against E17 that E17 has taken more than 7 years trying to produce what KDE did in less than two years [they are referring to desktop shell]. However, such criticism is quite shallow. On its release KDE lacked a lot in terms of both functionality and stability. Even now, many packages are not complete in terms of functionality. For example, Amarok 2 has a new improved look than Amarok 1.4. However, Amarok 2 lacks ipod sync functionality [not considering the circumventing solutions as they are not for normal users]. Amarok 2 music database was not stable until recently. I have had a messed music database with incorrectly matched artist names and genres. k3b is not properly maintained. Kaffeine recently had a KDE4 port. My next post shall throw more light on "poor" KDE 4.

On the other hand, E17 has not been released but does not have intentions of such premature release to put users in trouble. E17 is clear in its approach and has maintained a standard of stability and functionality [Check out the svn version to verify]. Its performance even on embedded systems is marvellous.

Cooked linux console

Recently while I was playing around with code, there was a log line
printf("foo: skipped '%c'\n", c);

When c was a carriage return; the log line obtained was
'oo: skipped '
This was because carriage return takes the current position to the beginning of the line. Now, as the linux console is cooked by default [Most *nix programs get their tty input via the kernel tty driver in `cooked' mode.], it formatted the whole line and printed the line at once producing the effect.

A simple way to detect parts where the "cooked" console interferes is to run the command from within emacs. Emacs does its own input handling and is not cooked. The same log line in emacs is shown as:
foo: skipped '^M'

These petty issues must be kept in mind while considering portability of software.

Wednesday, 28 October 2009

E17 vs KDE 4.3.1

Recently, I have started using KDE 4.3.1 after it came in Gentoo stable tree. I have been using E17 svn versions for quite some time now. I found that with E17 the cpu is relatively cooler. Of course, my benchmarking is not precise yet it shall provide you an overall view. My system is Thinkpad R60.

With KDE 4.3.1, my system starts at about 55 degree Celsius as seen above. While with E17, it starts at about 50 degree Celsius.

Interestingly, it gradually decreases to about 45 degrees while in KDE it stabilizes at the same 55 degrees.

I decided to do the usual stuff and check. So, I started music play in Amarok (yeah, I use Amarok even in E17.) and compilation. With KDE 4.3.1, temperature reached 60 degrees. While with E17, temperature was within 50 degrees.

After working on my power management, I was able to get KDE to start at about 50 degrees as shown below.

However, E17 proved better once more by starting at about 45 degrees and cooling down to even lower temperatures after that.

Wednesday, 21 October 2009

Tuesday, 20 October 2009

Screen brightness

The brightness of the lcd of my Thinkpad R60 was an issue for me because I could only decrease the brightness using Fn+End; but could not increase it using Fn+Home as the Home key was defunct.

I figured may be changing some ".conf" can help me out. I checked out with people at #gentoo. Just as I expected, I just had to write appropriate integer values to
From the maxbrightness file I found the max value for my system was 7. Checking the brightness file, I found the current screen brightness to be at 0. Setting it to 4 was fine with me.

Wednesday, 7 October 2009

Sed as a handy developer tool

According to EFL standards, static functions started with '_'. So, I had renamed ertf_stylesheet_add to _ertf_stylesheet_add. Going through the source looking for style string stuff, I noticed the error messages did not reflect these changes. So, I decided to do the necessary changes. I wasn't in the mood of looking for all occurrences of ertf_stylesheet_add and change them. So, I decided to try sed.

Starting with the man page and experimenting a little, I wrote the following script:
sed -e s/ertf_stylesheet_add/_ertf_stylesheet_add/ ertf_stylesheet.c
Checking the output, I saw that it worked fine and I could redirect the output to a file to have it saved. Only problem was that it changed occurrences of _ertf_stylesheet_add to __ertf_stylesheet_add, which was completely uncalled for. Digging deeper, I found that I can get rid of this by specifying addresses, i.e. restricting sed usage by specifying line numbers in my case. I wasn't satisfied with this because then I would have to go back and check the line number to ignore. So, I kept looking and finally I found my solution in regular expressions. I typed the following at command line and it worked just fine.
sed -e s/[^_]ertf_stylesheet_add/_ertf_stylesheet_add/g ertf_stylesheet.c
Also, by now I had learnt that adding the 'g' option was safe. Again I had missed on an an essential subtelity. I had forgotten this shall delete the intial double quotes of the error messages which were like:
"ertf_stylesheet_add: ..."

So, I edited my command as follows.

sed -e 's/\([^_]\)\(ertf_stylesheet_add\)/\1_ertf_stylesheet_add/g' ertf_stylesheet.c

This removed the double quotes problem. Now, as things started rolling, I wanted to do with sed. Now, in the error messages _ertf_stylesheet_add was usually followed by a colon. However, a few typos were there where there were colons instead of semicolons. So, I edited the sed line as follows.

sed -e 's/\([^_]\)\(ertf_stylesheet_add\)/\1_ertf_stylesheet_add/g' -e 's/;\(.\)/:\1/g' ertf_stylesheet.c

This did the task with the added problem of replacing

case ';':

case ':':

which was undesirable. Now, the problem was I was interested in a conditional replacement. So, I further edited the line as follows.
sed -e 's/\([^_]\)\(ertf_stylesheet_add\)/\1_ertf_stylesheet_add/g' -e 's/stylesheet_add;/stylesheet:/g' ertf_stylesheet.c

Here I am using two s/// expressions as this is the only way out. Checking at ##sed on freenode, I found the semantics of s/// don't allow conditional replacement. I was talking about adding this functionality to sed; but that would change sed's regxp flavour. However, this could be achieved easily using perl.

perl -pe 's/(ertf_stylesheet_add)(;?)/"$1".($2?":":"")/eg'
Well doing this task using sed took longer than it would have taken if I had done it by hand. However, since these tasks shall be common (code refactoring), I thought it shall save much time and effort in future.

Actually, the method worked so well that the "future" came in seconds and I was writing multi-line sed scripts to format error messages the whole lib folder. I quickly wrote the following lines followed by some others.

sed -e 's/\([^_]\)\(ertf_font_add\)/\1_ertf_font_add/g' -e 's/font_add;/font:/g' ertf_font.c

sed -e 's/\([^_]\)\(ertf_color_add\)/\1_ertf_color_add/g' -e 's/colortbl:/ertf_color_table:/'  -e 's/color_add;/color_add:/g' ertf_color.c

sed -e 's/readloop:/ertf_document_parse:/g' ertf_document.c

Wednesday, 30 September 2009

Kernel upgrade

For some time I had been trying to upgrade the kernel on my Gentoo box from 2.6.29 to 2.6.30. I was interested in 2.6.30 kernel because of three reasons.

#1 From what I remembered from the experiements with sreadahead, this kernel was supposed to support it well. However, recently when I dug into the topic, Jeremy told me that it is very much a dead project now. I still have baselayout2 and openRC to tinker with to obtain boot speed improvements.

#2 I had a secondary LAN port installed. So, I had to configure my kernel for that. I decided that since a new kernel is available, I shall install the driver and the kernel too.

#3 This kernel supports LZMA compression. I was interested in trying it out.

I compiled the kernel fine, editted grub.conf and rebooted into my experiemental kernel. During the boot, I could clearly see that sreadahead was a dead project. It took me straight to kdm screen. However, after kdm the system froze.

My first idea was to check the command line. So, I restarted and from kdm went to command line. Invoking the following, I found that the driver for the LAN interface was fine.
lspci -k
I was clueless as to what went wrong. I thought I might need to build xorg-server, input drivers and video drivers against my new kernel. So, I ran the following command.
emerge -v xorg-server xf86-video-intel xf86-input-evdev
After that once again, I tried to get back to GUI using. However the system froze again. I thought lets get some help. Checking on #gentoo, I was suggested to try what I had done as explained above. I kept looking at IRC for four days without any solution to my problem. Then, thinking my KDE might be having issues, I tried at #gentoo-kde where Aleister suggested I might have enabled KMS and using xorg-server 1.5 at the same time. My X server log file at
was reporting fatal server error. Checking my menuconfig, I found that he was right. Disabling that option, I was able to do away with system freezes. All I lost was the two penguins that appeared during boot. The problem was xorg-server 1.5 does not support kernel mode setting (KMS).

Tuesday, 22 September 2009

Stages in software development

During development of software, debugging becomes easy when we have working code after each commit. O'Rielly's "must read" articles for programmers also recommend planning each commit well. This actually is a better way than unit testing, though is much the same in some cases. The advantage here is the developers are not only sure of the working of the newly added unit but also of its integration with the rest of the code.

To exemplify, I share the following screenshots. The screenshots are of an rtf file renderer. The folowing is the screenshot after foreground color implementation. Here the font size is rendedred double the required size. Also note the unnecesary space in between the letters 'm' and 'p' of the word "example". There are other similar cases too.

In the next commit, the font size problem is fixed, yet the problem of unnecessary space remains unsolved, though it doesn't seem to make much difference.

Then the unnecessary space problem was solved.

In the subsequent commit, double underline support was added.

The above were the screenshots of successful additions to the software. However, in between these, there must be numerous trials that reveal error in implementation. The point is while attempting to get a particular task done and properly integrated reduces debugging load.

The process described above is typical in scripting languages like Python, Lisp, etc. Following these lines in languages like C isn't difficult either. Its just one task at a time. So you build the base first - an unpolished prototype of a prototype - add features to it and improve the base to integrate better with the added features, i.e. bottom up.

Thursday, 17 September 2009

Gentoo incremental updates

Gentoo linux has been releasing weekly snapshots instead of usual long term releases. This is a nice way of providing cutting edge technology. To add to that, Gentoo does not provide updates regular way. Ebuilds are stabilized by developers and whenever we want to update our system, we have to follow the subsequent steps:
* emerge -v --sync
This updates ebuilds.
* emerge -pv --deep --newuse --update world
This gives a list of changes that shall be made. In case, there is change of USE flags, this command will detect the packages that need to be reinstalled.

This unique updating method keeps Gentoo users at cutting edge of technology. However, there are some drawbacks. A dependency resolution problem occurs when a particular package has been stabilized; but some of its dependencies are not. In this case, portage complains that the dependencies are masked. This is what happened to me last night.

emerge -pv --deep --newuse --update world

These are the packages that would be merged, in order:

Calculating dependencies... done!

!!! All ebuilds that could satisfy ">=x11-libs/qscintilla-2.4[python]" have been masked.
!!! One of the following masked packages is required to complete your request:
- x11-libs/qscintilla-2.4 (masked by: ~x86 keyword)

For more information, see the MASKED PACKAGES section in the emerge
man page or refer to the Gentoo Handbook.
(dependency required by "dev-python/PyQt-3.18.1" [ebuild])
(dependency required by "media-sound/amarok-1.4.10_p20090130-r3" [installed])
(dependency required by "world" [argument])

I checked out with people at #gentoo channel on IRC. The discussion could not solve the issue. I decided to postpone the update and got back to work. After about 3 hours, I synced again. The dependency problem wasn't solved. I had not installed any masked packages and PyQt wasn't also present in package.keywords. I was just hoping the incremental releases had got into a situation I described earlier as a drawback of the Gentoo update system. So, I postponed the update till morning.

Today morning, when I synced I noticed a change in PyQt ebuild. When I ran a pretended update, I got the following list of updates.
emerge -pv --deep --newuse --update world

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild N ] app-portage/portage-utils-0.1.29 78 kB
[ebuild U ] app-shells/bash-4.0_p28 [3.2_p39] USE="net%* nls -afs -bashlogger -examples -plugins -vanilla" 6,155 kB
[ebuild U ] dev-db/sqlite-3.6.17 [3.6.16] USE="readline%* threadsafe -debug -doc -soundex -tcl" 2,912 kB
[ebuild U ] sys-devel/libtool-2.2.6a [1.5.26] USE="-test% -vanilla" 717 kB
[ebuild U ] app-emacs/emacs-common-gentoo-1.2 [1.0] USE="X -emacs22icons%" 46 kB
[ebuild NS ] app-editors/emacs-23.1 [22.3-r2] USE="X alsa gpm toolkit-scroll-bars xpm -Xaw3d -dbus -gif -gtk -gzip-el -hesiod -jpeg -kerberos -m17n-lib -motif -png -sound -source -svg -tiff -xft" 33,577 kB
[ebuild U ] virtual/emacs-23 [22] 0 kB
[ebuild U ] app-admin/eselect-python-20090824 [20090606] 5 kB
[ebuild U ] dev-python/sip-4.8.2 [4.7.9] USE="-debug -doc%" 601 kB
[ebuild U ] dev-python/setuptools-0.6-r1 [0.6_rc9] 253 kB
[ebuild U ] sys-libs/pam-1.1.0 [1.0.4] USE="cracklib nls -audit -debug% (-selinux) -test -vim-syntax" 1,564 kB
[ebuild U ] sys-auth/pambase-20090620.1-r1 [20081028] USE="cracklib sha512 -consolekit -debug -gnome-keyring -mktemp -passwdqc (-selinux) -ssh" 3 kB
[ebuild U ] sys-auth/consolekit-0.3.0-r2 [0.2.10] USE="pam -debug -doc% -policykit%" 385 kB
[ebuild U ] app-admin/sudo-1.7.2_p1 [1.7.1-r1] USE="pam -ldap -offensive (-selinux) -skey" 753 kB
[ebuild U ] dev-python/PyQt4-4.5.4-r4 [4.4.4-r5] USE="X dbus kde -assistant -debug -doc -examples -opengl -phonon -sql -svg -webkit -xmlpatterns" 6,808 kB
[ebuild U ] dev-python/PyQt-3.18.1 [3.17.6] USE="-debug -doc -examples" 801 kB

Total: 16 packages (14 upgrades, 1 new, 1 in new slot), Size of downloads: 54,653 kB

My patience finally paid off. However, it would be wrong on your part to take the impression that this is general drawback of the Gentoo release system. That is because I am using KDE 3.5.10, which does not have upstream support any more. Unless you are in such an odd situation like me, Gentoo is a nice way of getting fine-tuned cutting edge software.

P.S.: A Gentoo forums thread clarifies that this is not a singular case.

Monday, 31 August 2009

Wednesday, 12 August 2009

Rtf file size comparision

Recently, I was experimenting with rtf files. I found something really interesting. An rtf file containing 14 unformatted character created in Microsoft Word turned out to be around 30 kb in size, while an rtf file containing 54 formatted chars created in OpenOffice was only 2kb in size.

I was doubting Microsoft when I read the following line in the rtf specification v1.0:
"All styles in the document's style sheet can be included, even if not all the styles are used." However, when I actually tested them, I found their software to be producing even larger files than I expected.

Tuesday, 21 July 2009

Tweaking Mozilla

I have been using Mozilla Thunderbird for years now, witnessed many major and minor changes in the software. I started using it on my Windows XP system. Over time I have shifted to Linux. However, Thunderbird is still my preferred email client.

I save my Thunderbird folder in the Application Data folder on Windows or the .thunderbird folder on Linux as backup. When I use the folders on a fresh installation of the same OS, things are simple. However, when I use the Linux files in Windows Application Data and vice versa, I still get my configuration and folders. Therein lies the robustness and power of Thunderbird.

Thunderbird is able to restore my configuration and folders perfectly; but the configuration for plugins does not get restored in a similar manner. The reason for this is plugin management is part of the internals of the software and it is not completely platform independent. As it happened, when I tried using my Windows backup for my Linux installation of Thunderbird, I was not able to install any plugins. Actually, my package management showed that the plugin was installed but Thunderbird did not. Thunderbird showed that the only plugin I had was bdToolbar which is the plugin for BitDefender Toolbar which I had on my Windows installation. So, it was clear to me that Windows configurations of plugins were still there and were blocking fresh configuration of plugins. So, I just deleted the extensions.rdf file and restarted Thunderbird to get my fresh plugin collection.

Well extensions.rdf is kind of internal registry of Thunderbird for its plugins. It was regenerated from existing plugins when I restarted Thunderbird and things were just as I wanted.

Firefox in KDE

Recently, I was trying to save a webpage to a USB drive from Firefox. However, each time it was writing a blank document. Initially, I thought it was some problem with my system. After a few trials, I saved the file on my desktop and copied it to the USB drive. Now this worked fine. So I decided to dig deeper.

I found out that gnome-mount is needed to write to USB sticks. Mozilla products are kind of gnome addicts. I installed gnome-mount and it worked fine after that.

I have been looking for the KDE port for about a year. Initially, I was told that Nokia is developing a Qt port of Firefox. So, it would only a matter of time to port from Qt to KDE. I am not sure what happened of that; neither am I much interested in it. Now there is a KDE port of Firefox in the development tree of Firefox. I shall await a release.

Thursday, 2 July 2009

Firefox catches up

With the recent 3.5 release, it seems Firefox is catching up with other browsers. With the introduction of new and intuitive features and nice speed, Chrome was a nice alternative to whatever default browser you had before that. However, Firefox is fast again. [Well Firefox 2 was quite fast. Gradually, by 3.0 Firefox had grown sluggish and bulkier.]

This version was a pleasure to upgrade to. Starting from speed to the slight change of shades of the icon, Mozilla developers had done good work in all aspects of the browser. That is the reason of my appreciation through this blog.

There is a private browsing mode now.

This was an interesting feature.

It was a pleasure to find my Firefox skin Chromifox was supported by this version of Firefox. On top of that, it was improvements to give a more chromy feel.

At the performance front the new Javascript engine - TraceMonkey [Mozilla people seem obsessed with monkeys.] - was expected. It outperforms Chrome's V8.

Will ants take over the world?

Will ants take over the world? Whether the idea is scary or funny is upto you to decide. However, it sure is awe inspiring.

Thursday, 18 June 2009

Troubleshooting linux #1

Recently I was trying out Digit April 2009 DVDs on my openSUSE 11.1. After checking out a DVD, when I tried to eject it my taskbar froze and the plugged in devices popup remained on top of other applications.

However, KRunner was working fine so I fired up Konsole and entered super user mode with the following command.
After that I started investigating with the following commands.
df -h
ps aux
The DVD was obviously mounted. So, I tried to unmount it using the following command.
umount -v /media/Digit-April09DVD
The message told me that the device is busy. So, I checked the output of ps command keenly to locate what could be keeping the device busy. I found some kaffeine instances:
phoenix 6015 2.7 4.6 518808 47192 ? Sl 18:24 0:40 /opt/kde3/bin/kaffeine /media/Digit-April09DVD/Entertainment/Videos/ComputerGames/Computer1984_4_256kb.mp4
phoenix 6032 0.0 1.4 144980 14856 ? S 18:25 0:00 /opt/kde3/bin/kaffeine /media/Digit-April09DVD/Gaming/Game_Trailers/bioshock2/
phoenix 6033 0.0 0.0 0 0 ? Z 18:25 0:00 [kaffeine]
phoenix 6076 0.0 1.4 144980 14856 ? S 18:32 0:00 /opt/kde3/bin/kaffeine /media/Digit-April09DVD/Gaming/Game_Trailers/bioshock2/
phoenix 6077 0.0 0.0 0 0 ? Z 18:32 0:00 [kaffeine]
phoenix 6080 0.0 1.4 144980 14840 ? S 18:33 0:00 /opt/kde3/bin/kaffeine /media/Digit-April09DVD/Gaming/Game_Trailers/bioshock2/
phoenix 6081 0.0 0.0 0 0 ? Z 18:33 0:00 [kaffeine]
So, I promptly killed them and then ejected the DVD manually.

Wednesday, 17 June 2009

Challenge your limits

If you thought M. L. Khanna's book was the bulkiest you would encounter, check this out.

Wednesday, 3 June 2009


Cheney admitted he lied US into war.

Monday, 1 June 2009

looooooong lifetime OLED

DuPont has achieved a record lifetime of over 1,000,000 hours with OLED. Future displays are consuming less power and are becoming gentler on the eye.

Friday, 29 May 2009

misuse of SEO

Gradually as Google has risen, so has the popularity of SEO. However, along with them, misuse of SEO has also risen substantially. I remember a few months back I was looking for some organization and the organization's webpage was listed in Google's second page while related articles and some unnecessary pages were listed on the first page.

Obviously, you can argue that those articles were more important the page of the organization. Well since I dont have any screenshots I can't prove much. You have the choice of not trusting me in that case. However, I could not find much important materials in the webpages pointed to by the links on the first page.

Such instances of hoax results are uncommon; but their number is growing. One of the major reasons is misuse of SEO. Recently, I found another instance of SEO misuse. The tags on the article and the content are obviously unrelated.

Google depends heavily on SEO techniques. I hope it improvises on this soon.

Saturday, 23 May 2009

The changing web

We all know the web is changing and along with it our lives as well (though the extent and kind of change is determined by the our own decisions). While surfing I found this. I was impressed to see the way it responded to mouse gestures. The design is intuitive. Developments like these are welcome. They make proper use of the power of current technologies. I could see Google's philosophy playing a role. The interface was not coming in the way.

Tuesday, 19 May 2009


Ida is the nickname of a fossil (Well there are stranger things in this world; no need to wonder so much about a fossil having a nickname.) found in the US. It is considered to be an essential connection between modern higher primates - monkeys, apes and humans - and more distant relatives.

Monday, 11 May 2009

Google's spam control blocks Google alerts

irc problem

I use BSNL dataone service. Today, after connecting to the internet, I when I fired up Kopete to connect to IRC, I was not able to. I checked my connection with a ping to and found my connection to be working fine. So, I checked my Kopete settings to ensure they were alright and so they were. Kopete does not show messages from the server. So, I came back to command line and fired up irssi. I got the following messages:
Irssi: Looking up
Irssi: Connecting to [] port 6667
Irssi: Connection to established
*** Looking up your hostname...
*** Checking ident
*** Couldn't look up your hostname
*** No identd (auth) response
*** Banned: You have a host listed in the DroneBL.
For more information, visit Please contact with questions. (2009/05/11 08.32)
ERROR Closing Link: (Banned)
Irssi: Connection lost to

I visited the site indicated and found that it had been banned for running an insecure SOCKS server. Now, BSNL assigns a different IP each time you connect. So the obvious solution was disconection and reconnection thereafter.

I requested for removal of the ban because whoever caused the ban is no longer on that IP(, though he may return on it).

Sunday, 3 May 2009

Adventure of a Gentoo install

My first Gentoo install was on an x86 laptop. It worked fine. I wouldn't say it was a piece of cake as I would say for a SuSE install. However, it was pretty much close. I was trying to get the GUI installer to work but realized gradually that it was broken and I should try my hands on the command line. After few years of linux experience, I wasn't scared of the shell. The install completed fine. I successfully configured a dual boot system. I liked Gentoo's performance and ease of tweaking. So, I decided to try Gentoo on my old desktop at home.

Now that I am enjoying vacation at home, I decided to embark on the Gentoo installation adventure (I wont be calling it an adventure, were it not in retrospection.). Recently, the desktop was upgraded to an core 2 duo processor (E7200). So, I thought of giving the amd64 version a shot. I started from the command line. Everything went fine till the grub installation. I configured my bsnl broadband to work with it. I shall write about it in my next post.

The minimal install cd kernel showed the partitions as /dev/hdbx (x being the numbers differentiating partitions). So following the instructions of the handbook, I decided that hdb7, my root partition which contained /boot folder (I do not use a separate /boot partition.) translates to (hd1,6) in grub terminology. I created grub.conf with hdb7 as root and tried install grub with root on (hd1,6). However, I was surprised when an error message told me that no such device existed. I cross checked the handbook and found I was doing as it said. I decided to get some expert opinions on this. So, I switched another virtual terminal and fired up irssi. I talked to people in the #gentoo channel. They also confirmed that I was doing fine and I didn't get any reason for such behaviour. Then I was suggested to try grub-install. I thought lets give it a shot. There were more surprises to come. The device map showed the following translations.
/dev/fd0 -->> (fd0)
/dev/hdb -->> (hd0)
/dev/sda -->> (hd1)
/dev/sdb -->> (hd2)
I reported back at #gentoo and people there were surprised too. I thought I should try in #grub channel as well.

After joining the channel, I read the channel topic. They were basically focusing on grub 2. After confirming that I could about previous grub versions, I put forth my situation. They told me that the device map isn't much predictable as it depends on the BIOS. They also told me that grub is designed such that almost always the device from which the system can boot is (hd0), as happened with me: grub-install made the / partition as (hd0) as it was going to boot from it.

Now that I had understood why and how grub was translating my partitions, (unlike as described in the Gentoo handbook,) I edited my grub.conf to reflect the changes and installed grub manually. After successful install, I was happy to see the splash image and multi-boot options; but the adventure was far from over.

First, I checked if my windows partition was okay. It was relieving to find that it was perfectly alright. Then rebooted again to resume my adventure and headed straight into the next hurdle. I started my newly installed Gentoo system only to run into a kernel panic. The error message came from VFS telling me that it could not find the root partition /dev/hdb7. The first thought that came to my mind was: probably I was right in the beginning in suspecting about the success of the install when I saw hdb instead of sdb. My doubt was based on the fact that irrespective the disk drive being ATA or SATA, newer kernels use to refer to them as /dev/sdx, where x is a letter differentiating drives. The kernel panic message also told me that I should try with /dev/sdxN format. The reason I had not done it before was because I trusted the live cd kernel's behaviour. As the minimal install cd was burnt from an iso generated by the latest autobuild, I did not think that the live cd kernel would be outdated or behave like an outdated one. I checked at #gentoo and was advised to file a bug (my first bug report) after double checking.

I used the minimal install cd again and chrooted to my root partition. I editted my grub.conf and fstab to suit newer kernels' format. After a reboot, I was happy to have successfully installed Gentoo.

Wednesday, 1 April 2009

sreadahead on gentoo

Sometime back I also tried sreadahead on Gentoo. Here are the results.

I didn't find much difference. According to a bug assigned to Gentoo developer, Jeremy Olexa not much success haas yet been met in this area: the upstream developers don't seem to be making much progress either.

Friday, 27 March 2009

Multi-tasking in openSUSE

This post is testimony to my satisfaction with openSUSE 11.1. On my Compaq Presario v6409, I am freely multi-tasking wihtout bothering for system crash or hangs.

On the same system, with a Windows OS, I would not try music, Firefox with multiple tabs, Thunderbird, two open pdf files simultaneously ever; but with openSUSE I can do even more and it runs smooth. Actually, here I have got a couple of KWrite sessions, an emacs session and a chat sessions on as well. Moreover, if it were Vista, it would be crawling halfway through the trial. By the way, I also edited the blog images in Gimp with all these open.

Qtcurve updated

I updated qtcurve-gtk2 to version 0.62.5-8.1 on my opensuse 11.1 and the results were apparent in my Thunderbird buttons.

Tuesday, 24 March 2009

Fine tuning boot on openSUSE 11.1

Recently, I have been trying to fine tune my bootup process. I installed sreadahead from openSUSE build service. I also installed mkinitrd, aaa_base, bootchart, udev, and sysvinit from the devel:playground:fastboot repository. Here is the result.

The disk usage is more frequent but bootup time increased. Also I found that while shutdown the drives could not be umounted properly and my system time was configured to UTC instead of IST.

Next I installed module-init-tools, libvolumeid1, sysconfig, glib2, glib2-devel from that repo and tested. Here are the results.

The disk utilization has improved. Another observation was uniformity in CPU utilization. Earlier it used to be heavy at some periods, and nearly no CPU utilization rest of the time.

Next I have tried installing gconf2, gconf2-devel, gvfs, gvfs-backends, gvfs-fuse, kbd, libbonobo, libbonobo-devel, libgio, libgio-fam, libglib, libgmodule, libgobject, libgthread, libgvfscommon and xorg-x11-driver-video.

Sunday, 22 March 2009

Bootchart on opensuse 11.1

After my trials on my Gentoo system, I wanted to chart out the bootup of my opensuse system.

Opensuse has parallel boot by default. It is interesting to see that out of the box, without any tweaking it is one of the fastest booting systems.

Saturday, 21 March 2009

Improving on bootchart

From the the bootcharts I posted in my previous post, it is obvious that sleep times could be eliminated to bet better boot up performance. So I thought of looking at boot messages to find processes that I could do away with or at least do something about. During boot-up, the boot process was looking for ethernet connection, i.e. it was trying to bring up net.eth0. As internet wasn't always connected, it was waiting longer when started with no connection. So I created an offline runlevel and added a new entry in /boot/grub/menu.lst. The procedure is described well in the Gentoo handbook. Here is what I got: a reduction of about 30 seconds in boot-up time.

Friday, 20 March 2009

Bootchart on Gentoo

Recently I tried to chart out my system's boot-up. I got bootchart on my new Gentoo. Then I added a line to my menu.lst as described at the bootchart site and rebooted to test my boot-up. Here is what I got.

I read little more about it and found that I can turn on RC_PARALLEL_STARTUP in /etc/conf.d/rc to get slight improvement in speed. I read that in the comments of the rc file. It was also suggested that I should turn on RC_VERBOSE. So I did it. I got a five seconds increase.

Here is the output of uname -a (I have cut out unnecessary parts like system time)
Linux 2.6.27-gentoo-r8 #1 SMP i686
Intel(R) Core(TM) Duo CPU T2300 @ 1.66GHz

Here is the bootchart with a scheduled filesystem check.

Friday, 27 February 2009

Monday, 23 February 2009

Keyboard not working

Yesterday, after starting my openSUSE 11.1, I logged into my normal user account in KDE 4.1 session. I was surprised to find that my laptop keyboard was not working. I could use the touchpad but I could not get the keyboard to work. On top of it, I was also having an online exam to take.

I logged out and retried but it did not work. Then I restarted and retried yet again in vain. I thought I should check on my keyboard as well. So I logged into an Enlightenment session and I found that my keyboard was OK. I went on with my exam.

After finishing it, I logged out logged back as root into a KDE 4.1 session and found the keyboard to be working. I figures this was because settings for that user had changed for some reason. I was quite surprised because I had not done any installs. I hadn't even deleted a file.

I connected my USB keyboard (which I had got to play games though I haven't played in about a year now) to see if it works. It didn't either. I logged back into Enlightenment, and launched Konversation and joined #opensuse-kde and #suse on Freenode. I stated my problem. After discussing for some time, though I didn't find any solution, I realized that it was a very rare situation. Then I made a post at opensuse forums and went to sleep.

Today morning, I found replies on it. One was about kwin. I knew about it from last night's discussion at IRC. Issuing the command

kwin --replace

should do it for me; at least that's what I know now. However, for that to work I need to get my keyboard working. The other reply asked me to login on command line, run sax2, select my keyboard and then run kdm and start a KDE session.

I tried this one. It worked for me. I thought I should blog about it and started writing this blog. While I was halfway through all of a sudden, i was typing but no letters appeared. Thats when I realized that the keyboard wasn't working with KDE yet again. So I saved the blog and logged out of KDE. I have completed the blog in Enlightenment but my problem stays.

Tuesday, 17 February 2009

Samsung's OLED

Promising indeed.

Sunday, 8 February 2009


Here is a hoax site that shows I have malware on my system. It claims to do so via online scanning but forgets to know whether I have a linux box or a windows.

It detects my drives, shows me warnings of threats and all I do is have a hearty laugh. :-)

Nice work

Hana from Andreas Muller on Vimeo

Monday, 5 January 2009

Restoring default panel in KDE 4.1

I have switched to opensuse 11.1 with KDE 4.1 desktop. In KDE 4.1, while fiddling with the new desktop style, it is easy to lose the default panel, which provides easy access to various features and to which we are very much used to. Here is how we can get the default panel back.
The panel is present here.
Now its gone. Then I right clicked on the desktop and selected "Add panel" option. I got a message asking me whether I want the default panel or empty panel.