This site is now 100% read-only, and retired.

Creation of a Redhat RHEL Kernel 2.6.9-11 for Debian 3.1r0a Sarge

Posted by a_madl on Mon 17 Oct 2005 at 11:19

Tags: none.

Did you ever want to have a Redhat kernel and drivers installed upon a Debian system? Here is how you can manage that easily.

Login as User "root" and run "cat /proc/version" - this will show the Kernel version you are running. This is the Debian kernel which will be replaced by a debianized Redhat kernel.

If you wish you can backup your current kernel to Floppy: I never did that :-) "mkboot /boot/vmlinuz-2.6.8" (substitute your kernel version).

To get started you'll need to install some packages:

apt-get install bzip2 docbook-utils gs kernel-package \
        transfig fakeroot rpm libncurses5-dev

Now download the package kern2deb - currently you can find this here:

Install the package with :

dpkg -i kern2deb_1.2_all.deb

(There is an "intent to package" bug already filed on the Debian bug tracking system - #329770 - however the package is not yet included within Debian's archive.)

Now that you have th software you can start work on Debianizing your Redhat kernel.

Copy the Kernel sources from Redhat to the directory /usr/src, eg:

kernel-2.6.9-11.EL.src.rpm

(e.g. from ftp://ftp.redhat.com/pub/redhat/linux/updates/enterprise/4ES/en/os/SRPMS/)

Convert the kernel sources to Debian layout:

kern2deb -k -m a.aaaa@mymail.com  -r no kernel-2.6.9-11.EL.src.rpm

This conversion takes some time. The mesage "No Packages found...." can be ignored since there is simply no corresponding Debian kernel-source Package (yet) available from Debian.org.

Copy a working configuration file from somewhere within the new tree:

cd kernel-source-2.6.9.redhat-2.6.9.redhat.11.el
cp ../kernel-2.6.9-11.EL.dir/kernel-2.6.9-i686-smp.config .config

(The kernel configuration files for any installed Debian kernels will be available as /boot/config-*)

Now you can run "make oldconfig", or "make menuconfig" to configure the kernel.

Configure mkinitrd to only include needed modules (otherwise initrd.img gets too big and kernel will not start...I think because of a GRUB limitation or so...!)

edit /etc/mkinitrd/mkinitrd.conf and set MODULES=dep!

To build your configured kernel run "make-kpkg clean" and "make-kpkg -append-to-version=-rh11-0001-i686-smp -initrd buildpackage".

Answer "N" to the mkinitrd question regarding the needed patch.

"cd .." and "ls -la kernel*rh11*" should now show your Debianized RedHat kernel.

The kernel can be installed with:

dpkg -i kernel-image-2.6.9-rh11-0001-i686_i386.deb

(Change the name if you appended a different string to your package)

Boot your new kernel...good luck !

After a successful reboot and login a "cat /proc/version" should show your new kernel running.

I hope this helps somebody.

Alfred Madl

 

 


Re: Creation of a Redhat RHEL Kernel 2.6.9-11 for Debian 3.1r0a Sarge
Posted by miguel (200.207.xx.xx) on Mon 17 Oct 2005 at 14:44
[ View Weblogs ]
Wow, this is a good idea! I already found my self lock to a adaptec controler
that the driver was avaliable only in rpm form and there were no source.

Have you ever installed a binary driver that is only compiled to RH using RH's
kernel in Debian?

[ Parent ]

Re: Creation of a Redhat RHEL Kernel 2.6.9-11 for Debian 3.1r0a Sarge
Posted by Anonymous (134.155.xx.xx) on Mon 17 Oct 2005 at 19:30
And now the great question: Who would want a Redhat Kernel in Debian?

[ Parent ]

Re: Creation of a Redhat RHEL Kernel 2.6.9-11 for Debian 3.1r0a Sarge
Posted by Anonymous (82.181.xx.xx) on Mon 17 Oct 2005 at 20:03
does it have SELinux?

[ Parent ]

Re: Creation of a Redhat RHEL Kernel 2.6.9-11 for Debian 3.1r0a Sarge
Posted by Anonymous (83.64.xx.xx) on Mon 17 Oct 2005 at 20:05
Simple answer: Everybody who needs hardware vendor certified drivers since most big brand hardware companies just support Redhat (and SuSe).

Alfred Madl

[ Parent ]

Re: Creation of a Redhat RHEL Kernel 2.6.9-11 for Debian 3.1r0a Sarge
Posted by Anonymous (213.164.xx.xx) on Tue 18 Oct 2005 at 08:08
But that's simply untrue. Vendors certify to the OS, not to the kernel.
i.e. including not only the same glibc version, with red hat's patches, but everything else in the distro.

[ Parent ]

Re: Creation of a Redhat RHEL Kernel 2.6.9-11 for Debian 3.1r0a Sarge
Posted by Anonymous (66.179.xx.xx) on Fri 21 Oct 2005 at 19:01
Certified *drivers* - they don't link against glibc. RH applies quite a pile of patches to their kernels to make them more stable for enterprise use - from updated drivers to new features (lustre, gfs, etc). Those aren't in Debian and never will be. Not to mention that Debian's long release cycle means that RH coud easily have a more recent 'production quality' kernel than Debian.

Thanks much for the recipe, Alfred!

[ Parent ]

Re: Creation of a Redhat RHEL Kernel 2.6.9-11 for Debian 3.1r0a Sarge
Posted by Anonymous (83.64.xx.xx) on Sat 22 Oct 2005 at 10:18
Basically you are right of course. But if you are a good/important customer you could also get support easier if you just use the right kernel for certain things like SCSI, SAN, Ethernet drivers, etc. There are many hardware related things that basically depend on the kernel/drivers.

As always: Who cares if it works ?! Right. But what if it doesnt ? I am sure discussions with hardware vendors are easier with Redhat kernel sources...

Alfred

[ Parent ]

Re: Creation of a Redhat RHEL Kernel 2.6.9-11 for Debian 3.1r0a Sarge
Posted by Anonymous (81.180.xx.xx) on Mon 24 Oct 2005 at 22:46
Very good article..

[ Parent ]

Re: Creation of a Redhat RHEL Kernel 2.6.9-11 for Debian 3.1r0a Sarge
Posted by Anonymous (195.52.xx.xx) on Fri 29 Sep 2006 at 09:16
For instance, to tun ClearCase on Debian

[ Parent ]

Re: Creation of a Redhat RHEL Kernel 2.6.9-11 for Debian 3.1r0a Sarge
Posted by Anonymous (80.72.xx.xx) on Thu 3 Nov 2005 at 15:39
About edit /etc/mkinitrd/mkinitrd.conf and set MODULES=dep!
We can to use MODULES=most [initrd size > 25 MB], but add parameter to menu.lst
...
kernel /vmlinuz..... ramdisk_size=30000
...
for 30 MB RamDisk . And do not forget to set CRAMFS=y to this kernel config.

[ Parent ]

Re: Creation of a Redhat RHEL Kernel 2.6.9-11 for Debian 3.1r0a Sarge
Posted by Scott_Denlinger (141.165.xx.xx) on Thu 10 Nov 2005 at 17:38
Interesting concept. Currently, Oracle's 10g DB software binaries don't install on a Debian system. Would they install on a Debian system running one of these kernels? Does anyone know what the 10g binaries check against?

[ Parent ]

Re: Creation of a Redhat RHEL Kernel 2.6.9-11 for Debian 3.1r0a Sarge
Posted by kemitix (212.219.xx.xx) on Wed 16 Nov 2005 at 15:37
You don't need to change the Kernel to get 10g working with Debian. Graham Williams has a good guide[1] on how to set it up as part of his Debian GNU/Linux Desktop Survival Guide[2].

[1] http://www.togaware.com/linux/survivor/Oracle_10g.shtml
[2] http://www.togaware.com/linux/survivor/survivor.shtml

[ Parent ]

Re: Creation of a Redhat RHEL Kernel 2.6.9-11 for Debian 3.1r0a Sarge
Posted by Anonymous (81.208.xx.xx) on Thu 24 Nov 2005 at 17:07
Great! I'll try to install Debian on AS400 model 520.
Thank's a lot.

[ Parent ]

Re: Creation of a Redhat RHEL Kernel 2.6.9-11 for Debian 3.1r0a Sarge
Posted by Anonymous (213.156.xx.xx) on Wed 11 Jan 2006 at 08:52

Hello!

What if I need to apply a debian patch package to the redhat debianised kernel source??? That is, what if I need to apply kernel-patch-vserver?

I'm constrained to use RH kernel 2.6.9-11.ELsmp for my "consolidation" project, in order to install and use IBMsdd proprietary multipathing software (for fault tolerant IBM SHARK S.A.N. access via FC HBAs).

Something like

make-kpkg -append-to-version=-11.ELsmp -initrd -added-patches vserver buildpackage

will work???

Best regards

F. Simonetti

[ Parent ]