kdb debugging in Ubuntu 11.04 - linux

in kernel module programming how we can debug using Kdb? I tried with ubuntu 11.04 but I am not getting correct kdb patch for 2.6.38 kernel version so can any one suggest how to proceed
with kdb debugging under this kernel version?

KDB must be turned on in your kernel. I suspect it is compiled off on Ubuntu default release.
Here the details. I expecting you know how to rebuild kernel.

Related

Compiling 2.4.20 kernel in (CentOS 6.5) 2.6.32 kernel

My target system running on top of 2.4.20 Linux kernel. Till now my host environment also has been running on the same kernel. Now i am planning to change my Host Environment to Cent OS 6.5 which is running on 2.6.32 kernel. What is the best way to successfully compile kernel 2.4.20 on it? How to customize my host environment to compile my old kernel?
It's very hard to compile 2.4.20 on CentOS 6.5.
The 2.4.20 kernel need gcc-2.95.3 and binutils-2.9.1.0.25 which are very obsolete. Besides, gcc-2.95.3 may need an older version of glibc which is impossible to be installed on CentOS 6.5. If you really need to compile kernel-2.4.20, you can download RedHat 7.3 (released in 2001) and use this system to compile the old kernel.

Can I use old kernel module on newer kernel version

I'm trying to replace centos 6.6 system with centos 7.2, but my kernel module for centos 6.6(kernel 2.6.32) dose not work on centos 7.2(kernel 3.10.0).
There is no source code and I am just a server engineer, not a programmer.
Could you please help me... is there any good solution?
For example, kernel module converter 2.6.32 => 3.10.0, or some hacks to force loading old kernel module...
You can, depending on the kernels.
You can also force load it. But if you force load it your system might crash, depending on how you do it.
I tried that with mint 17 and mint 18.

How is open-iscsi compiled with 3.x kernels?

open-iscsi seems to require 2.6.x kernels and doesn't even compile with the newer (3.x) kernels, specifically 3.8.0 kernel.
Is it supposed to work with newer kernels?
Please see this:
https://groups.google.com/forum/#!topic/open-iscsi/_f4e13cIyNg
The kernel code in the open-iscsi dir only is for really old kernels.
Newer kernels have proper open-iscsi kernel support and you should use
those modules that come with your kernel/distro.
Do the newer kernels already have the support added to them?
My own end goal is to do a cross-compile to MIPS to be run on a 3.x kernel.
What are the iSCSI initiator software that are available to be used with newer linux kernels ?
Yes, linux kernel has open-iscsi support built into it now. When building the latest kernel, configure support for open-iscsi and you should have the module built after a successful build of the kernel.

Install 2.4.33 kernel in Debian Wheezy

I need to install old kernel into Kali (Debian like) distro. I need to run program which requires older kernel.
I downloaded kernel but the installation gives me too many errors. I was reading similar topics and watch the videos, but so far I am not successful.
I do not have experience with kernels. Is there .deb package for kernels or any other easier way to do it?
Can I use such old kernel for this distribution?
Thank you
The 2.4.33 kernel is pretty old. According to Debian's packaging files installing that old a kernel doesn't seem to be doable in wheezy. Attempting to install and run an old kernel outside the packaging system is not going to to work. All the "modern" libraries and applications will be broken when running the 2.4 kernel, as will the program (you need more than just a kernel for your program). If it were me, I'd set up a virtualization environment like VirtualBox or something similar and pick an old distro like CentOS 3.9 or an older Debian release (sarge or later). If that's not an option, you could always try and port the program to a more recent kernel.

Kernel Code : where can I find and how to debug the kernel

Recently I have installed Ubuntu 12.04 LTS ISO image in my desktop. Below is the output of the kernel version I have installed:
# uname -r
3.5.0-41-generic
I am trying to develop a VFS and want the kernel source code version '3.5.0-41-generic' for reference purpose - where can I find the same?
What are the excellent kernel debugging options looking at logs and mapping them to kernel code?
How and which debugger I can use to debug a live kernel flow execution?
Are there ways I can add more printk methods and re-modify the modules? Say I want to know how a FS mount method works - I can modify the required FS code (adding more printk functions) re-compile and reload the modules. Now with aid of my new printk functions I can understand the flow
Why don't you install vanilla 3.5 kernel and try to develop on it?
As a kernel debugger you can use kGDB or just printk.
But... I suggest you to test your vfs on linux running on qemu. Qemu is able to debug the running linux - so you can connect gdb to it and debug the whole emulating system.

Resources