LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
Search this Thread
Old 01-08-2011, 09:55 AM   #1
mrshanim
Member
 
Registered: Aug 2009
Posts: 30

Rep: Reputation: 16
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
 
Old 01-09-2011, 05:51 AM   #2
RockDoctor
Senior Member
 
Registered: Nov 2003
Location: Minnesota, US
Distribution: Fedora, Ubuntu
Posts: 1,210

Rep: Reputation: 238Reputation: 238Reputation: 238
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)
 
Old 01-09-2011, 08:03 AM   #3
mrshanim
Member
 
Registered: Aug 2009
Posts: 30

Original Poster
Rep: Reputation: 16
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.
 
Old 01-09-2011, 06:09 PM   #4
RockDoctor
Senior Member
 
Registered: Nov 2003
Location: Minnesota, US
Distribution: Fedora, Ubuntu
Posts: 1,210

Rep: Reputation: 238Reputation: 238Reputation: 238
Quote:
Originally Posted by mrshanim View Post
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.
 
Old 01-09-2011, 06:58 PM   #5
mrshanim
Member
 
Registered: Aug 2009
Posts: 30

Original Poster
Rep: Reputation: 16
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
 
Old 01-10-2011, 06:33 AM   #6
RockDoctor
Senior Member
 
Registered: Nov 2003
Location: Minnesota, US
Distribution: Fedora, Ubuntu
Posts: 1,210

Rep: Reputation: 238Reputation: 238Reputation: 238
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
 
  


Reply

Tags
kernelerror, kernelmodule


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
schedule or signal a work (fucntion) from within the kernel code fardad Linux - Kernel 1 03-16-2009 05:55 AM
Lucent WinModem to work on Debian 2.6.9 kernel Iso187 Linux - Hardware 0 05-19-2006 12:18 PM
[Debian 3.1] How do I get the TV out to work with ubuntu? t3gah Linux - Hardware 2 06-12-2005 06:41 PM
[Assembly] how do i work Y86 code at debian sarge? Mathsniper Programming 3 04-08-2005 04:02 PM
My USB keyboard and mouse no work in kernel 2.6+ (Debian) 0x86 Linux - Software 5 08-01-2004 12:22 PM


All times are GMT -5. The time now is 09:29 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration