Unbootable GRUB after updates

This was a very messy situation. I  was not able to boot a Debian based server after some updates. When booting, I got the following errors:

error: file not found

followed by

grub rescue

However, since I manage the server on distance it was not possible for me to use the grub rescue command prompt, and so the suggested solution at this link was not possible to apply.

Getting access to the partition

Luckily I could boot the system from a rescue system, but if you have physical access to your server you can also use a Live CD. When booted, first mount the relevant partition. I was running a RAID 1 with two hard drives, so I mounted everything as follows:

cd /mnt
mkdir rescue
mount /dev/md2 /mnt/rescue
mount /dev/md1 /mnt/rescue/boot
mount –bind /dev /mnt/rescue/dev/
mount –bind /proc /mnt/rescue/proc/
mount –bind /sys /mnt/rescue/sys/

You can then chroot:

chroot /mnt/rescue /bin/bash

Reinstalling GRUB

The fix was to reinstall GRUB. But first update the config files:


Reinstalling GRUB:

grub-install /dev/sda

and one last recheck to make sure everything is ok:

grub-install –recheck /dev/sda

Last steps

Exit from the shell, unmount and reboot:

umount /mnt/rescue/dev
umount /mnt/rescue/sys
umount /mnt/rescue/proc
umount /mnt/rescue/boot
umount /mnt/rescue

Slow ProFTPD response times

I wanted to remove the psa-proftpd package (Plesk version) and instead install proftpd-basic. However, after setting everything up connecting to the server was way to slow! It took about 10 seconds for the server to accept the login credentials.

After some digging around I found a quick fix by commenting out the logging options log_on_success and log_on_failure. In my case I needed to change the /etc/xinetd.d/proftpd file and replace

