GPLing oldish code

Back in 2004 I did a small plugin for Miranda IM messenger which was providing auto replying facility. I uploaded it to Miranda database and since that time it had ~ 40 000 of downloads. Some people were inspired with it and based on it some other plugins: Simple Auto Replier

Recently I came across this code and decided to make it GPL and put in Google Code project. Here it is:

It was fun to look at my own code which is 8 years old.

KMail: “Signing failed: Bad passphrase” message in Debian 6 Squeeze KDE

I was recently trying to setup automatic signing of messages in KMail and I hit a problem : each time I am sending something, I got the message “Signing failed: Bad passphrase” without any opportunity to enter passphrase for my private key. It looks like this:


It seems like you have to specify proper path to pinentry-program in your configuration. Do the following:

1. Find out the exact path to pinentry-gtk-2:

$ whereis pinentry-gtk-2 
pinentry-gtk-2: /usr/bin/pinentry-gtk-2 /usr/share/man/man1/pinentry-gtk-2.1.gz

As you can see, in my case the path is /usr/bin/pinentry-gtk-2

2. Edit file ~/.gnupg/gpg.conf by uncommeting # use-agent so it becomes use-agent

3. Create file ~/.gnupg/gpg-agent.conf and put into the path to pinentry-gtk-2. Here is content of my ~/.gnupg/gpg-agent.conf:

$ more ~/.gnupg/gpg-agent.conf
pinentry-program /usr/bin/pinentry-gtk-2

Make sure that you put the proper path (the one from Step 1)

4. Reboot machine and try to send something from KMail. It should work now.

Compiling kext for Intel82566mm under Lion 10.7.2 64-bit

I was recently playing with Intel 82566MM device driver for Mac OS X based on the e1000e open source project and noticed that the driver is really targeted for 10.6 and is unable to compile easily under Lion 10.7.2.

I decided to play a little bit and compile it for Lion 10.7.2 x64 bit. Here it is: modified package which compiles under Lion 10.7.2 x64 with already pre-compiled kext file.

Things mostly changed in Makefile:

1) Added “-arch x86_64 -isysroot ${SYSROOT} -mmacosx-version-min=10.7 -Xlinker -kext”

2) Set proper SDK path and paths for gcc & g++

3) Modified some warnings in Intel82566MM.cpp which end up like errors during build in 10.7.2

Changing background color of iGoogle or Google pages?

I noticed that since the beginning Google is not allowing to change background colour of it’s pages. It is pity, as if you take for example DuckDuckGo you are able to modify the background color easialy: DuckDuckGo Settings page. Moreover, you can easily specify to use always HTTPS, which is not yet the case for Google.

I prefer usually gray colors, as the white color is too bright for my eyes. Background with C4C4C4 seems to be ideal for me, and since I am fun of customization, I guess, I will have to use DuckDuckGo for a while 🙂

Not Idle Task tool for Linux

Since I am using Debian most of my free time, I decided to re-write Not Idle Task tool for Linux. Voilà:

If you have no idea what the “Not Idle Task” tool does, please consult the following page:

This version is tested in Debian 6 x86_64 and Fedora 16 x86_64 and is supposed to work in KDE based distributions. I have some ideas about Windows and Mac OS X support, and I guess I will release versions for these operating systems soon.

This software is GPL, you can find the sources here. You can download binary for x64 version of KDE distributions here.

Have fun!

Happy New Year! (2)

New machine, up-to-date, one week old. Was running happily until BSOD occured 🙂

BugCheck E0010002, {fffffa800703a000, c, 205, 94e}

Probably caused by : nusb3xhc.sys ( nusb3xhc+14bbc )

Followup: MachineOwner

0: kd> !analyze -v
*                                                                             *
*                        Bugcheck Analysis                                    *
*                                                                             *

Unknown bugcheck code (e0010002)
Unknown bugcheck description
Arg1: fffffa800703a000
Arg2: 000000000000000c
Arg3: 0000000000000205
Arg4: 000000000000094e

Debugging Details:



BUGCHECK_STR:  0xE0010002



LAST_CONTROL_TRANSFER:  from fffff880064f1bbc to fffff80002c81c40

fffff880`035c49f8 fffff880`064f1bbc : 00000000`e0010002 fffffa80`0703a000 00000000`0000000c 00000000`00000205 : nt!KeBugCheckEx
fffff880`035c4a00 00000000`e0010002 : fffffa80`0703a000 00000000`0000000c 00000000`00000205 00000000`0000094e : nusb3xhc+0x14bbc
fffff880`035c4a08 fffffa80`0703a000 : 00000000`0000000c 00000000`00000205 00000000`0000094e 00000000`00000000 : 0xe0010002
fffff880`035c4a10 00000000`0000000c : 00000000`00000205 00000000`0000094e 00000000`00000000 00000000`00000000 : 0xfffffa80`0703a000
fffff880`035c4a18 00000000`00000205 : 00000000`0000094e 00000000`00000000 00000000`00000000 fffff880`064dec19 : 0xc
fffff880`035c4a20 00000000`0000094e : 00000000`00000000 00000000`00000000 fffff880`064dec19 fffffa80`00000205 : 0x205
fffff880`035c4a28 00000000`00000000 : 00000000`00000000 fffff880`064dec19 fffffa80`00000205 fffffa80`0703a000 : 0x94e


fffff880`064f1bbc ??              ???


SYMBOL_NAME:  nusb3xhc+14bbc

FOLLOWUP_NAME:  MachineOwner

MODULE_NAME: nusb3xhc

IMAGE_NAME:  nusb3xhc.sys


FAILURE_BUCKET_ID:  X64_0xE0010002_nusb3xhc+14bbc

BUCKET_ID:  X64_0xE0010002_nusb3xhc+14bbc

Followup: MachineOwner
0: kd> lmv m nusb*
start             end                 module name
fffff880`064dd000 fffff880`06515000   nusb3xhc T (no symbols)           
    Loaded symbol image file: nusb3xhc.sys
    Image path: \SystemRoot\system32\drivers\nusb3xhc.sys
    Image name: nusb3xhc.sys
    Timestamp:        Wed Apr 13 11:30:53 2011 (4DA56D4D)
    CheckSum:         000377C3
    ImageSize:        00038000
    Translations:     0000.04b0 0000.04e4 0409.04b0 0409.04e4

I wonder, why do I attract these things? 🙂 I was even trying to keep this machine out of my drivers to make sure my code does not cause problems ))

Configuring Hamachi autostart under Debian 6 x86_64

I guess most of you know what VPN is and how it may be useful for you. Among different VPN solutions, Hamachi seems to be the most popular and easy to use for home users. You can easially install it in Windows or Mac and create/join VPN network just in a few clicks. Under Linux, however, things are going less smoothly.

First, it is not open source 🙁 However, you can download binaries for Linux for free: (x86 version only). If by some reason you cannot download files from Hamachi ftp, you can try my blog file storage.

So, download the file hamachi- to your machine and untar it. Read readme file and perform the installation:

(do this as sudo)

$ sudo apt-get install ia32-libs
$ sudo make install
$ sudo tuncfg

(do this as regular user)

$ hamachi-init
$ hamachi start
$ hamachi login

Now you have a choice. You can either use Hamachi via command line (check README file) or you can download a GUI tool which replicates the UI of a Windows version: hamachi-gui. Download file hamachi-gui_0.9.5-0_i386-gutsy.deb or hamachi-gui_0.9.5-0_amd64-gutsy.deb depending on architecture of your distribution and install it using dpkg -i command, i.e.:

$sudo dpkg -i hamachi-gui_0.9.5-0_amd64-gutsy.deb

Now search “Hamachi” in your program list in section “Internet”. You can do most of the things you can do in Windows version: create networks, join networks, modify your computer name, etc.

However, if you reboot your computer, Hamachi would not autostart. You will have to manually start it via “hamachi start” each time which is quite uncomfortable 🙂 You can solve this problem by editing your /etc/rc.local file and starting there “tuncfg” as a root and “hamachi start” as a regular user:

/bin/su - USERNAME -c "hamachi start"
exit 0

Store this in your /etc/rc.local and make sure you set USERNAME to a name of your user, and after reboot everything will be autostarted properly.

CdRom is not detected in Debian installer

When playing with different linux distributions I am using unetbootin tool to “flash” linux iso file on a USB flash drive, so I can boot from USB flash drive and avoid burning real CD or DVD disk.

This way it is cheaper & faster. However, recently I noticed that the latest Debian isos (6.0.3) are not working properly with unetbootin: during installation the installer complains that it cannot detect CdRom. And so it fails.

However, there is a workaround. Once installer complains about absence of CdRom, it shows you a screen of options where you can select “Execute shell” option. You can pick-up this options and perform the actual mount in shell window:

 # mount -t vfat /dev/sdb /cdrom

In this particular scenario /dev/sdb is my flash drive which is “flashed” with debian-6.0.3-amd64-CD-1.iso. The device /dev/sdb may be different for you, so pay attention to this.

After you successfully mounted /dev/sdb to /cdrom hit exit and retry again the “Detect CdRom task” in installer. It should work this time. So, do everything as usual – configure disk layout, specify passwords for root and users, etc and let it go.

For me it went well and installed base system, however it failed at “configuration of packages” task. Trying to re-mount disk did not help, so I choose to install GRUB and let the installer finish the job without actually installing the rest packages.

In the end installer asks you to reboot, and when you reboot you see a fancy command line prompt and absolutely no indication of kde or gnome desktop. Well, this is fixable 🙂

At this point, once you have base system, you can just configure apt to point to regional servers and install the require packages from command line. This way it is more fun 🙂

So, the file of interest is /etc/apt/sources.list – it tells apt where to get packages from. Because your installer did not work properly, most likely the sources.list file will just contain a reference to CdRom, which is not what we want.

You can generate a default debian sources.list file for your regional servers using Follow the form and specify the following details:

1. Select your country (for me it is Ukraine)

2. Select your release (for me it is squeeze stable)

3. Debian Branches (I use only main, i.e., free packages only)

4. Debian Updates (select all items)

Click “Generate list” button and it will generate your list which looks like this for me:

################### OFFICIAL DEBIAN REPOS ###################

###### Debian Main Repos
deb squeeze main 
deb-src squeeze main 

###### Debian Update Repos
deb squeeze/updates main 
deb squeeze-proposed-updates main 
deb-src squeeze/updates main 
deb-src squeeze-proposed-updates main

Now, store this data in /etc/apt/sources.list file and perform the apt-get update in shell:

sudo apt-get update

Now you your apt knows where to get packages from and it’s time to install kde desktop:

sudo aptitude install kde-desktop

It will take a while to download packages and install them. After everything is finished, reboot machine and login to your KDE 🙂

Disabling “kexec” kernel reboot in Debian

Have you noticed that by default Debian actually does not reboot machine when you try to reboot? Instead it uses kexec to “restart” the kernel.

This is not very useful sometimes, because in some cases if you have multiple operating system installed, and you need to boot one of these, you’d prefer actual reboot really to happen so you can select target OS from grub menu. In order to make this, you need to uninstall kexec-tools package:

sudo apt-get remove kexec-tools

After uninstallation of kexec-tools your reboots will actually become reboots.

Mac OS X vs Windows kernel development

I always thought that Mac OS is something poorly documented and developing kernel modules under “Mac” will be hard & complex. Until I actually tried it. It turns out, many things under Mac are actually more simple than under Windows.

Just to give you some thoughts:

On Mac OS X:

1. If you are going to write kernel module for Mac you are free to use standrad IDE called xCode to develop & compile code.

On Windows:

