Install failing with "invalid module format".



I'm new to Pi and Linux (well, I did give Linux a prolonged go about 10 years ago... but gave up- neither of us was mature enough!).

I have my Ledborg, but am struggling, having followed the instructions.

My Pi is a 512MB Model B Rev 2, with a fresh & updated Raspian install.

I followed the instructions, but repeatedly get "invalid module format".

uname -r gives a result of 3.6.11+, which is a later kernel than any other versions mentioned?

I tried following the text to 'build from source' but ran into problems (& not least my lack of knowledge).

Any suggestions please? I have tried multiple times, and with fresh Raspian installs- I even tried the Rev 1 download at one point, but always get "invalid module format".

Are there any detailed instructions to download and build the driver source code?


Timothy Freeburn's picture

Hi Andy,
You might want to log in and change your username as using your email address in forums might get you some additional spam.
We'll have a look now and see if we can build the latest version and if we can get source and pointers etc., we'll throw it on the web.

piborg's picture

Hi Andy,

Sorry about the delay, hopefully this will explain things better.

The "Invalid module format" error is Linux jargon for your driver was not built for the specific kernel version you are running, the system is basically preventing the driver from being loaded since it cannot be sure it is compatible, and an incompatible driver can cause problems.

The best solution is to build the driver for the correct kernel version (the checks can be ignored but it may cause problems).

The first thing you will need to build is to have the kernel headers to build the driver with.
The following lines will download and run a script which attempts to download the latest kernel source (hopefully the same version as your copy).

cd ~
wget -O
chmod +x
sudo ./

You can view the script here.

Assuming that was successful then you will need to download the source for LedBorg.

mkdir ~/ledborg-source
cd ~/ledborg-source
wget -O

Finally we need to build the driver code and install the files (we will use the pre-build GUI).

cd ~/ledborg-source/driver
cd ..
cp gui/ledborg_gui ./
chmod +x

If you really do not want to build the driver yourself I have uploaded the version I just built to test the above instructions, it can be installed using

mkdir ~/ledborg-setup
cd ~/ledborg-setup
wget -O
chmod +x

For reference my system returns the following for uname -a.
Linux raspberrypi 3.6.11+ #371 PREEMPT Thu Feb 7 16:31:35 GMT 2013 armv61 GNU/Linux

Thank You very much- built from source from your instructions and.. green ledborg! :-)

Please don't apologise for a 'delay'! I only asked this morning!!!

Hi all,
i hane a 512mb revB board, same problem outthebox, tried same solution before in this post without success.

Plase can someone help me? Maybe i need to "clean" some configuration because i make several test but i don't know how.

Installing LedBorg, please wait...
Error: Module ledborg is not currently loaded
update-rc.d: using dependency based boot sequencing
Error: could not insert module /home/pi/ledborg.ko: Invalid module format
LedBorg installed, LedBorg should now be green
(led is always off, never see it up)

Edit: Log of build attached

piborg's picture

The instructions from before should be good for standard Raspbian, your uname line states raspberrypi 3.6.11-rpi-aufs, the latest Raspbian “wheezy” image on is raspberrypi 3.6.11+.

I presume you are either running a different distribution, or you have a custom kernel installed.

i can't check for some days, sorry. I think (not sure) to have installed Debian Wheezy Raspbian.
I'm sure have installed it with BerryBoot. Maybe this is the problem ?
Sorry can't check better because not in office now (and in office have not a tv or hdmi display) so excuse me, but i'm sure for berryboot; i don't know if berryboot manage custom kernel.

piborg's picture

No worries, we will help solve your problem whenever is convenient.
Have not seen or used BerryBoot, will download and try it, maybe that will help explain the problem

tomorrow i'll be in office, i'll check and report exact operating system but i'm pretty sure of Barryboot.


I confirm installed is Barryboot, inside Wheezy Raspbian 2012.12 fully updated. Maybe barryboot this is problem. I need remove it?

OK, made a new install with raspbian without berryboot; update all and installed ledborg sw.
WORK LIKE A CHARM ! so problem is something related with berryboot.
Not a problem for me but hope my experiance maybe useful for any one.

piborg's picture

Glad to hear it is all sorted now, from looking at it briefly it does indeed seem like BerryBoot uses a custom kernel, different to the normal Raspbian.

Thanks for that. My LedBorg works just like it did before I did a dist-upgrade.


It is always a let down when you get a invalid module format notice. That is something that would upset me if I was to get. I am just glad that there are ways around them and can really help you out.
Jak Manson

Subscribe to Comments for "Install failing with "invalid module format"."