service ftp {
flags = REUSE
disable = no
protocol = tcp
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.proftpd
log_type = SYSLOG daemon info
log_on_success += DURATION USERID
log_on_failure += USERID
nice = 10


service ftp {
flags = REUSE
disable = no
protocol = tcp
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.proftpd
log_type = SYSLOG daemon info
nice = 10

ProFTPD cannot start (xinetd)

If xinetd has problems firing up ProFTPD you can try changing in file /etc/init.d/proftpd around line 150 the following part:

 if [ “x$RUN” = “xyes” ] ; then


 if [ “x$RUN” = “xYES” ] ; then



I’m not sure why exactly this happens but it is usually the case when things get messed up. You probably also get the following error message if ProFTPD runs in standalone mode:

ProFTPd warning: cannot start neither in standalone nor in inetd/xinetd mode. Check your configuration.

RSSOwl problem: “Uncaught Exception. db40 engine closed”

My RSSOwl somehow got corrupted and I was not able to get it back to work, even after a reinstall of the software. The errors are:

“An internal error occurred during: “”. Uncaught Exception. db40 engine closed

“java.lang.ClassCastException” – “An error has occurred. See error log for more details. com.db4o.config.Entry cannot be cast to org.rssowl.core.persist.IFolderChild”

rssowl multiple problems rssowl problem



So I started digging for a solution. I found out that the problem (in my case at least) was in the RSSOwl database file rssowl.db, which somehow got corrupted. RSSOwl is smart enough to create regular backups, which are to be found in files rssowl.db.backuprssowl.db.onlinebak and rssowl.db.onlinebak.weekly. These files are located at:

C:\Users\<your username>\.rssowl2\.metadata\.plugins\org.rssowl.core

I would suggest before doing anything else to create a backup of your entire .metadata folder (in case something goes wrong). Also make sure that RSSOwl is not running at this moment. So to solve the issue you can simply delete (or rename) the rssowl.db file and copy, for example, rssowl.db.onlinebak in its place. Fire up RSSOwl, and everything should be working as expected. 🙂

In case you for some reason do not have these extra backups, and/or you don’t care but just want to get RSSOwl to work, then simply delete the .metadata folder. RSSOwl will recreate all the necessary files and everything should be fine anyway. Note that in case you want only to save your subscriptions, the data is located in either of the following files:

C:\Users\<your username>\.rssowl2\backup.opml

C:\Users\<your username>\.rssowl2\backup_weekly.opml

You can backup these, delete the entire .metadata (or even the .rssowl2) folder, and then import the subscriptions from the .opml file in RSSOwl.


Bosanska tastatura u Word-u i Outlook-u


Prije tri godine sam objavio članak “Bosanska QWERTY tastatura“, tj. virtualna QWERTY tastatura uz pomoć koje se mogu ubacivati i naši afrikati. Međutim, u drugom dijelu članka sam već naveo da je potrebno za određene programe posebno naštelovati kombinacije tipki pošto programi imaju svoje definicije. Znači program neki može imati u sebi definisano CTRL+ALT+Z nešto kao ići korak unazad, dok mi želimo da ubacimo slovo “ž”.

U sljedećem ću opisati kako ovo učiniti u Word-u i Outlook-u, verzija 2010 (isto kao i za 2007), oboje programi koji su dio paketa Office. U wordu će ispasti ovo relativno jednostavno izvesti, ma da trebaš znati gdje da gledaš. Outlook izgleda uopšte nema ove opcije, ali ću ipak prezentirati jedno rješenje.

Napomena: ovo je opis za Word i Outlook verzija 2010! Također obratite pažnju da koristim Englesku verziju. Ali bez obzira na to, princip ostaje isti.

Word 2010

U Word-u se mijenjanje ovih kombinacija može naći putem File >Options.




Zatim kod Customize Ribbon pritisnuti na Customize…



U novom prozoru će se prikazati sve definirane komande u Word-u. Tu je potrebno sljedeće komande podesiti i kombinacije tipki izbrisati (ili definisati nove) koji se preklapaju sa našim slovima:

  • View Tab > DocSplit (Alt+Ctrl+S)
  • Home Tab > FormattingPane (Alt+Ctrl+Shift+S)
  • References Tab > InsertEndnoteNow (Alt+Ctrl+D)
  • Commands Not in the Ribbon > GoBack (Alt+Ctrl+Z)
  • Common Symbols > Copyright (Alt+Ctrl+C)

1 2 3 4 5

Outlook 2010

Za Outlook je malo drugačija situacija. Naime, tu nepostoji opcija za podešavanje akcija kao što je to moguće u Word-u (barem, ja nisam mogao naći, tj. nije na istom mjestu kao u Word-u). Ovo sam uspio riješiti na sljedeći način.

Komande i kombinacije tipki za izvršavanje istih se čuva u takozvanim šablonima (engl. Template). One se nalaze na Windows 7 na sljedećoj lokaciji:

C:\Users\<vaše korisničko ime>\AppData\Roaming\Microsoft\Templates

Datoteke o kojima se za Word radi je Normal.dotm. Za Outlook je ovo NormalEmail.dotm. Kada se ove tipke podese u Wordu, moguće je jednostavno kopirati datoteku Normal.dotm (za Word) preko NormalEmail.dotm. Sa tim je se kod mene riješio problem. Napomena: pametno je kopirati prvo obe datoteke prije prepisivanja ako se šta pobrka.

How to put a redirect on a xat chat page

Some background
xat is a social networking site where you can, among others, create your own chat. You can approach your chat by following a direct url in the form

http://xat.com/<your chat page name>

On this page you can customize your layout by adapting the HTML source that is given to you. However, when you try to add certain stuff like javascript, xat will filter your input and replace certain keywords. For example, if you use the word “script” anywhere in your code it will simply be replaced by “nope”. This filtering serves as a protection measure to prevent users from putting malicious code on their chat pages.

In my case, the owner wanted to redirect the chat page to a new website that he recently migrated to.

How to redirect your xat chat page to your website
One way of putting a redirect on an HTML page is by using the usual meta refresh method. However, I found out that the filter currently replaces http-equiv=”refresh” to http-equiv=”fresh”, which obviously breaks the redirect parameter value. However, the filter just replaces “re” with an empty string, which can be trivially bypassed. You just have to use http-equiv=”rerefresh”, which finally replaces it to http-equiv=”refresh”.

So the final result becomes

<meta http-equiv="rerefresh" content="0; url=http://google.com">

where of course http://google.com should represent your website where you want to redirect to. Note also that you have to put this between the head tags. The entire HTML code would then look something like this:

<meta http-equiv="rerefresh" content="0; url=http://website.com/redirect/xat_redirect.php">

Final notes
These replacements are in general a bad way of securing a website and should be avoided. As shown above, the current filter the xat developers are applying is useless and is trivially bypassed. I found also other and more advanced ways to accomplish this, but this should in essence do the trick (works on Internet Explorer, Firefox and Chrome). Note that in the future, the xat developers might decide to change the filter by which this small trick will not work anymore. You should also check the xat rules before applying any of this.

Cannot start encoder in SAM Broadcaster

Wanted to stream some stuff and suddenly got this error:

Unhandled exception (Choose formaat A suitable driver is not available to provide vaild format selections.)

I was running an older version of SAM (version 2) and it seemed that a 64-bit thing was causing the error. So note that this only works on 64-bit systems. To solve this problem, I did the following:

1. Download LAME ACM codec here.

2. Extract the the files to some directory like C:\lame

3. Run the command prompt as an administrator (by right clicking on command prompt).

4. Navigate to C:\Windows\SysWOW64 by typing in:

cd %windir%\SysWOW64

5. Now register the codec by typing in:

rundll32 setupapi.dll,InstallHinfSection DefaultInstall 0 C:\lame\LameACM.inf

6. Done.

Note that if you get the same error, there might be some other problem causing it and in that case this solution might now work.

Cannot remove old version of Java on Windows


Java can be a pain. Even installing or removing it can sometimes be a problem. There are many common problems you might run into. Below is by no means an extensive list:

Older version of java .. cannot be removed. Contact your technical support group.

Error 1720. There is a problem with this windows installer package. A DLL reguired for this install to complete could not be run. Contact your support personnel or package vendor

Another case is that when trying to install/remove a package, the setup gives the information that it cannot find a necessary .msi file, usually as the following path:

C:\Users\<username>\AppData\LocalLow\Sun\Java\..\.. .msi

This of course does not help a bit because you are unable to get that file or you get even more errors.


This was a real nightmare for me, but I managed to resolve the issue with a Microsoft Fix-It thing. Just download this file:


which is located at this site. Now uninstall all (or the necessary) Java stuff, and retry your install. It should now work like a charm. 🙂

Keyboard and mouse not working in Windows


So my keyboard and mouse suddenly stopped working, and I really didn’t know why. What followed was many frustrating hours spent to try and “safe” my machine from a new fresh Windows 7 install, because it would take just too much time to do a fresh install of everything that I currently have on the laptop.

However, the keyboard did work while I was trying to access the BIOS, but as soon as Windows started loading the keyboard and touchpad stopped working. The system booted to the Windows logon screen and I wasn’t able to do anything. Or at least, then I decided to confront the problem. 🙂

Note: First create a backup of your registry or create a System Restore point before you proceed!

The symptoms

Further symptoms manifested themselves by showing that there were some driver problems in the Device Manager. The following devices seemed to have problems:

  • HID Keyboard Device
  • Standard PS/2 Keyboard
  • PS/2 Compatible Mouse

The error codes varied and so it is really dependent of your system configuration, but is should be at least one of the following:

  • This device cannot start. (Code 10)
  • This device is not working properly because Windows cannot load the drivers required for this device. (Code 31)
  • Windows cannot load the device driver for this hardware. The driver may be corrupted or missing. (Code 39)
  • Windows cannot access this hardware because its service key information in the registry is missing or recorded incorrectly. (Code 40)

Fix it automatically in Windows Vista/7

You can fix the problem automatically by downloading and running the following registry file:


Now just restart Windows and the problem should be solved.

If the problem is still present and/or you want to fix it manually, then follow the instructions in the section Fix it manually.

Fix it manually

You should access the registry by clicking on Run and then typing


Now find the following key:


You should now see a key UpperFilters which should contain at least one entry “kbdclass”. If you have the same problem as I do, then you there are more entries there which you should delete. So now after editing, your UpperFilters key should only contain “kbdclass” (without quotes). Restart Windows, and the problem should be fixed. 🙂

If you only have the entry “kbdclass” as value and/or are still experiencing the same problem, then you should search for the word “kbdclass” (without quotes) and replace every UpperFilters key with kbdclass and other values to only kbdclass.


Below you’ll find further information and alternative scenarios on how to fix certain sub-problems.

Problems with logging into Windows

To fix the problem you should be able to access the Registry in some way and change the registry keys. I managed to get into windows by using a separate USB-mouse and accessing the On-Screen Keyboard by which I could login and do the necessary registry changes. You can do this by

  1. Clicking on the Ease of Access button at the bottom-left corner of the login screen
  2. Checking the “Type without the keyboard” and clicking OK
  3. Clicking on: Ctrl+AltGr+Del
  4. Logging in

Fixing other similar problems

The problem in my situation was that there was also a keyboard driver installed from VMware. The VMware Keyboard Driver had an additional entry “vmkbd” in the UpperFilters key, but as I discovered the driver file that was needed (C:\Windows\system32\drivers\VMkbd.sys) was missing which in effect caused all the problems.

The folder with GUID


represents the class Keyboard that is defined by the Windows operating system. It is used to install devices or other drivers. If you have another but similar problem, then you could try to analyze the filters under the GUIDs as listed below (see [3] for a complete list).

Class GUID Device Description
CDROM 4D36E965-E325-11CE-BFC1-08002BE10318 CD/DVD/Blu-ray drives
DiskDrive 4D36E967-E325-11CE-BFC1-08002BE10318 Hard drives
Display 4D36E968-E325-11CE-BFC1-08002BE10318 Video adapters
FDC 4D36E969-E325-11CE-BFC1-08002BE10318 Floppy controllers
FloppyDisk 4D36E980-E325-11CE-BFC1-08002BE10318 Floppy drives
HDC 4D36E96A-E325-11CE-BFC1-08002BE10318 Hard drive controllers
HIDClass 745A17A0-74D3-11D0-B6FE-00A0C90F57DA Some USB devices
1394 6BDD1FC1-810F-11D0-BEC7-08002BE2092F IEEE 1394 host controller
Image 6BDD1FC6-810F-11D0-BEC7-08002BE2092F Cameras and scanners
Keyboard 4D36E96B-E325-11CE-BFC1-08002BE10318 Keyboards
Modem 4D36E96D-E325-11CE-BFC1-08002BE10318 Modems
Mouse 4D36E96F-E325-11CE-BFC1-08002BE10318 Mice and pointing devices
Media 4D36E96C-E325-11CE-BFC1-08002BE10318 Audio and video devices
Net 4D36E972-E325-11CE-BFC1-08002BE10318 Network adapters
Ports 4D36E978-E325-11CE-BFC1-08002BE10318 Serial and parallel ports
SCSIAdapter 4D36E97B-E325-11CE-BFC1-08002BE10318 SCSI and RAID controllers
System 4D36E97D-E325-11CE-BFC1-08002BE10318 System buses, bridges, etc.
USB 36FC9E60-C465-11CF-8056-444553540000 USB host controllers and hubs

The next step is to adjust the UpperFilters like the problem where the CD or DVD drive is missing or not recognized by other programs [1][2].


“Python Version 2.7 required which was not found in the registry”

Any module installer that is created using distutils (bdist_wininst) is very likely to produce this error. The problem is that it only detects 32bit installations of Python on 64bit Windows machines. Or more technically, 32bit versions of Python create the following registry path


while 64bits versions create a slightly other registry path which is


When any 32-bit module setup is started (with a Python 64-bit on your system), it first checks whether the first path exists, while instead it should check the second (which does exist).

There are basically three ways of solving this:

  • You can install a 32-bit Python version
  • or install a 64-bit version of your module
  • or adjust the registry such that it really sees that a 64bit Python is installed

I will of course elaborate on the last two options.

Install a 64-bit version of your module

You can find many module binaries here. Choose a 64-bit version and install it. This is the most clean way of fixing the problem.

If your module is not in the list, then try the alternative below.

Fix by adjusting the registry

So the dirty way is to do the following adjustments in the registry:

  1. Run regedit.
  2. Locate the path: HKEY_CURRENT_USER\Software\Wow6432Node\
  3. Create keys in this path: Python\PythonCore\2.7\InstallPath
  4. Modify the “(Default)“, which is initially empty, to the path where Python is located, for example “C:\Python27\”.
  5. You are done. Exit and retry the setup that gave the error.

You can alternatively create a .reg file (for example fix.reg) that will do the above steps automatically. Put exactly the following in it:

Windows Registry Editor Version 5.00

If you are lazy, then you can also download this file, unpack the registry file and just run it.