1. You have to download DDK or WDK and use command line tools to develop kernel driver. You can trick Visual Studio to use ddkbuild.bat, but this is unsupported way. Good luck making IntelliSense to work. It took Microsoft quite some time to make WDK for Windows 8 to be integrated in Visual Studio.

On Mac OS X:

2. You have nice documentation to start from for newbies, samples and explanations.

On Windows:

2. You have some documentation and samples dir in WDK dir, however, this is rather “see and figure out how it works on your own” approach. It is just different.

On Mac OS X:

3. If you are confused about some piece of functionality, you are free to see how it is implemented in BSD kernel or pick-up any module from and see how it is done.

On Windows:

3. If you have some questions and you cannot find any replies, feel free to take Ida Pro and go start disassembling binaries. Takes more time, and is not a very pleasant process.

Among things which annoy me is, of course, legal restriction not to use Mac OS X in virtual machines (VmWare, VirtualBox), thus making the driver debugging only on physical machine. I used to have dozens of Windows vms with dozens of snapshots ready to be restored and debugged via WinDbg.

In general, from developers point of view, it seems like Apple has invested a lot into usability of documentation, samples and even code writing to make it nice & easy to use. Well done.

Buying Russian watches from

I have always been dreaming about owning “Vostok” watches when I was a kid. Back in those days, Soviet Union was still alive, and finding Vostok “Komandirskie” or “Amfibiya” was quite hard 🙂 Now, when everyone has swiss or japanease quartz watches, owning a pair of Russian/Soviet made mechanical watches might be not a bad idea.

So, I started to search and I finally came up with the website of a Vostok factory: situated in Russia. Contacted them via “Contact” page asking if they ship outside Russian, and voila:

Two weeks later I finally got my watches delivered at home. I am very happy with their services as they suggested multiple options to pay for the watches including paying by Visa via They sent the watches and gave me the post tracking number which allowed me to trace the package in Russia untill it reaches Moscow (takes 6 days) and then I used my country post web site to trace it till it came to my doors.

I recommend using for purchasing watches as you can buy there watches directly from factory, thus it is cheaper and more secure.

P.S. If you wish to see high resolution pictures, feel free to click on this links: image 1, image 2, image 3.

Just another blog … forum

I have noticed that some of my posts have big amount of comments (> 100), and sometimes it is hard to navigate thru them as well as to make a proper notification system when someone posts something, so I’ve decided to create a forum instead:

I guess it’s pretty raw, and I have not thought well about all possible forums to create, but you can already use it and post your questions there.

Starting from now, all questions will have to be asked in forum rather than in “comments section”. Have fun!

Using USB Hub with Asus RT-N16

I was always wondering if it is possible to use USB Hub (without external power supply) with Asus RT-N16 and the answer is yes:

My RT-N16 has one USB port occupied by printer, and in another port I have USB 2.0 Hub which has currently one port busy: flash drive which hosts partitions used for ipkg. From time to time I attach to hub an external USB drive and this also works well.

100 thousands hits and counting!

According to clustmaps my blog has collected more than 100 000 visitors since July 2008. Can’t say this is fully my reward, as Neil’s Matthews articles on RT-N16 has brought more than 40k hits here. Thank you, Neil!

Anyway, it does not take much time to realize that niche topics are completely non popular, and once you start to write something which is useful for most of the people they find a way to your blog.

Mystery of RuntimeExceptionHelperModules in WerRegisterRuntimeExceptionModule(…) function

I guess this happens to everyone: you need to write a test project to see if some features work and you’re stuck in poor documentation and google has no examples for you …

Recently I was trying to call WerRegisterRuntimeExceptionModule(…) to register my custom exception filtering module and I was stuck in registering module as specified in documentation. Documentation says:

However, it actually leaves more questions such as:

1. What is the preferred key to store the value, HKLM or HKCU?

2. What is exact format of the value, is it [Name of Dll + Path of Dll], or a subkey should be created?

3. If subkey RuntimeExceptionHelperModules should be created, what should be the names of the values? Name of dll? Or full path?

Unfortunately, documentation leaves out these details thus making people to lose their time trying to find out replies to these questions using “try & see” approach. Well, the situation does not look hopeless. In order to find answers to these questions you will need some disassembler, for example, IDA Pro.

If I fire up my file manager (Far) and make a search on all files in System32 folder by searching string “RuntimeExceptionHelperModules” I got the following:

So, I got three binaries from my search. Now you have to analyse all of them to see if they have something useful. I started from WerFault.exe and I guess I have found something interesting:

.text:0102F251 lea eax, [ebp+LibFileName] 
.text:0102F257 push eax 
.text:0102F258 mov ecx, ebx 
.text:0102F25A call ?IsHelperModuleInstalled@CRuntimePlugin@@AAEHPBG@Z ; CRuntimePlugin::IsHelperModuleInstalled(ushort const *) 

As you can see above, the function CRuntimePlugin::IsHelperModuleInstalled checks if module is properly registered. Let’s step in, and see where it looks for it:

.text:0102EC5F loc_102EC5F: ; CODE XREF: CRuntimePlugin::IsHelperModuleInstalled(ushort const *)+Aj 
.text:0102EC5F push eax 
.text:0102EC60 push eax 
.text:0102EC61 push eax 
.text:0102EC62 push 10h 
.text:0102EC64 push [ebp+arg_0] 
.text:0102EC67 push offset aSoftwareMicr_8 ; "Software\\Microsoft\\Windows\\Windows Erro"... 
.text:0102EC6C push 80000002h 
.text:0102EC71 call ds:__imp__RegGetValueW@28 ; RegGetValueW(x,x,x,x,x,x,x) 
.text:0102EC77 neg eax 
.text:0102EC79 sbb eax, eax 
.text:0102EC7B inc eax 

So, it get’s value at subkey “aSoftwareMicr_8”, let’s try to get more data about the subkey:

.text:010064F8 aSoftwareMicr_8:                        ; DATA XREF: CRuntimePlugin::IsHelperModuleInstalled(ushort const *)+3Co
.text:010064F8                 unicode 0, 
.text:010064F8                 unicode 0, ,0
.text:0100659A                 align 4

OK, we can see now that the key is Software\Microsoft\Windows\Windows Error Reporting\RuntimeExceptionHelperModules and 80000002h is HKEY_LOCAL_MACHINE. Now, when situation is more clear, you can try to register your exception module in the following key:

And make sure that WerExceptionModule.dll (this is my custom exception filter dll) is in system folder, so it will be properly found by WerFault.exe. OTOH, you can also specify path to dll instead, i.e.:

You have to keep in mind, however, that if you specify full path in registry, you should also specify it when calling WerRegisterRuntimeExceptionModule(…):

typedef HRESULT (WINAPI *p2WerRegisterRuntimeExceptionModule)(PCWSTR pwszOutOfProcessCallbackDll, PVOID pContext);

// get address of WerRegisterRuntimeExceptionModule in kernel32.dll
p2WerRegisterRuntimeExceptionModule fproc = (p2WerRegisterRuntimeExceptionModule)GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "WerRegisterRuntimeExceptionModule");

// register exception filter dll
HRESULT hr = fproc(TEXT("C:\\MyFolder\\WerExceptionModule.dll"), NULL);

// simulate crash:
char *sz = NULL;
*sz = 4;

How to enable autologin in Debian 6 Squeeze KDE

I guess you have noticed that in Debian 6 KDE the check “Enable Auto-Login” is disabled:

However you can re-run systemsettings as root and set this check on. First, make sure that you grant everyone to access X server:

volodymyr@sv1:~$ xhost +
access control disabled, clients can connect from any host

And now you can run systemsettings as root:

volodymyr@sv1:~$ sudo systemsettings

It will look now like this:

Click Apply, reboot machine and see if it works.

How to install packages from sid in Debian 6 Squeeze

