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.

How to make yourself Server Admin (again) on Teamspeak 3

When installing a Teamspeak server for the first time we obtain a token key (also called a priveledge key) which we can use to gain the initial admin rights. However, when you loose the admin permissions for some reason, the option to use a priveledge key on the Teamspeak client is disabled (note that the first token key can only be used once, so you would need to generate a new one).

The great thing about the Teamspeak server is that it offers us a special interface to which we can connect by using telnet (called the ServerQuery interface). By default this is port 10011 (TCP), which is also called the serverquery port. We can use for example puttytel or the windows telnet client.


Connecting and logging in

We connect by using

puttytel <ip or hostname> <port>

and login by using

login serveradmin <your serveradmin password here>

If your login is correct then you will get the following output:

error id=0 msg=ok

You now need to specify which virtual server to use (use the command serverlist if you have more than one server):

use 1


Obtaining the admin group ID

By default the Admin group ID is set to 6, but this can of course be changed. So to make sure you have the right ID we will look at the list of all groups:


This outputs all the available groups on the chosen virtual server. You can check for sgid=6 and verify that the name is “Server Admin”.

Adding ourselves to the admin group

Before we add ourselves to the admin group we should connect to the server with our Teamspeak client (Important: and stay connected!). Get your Unique ID (in Windows: Settings > Identities ) and use this as follows to obtain the client database ID:

clientdbfind pattern=<your UID> -uid

If your nickname on the server is unique (at least when connected to the server) then you can also search for the client db ID by using a name:

clientdbfind pattern=<your current nickname>

The output should then be something like this:

error id=0 msg=ok


Adding ourselves to the admin group

We can now finally add ourselves to the admin group:

servergroupaddclient sgid=6 cldbid=12

Becoming Serverquery admin by using privelegekeys

privilegekeyadd tokentype=0 tokenid1=6 tokenid2=0

which will give you the privilegekey which you can copy and paste in TS by using Permissions > Use Privilege Key

Final notes

There are more ways to achieve this. One of them is to simply ask another existing admin to add you to the server group manually, or in the worst case installing everything from scratch.

See also the TS3 Server Query manual for more detailed information.

Eclipse: can’t find genfeature for feature in class

When generating a GMF mapping, if you get the following error

can’t find genfeature for feature in class XXX

then most probably your genmodel is out of sync with your ecore metamodel.

To resolve this issue, you can simply right click on your .genmodel file, select “Reload ..” and then select your ecore file with which you want to sync. This should hopefully resolve the issue.

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. 🙂