LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (http://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   debian kernel code will work on ubuntu or not???? (http://www.linuxquestions.org/questions/linux-kernel-70/debian-kernel-code-will-work-on-ubuntu-or-not-855008/)

mrshanim 01-08-2011 09:55 AM

debian kernel code will work on ubuntu or not????
 
I tried kernel module ( with system call interception) on debian 2.6.26-(etch) which was working perfectly.
But when I tried same code on ubuntu 10.10 2.6.35 kernel it was giving me some troubles.
As kernel module is compiling fine on ubuntu but when I insert kernel module, it immediately killed by the OS. I tried strace and it was killed by SIGKILL.
I can.t even remove kernel module which I inserted I had to restart all the time.
This happens only when I try to intercept system call(even though sys_call_table pointer address is correct). Rest kernel module works fine.

So my questions is Ubuntu has a issues with compared to debian or
my kernel version (debian 2.6.26 Vs ubuntu 2.6.35) causing me a issues.

Thanks for reading.
mrshanim

RockDoctor 01-09-2011 05:51 AM

I don't really recommend it, but you could try manually installing the Debian kernel, complete with your module, in Ubuntu, and configure Ubuntu's grub to boot it. By manually installing, I mean copying all the files the Debian kernel deb file places in /boot and /lib/modules. You may need to regenerate the initrd file once your installation is in place. I had to do something like this back when the Acer Aspire One first appeared in order to enable detection of SD cards inserted after boot. It worked fine with the Linpus kernel, but would not work with the Ubuntu kernel. Obviously, YMMV (and I hope a better solution emerges)

mrshanim 01-09-2011 08:03 AM

Quote:

By manually installing, I mean copying all the files the Debian kernel deb file places in /boot and /lib/modules
You mean I should install debian separately as its standalone and copy its *.deb, and install in Ubuntu kernel
Is that work?

Actually I can achieve this by debian OS, but I would like to prefer Ubuntu for other friendly user interface.
Also kernel module is always in developement phase(like a project where K_module code very frequently need to change)

So I which is the best option? moved to debian?

@RockDoctor: Thanks for your reply n suggestion.

RockDoctor 01-09-2011 06:09 PM

Quote:

Originally Posted by mrshanim (Post 4218245)
You mean I should install debian separately as its standalone and copy its *.deb, and install in Ubuntu kernel
Is that work?

Actually I can achieve this by debian OS, but I would like to prefer Ubuntu for other friendly user interface.
Also kernel module is always in developement phase(like a project where K_module code very frequently need to change)

So I which is the best option? moved to debian?

@RockDoctor: Thanks for your reply n suggestion.

I guess I was unclear. I thought you had a Debian installation from which you could copy the files. My bad.

Given that you apparently do not have a Debian installation from which to copy the files, you might consider downloading the Debian kernel deb file and installing it under Ubuntu.

mrshanim 01-09-2011 06:58 PM

I have debian Installed on desktop (where my K_module code is working smoothly), But on my laptop(only Ubuntu ) is causing problems.
Though I have kernel_image*.deb and kernel_headers*.deb files from my desktop debian(2.6.26)
Can I install on laptop (Ubuntu 10.10) with above *.deb files? If yes how?

MY nuisance (Just copy *.deb on ubuntu at /usr/src/ and run dpkg -i *.deb) is really going to work ?? If not could you tell me how to do that? ( sorry I just started learning
linux kernel)

Thanks

RockDoctor 01-10-2011 06:33 AM

That is exactly how I would do it. If it doesn't work, you can just reboot using the Ubuntu kernel and uninstall the Debian kernel


All times are GMT -5. The time now is 01:56 AM.