Sometimes you need to install specific package from sid in Debian. There might be different reasons for this, for example, you need to install gcc-4.5 and g++-4.5 because you need to compile special software and it requires some extra gcc features.

At the current moment, gcc-4.5 is not included in stable release of Debian 6, so I guess it might be a good example to start from. First, you need to locate sid repository for the package and for that you can use Debian package search: debian qa page

Now, by entering there gcc-4.5 and pressing “Go” button you will find out page for unstable repository: Click on any of subitems of package and pickup it’s architecture, for example, amd64. Here is the page we got:

As you can see on the last page, it says that you can use the following mirror to get this package from sid:

deb sid main

Edit your file /etc/apt/sources.list and add the mirror above. Close editor and save changes and update your apt database:

sudo apt-get update

Now you can install gcc-4.5 and g++-4.5 using the following command:

sudo apt-get install gcc-4.5 g++-4.5

After everything is installed, edit again your /etc/apt/sources.list and comment-out or remove “deb sid main” and update your apt:

sudo apt-get update

You’re done.

Trying 3.0.0-rc7+ vanilla kernel in Debian 6 Squeeze 64-bit and VirtualBox issues

I’ve decided to try the vanilla kernel from, and I’ve noticed that the VirtualBox vboxdrv driver did not compile after I installed the new kernel. Here is my kernel:

volodymyr@sv1:~$ uname -a
Linux sv1 3.0.0-rc7+ #3 SMP Tue Jul 12 19:47:41 CEST 2011 x86_64 GNU/Linux

Well, I guess the easiest way to solve virtualbox problem is to try to reinstall virtualbox-ose-dkms package in this way:

sudo apt-get –reinstall install virtualbox-ose-dkms

But it fails for me:

volodymyr@sv1:/var/lib/dkms$ sudo apt-get –reinstall install virtualbox-ose-dkms
Reading package lists… Done
Building dependency tree
Reading state information… Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0 B/550 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database … 133879 files and directories currently installed.)
Preparing to replace virtualbox-ose-dkms 3.2.10-dfsg-1 (using …/virtualbox-ose-dkms_3.2.10-dfsg-1_all.deb) …
Deleting module version: 3.2.10
completely from the DKMS tree.
Unpacking replacement virtualbox-ose-dkms …
Setting up virtualbox-ose-dkms (3.2.10-dfsg-1) …
Loading new virtualbox-ose-3.2.10 DKMS files…
Building only for 3.0.0-rc7+
Building initial module for 3.0.0-rc7+
Error! Bad return status for module build on kernel: 3.0.0-rc7+ (x86_64)
Consult the make.log in the build directory
/var/lib/dkms/virtualbox-ose/3.2.10/build/ for more information.
Stopping VirtualBox kernel modules.
Starting VirtualBox kernel modulesNo suitable module for running kernel found … failed!
invoke-rc.d: initscript virtualbox-ose, action “restart” failed.

If I take a look at make.log file:

volodymyr@sv1:/var/lib/dkms$ more /var/lib/dkms/virtualbox-ose/3.2.10/build/make.log
DKMS make.log for virtualbox-ose-3.2.10 for kernel 3.0.0-rc7+ (x86_64)
Tue Jul 12 16:14:57 CEST 2011
make: Entering directory `/home/volodymyr/Kernel/linux-2.6′
LD /var/lib/dkms/virtualbox-ose/3.2.10/build/built-in.o
LD /var/lib/dkms/virtualbox-ose/3.2.10/build/vboxdrv/built-in.o
CC [M] /var/lib/dkms/virtualbox-ose/3.2.10/build/vboxdrv/linux/SUPDrv-linux.o
In file included from /var/lib/dkms/virtualbox-ose/3.2.10/build/include/VBox/types.h:30,
from /var/lib/dkms/virtualbox-ose/3.2.10/build/vboxdrv/linux/../SUPDrvInternal.h:35,
from /var/lib/dkms/virtualbox-ose/3.2.10/build/vboxdrv/linux/SUPDrv-linux.c:33:
/var/lib/dkms/virtualbox-ose/3.2.10/build/include/iprt/types.h:97:31: error: linux/autoconf.h: No such file or directory
/var/lib/dkms/virtualbox-ose/3.2.10/build/vboxdrv/linux/SUPDrv-linux.c: In function ‘VBoxDrvLinuxInit’:
/var/lib/dkms/virtualbox-ose/3.2.10/build/vboxdrv/linux/SUPDrv-linux.c:451: error: ‘nmi_watchdog’ undeclared (first use in this function)
/var/lib/dkms/virtualbox-ose/3.2.10/build/vboxdrv/linux/SUPDrv-linux.c:451: error: (Each undeclared identifier is reported only once
/var/lib/dkms/virtualbox-ose/3.2.10/build/vboxdrv/linux/SUPDrv-linux.c:451: error: for each function it appears in.)
/var/lib/dkms/virtualbox-ose/3.2.10/build/vboxdrv/linux/SUPDrv-linux.c:451: error: ‘NMI_IO_APIC’ undeclared (first use in this function)
/var/lib/dkms/virtualbox-ose/3.2.10/build/vboxdrv/linux/SUPDrv-linux.c:465: error: ‘nmi_active’ undeclared (first use in this function)
make[2]: *** [/var/lib/dkms/virtualbox-ose/3.2.10/build/vboxdrv/linux/SUPDrv-linux.o] Error 1
make[1]: *** [/var/lib/dkms/virtualbox-ose/3.2.10/build/vboxdrv] Error 2
make: *** [_module_/var/lib/dkms/virtualbox-ose/3.2.10/build] Error 2
make: Leaving directory `/home/volodymyr/Kernel/linux-2.6′

There are basically two problems here. First, it tries to include linux/autoconf.h which changed location since 2.6.33 kernel. Second, by some reason it uses location of my home path for kernel sources, i.e.: /home/volodymyr/Kernel/linux-2.6

It seems like my /usr/src/linux points to my home build directory:

volodymyr@sv1:/var/lib/dkms$ ls -la /usr/src/linux
lrwxrwxrwx 1 root root 32 Jul 12 15:04 /usr/src/linux -> /home/volodymyr/Kernel/linux-2.6

Now, I can make symbolic link to avoid problem with autoconf:

ln -s /home/volodymyr/Kernel/linux-2.6/include/generated/autoconf.h /home/volodymyr/Kernel/linux-2.6/include/linux/autoconf.h

And .. it still does not work. It seems like the only way is to install VirtualBox from sid. OK, let’s remove virtualbox-ose from system and add

deb sid main

To your your /etc/apt/sources.list file and do “sudo apt-get update”.

Install again virtualbox-ose (this time it is taking the sid version):

Processing triggers for python-central …
Setting up virtualbox-ose (4.0.10-dfsg-1) …
Setting up virtualbox-qt (4.0.10-dfsg-1) …
Setting up virtualbox-dkms (4.0.10-dfsg-1) …
Loading new virtualbox-4.0.10 DKMS files…
First Installation: checking all kernels…
Building only for 3.0.0-rc7+
Building initial module for 3.0.0-rc7+
Running module version sanity check.
– Original module
– No original module exists within this kernel
– Installation
– Installing to /lib/modules/3.0.0-rc7+/updates/dkms/
Running module version sanity check.
– Original module
– No original module exists within this kernel
– Installation
– Installing to /lib/modules/3.0.0-rc7+/updates/dkms/
Running module version sanity check.
– Original module
– No original module exists within this kernel
– Installation
– Installing to /lib/modules/3.0.0-rc7+/updates/dkms/
DKMS: install Completed.
Stopping VirtualBox kernel modules.
Starting VirtualBox kernel modules.
Setting up virtualbox-ose-dkms (4.0.10-dfsg-1) …
Processing triggers for menu …

And see that everything works okay this time.