Kernel compilation on CentOS

General support questions
vivekgwd
Posts: 16
Joined: 2017/10/17 05:06:40

Kernel compilation on CentOS

Post by vivekgwd » 2017/10/17 05:22:56

Hi all,

I am tyring to compile kernel version 2.6.32.3 on centos 6.9(final),it compiles and when booting up it crashes.
If i try making rpm of same kernel and install ,it boots up with that kernel and it works fine.

For compilation,steps
===================

1.make mrproper
2.make menuconfig(just to load the configuration file)
3.make bzImage
4.make modules
5.make modules_install
6.make install

For compiling RPM
=================

1.make clean && make mrproper
2.cp /boot/config-`uname -r` ./.config
3.make menuconfig(just to load the configuration file)
4.make rpm

installing rpm from /root/rpmbuild/RPMS/arch
creating ram disk and editing grub.

I am compiling on HP G7 server

Please help me with the steps on how to compile.

Thanks in advance

vivek

Whoever
Posts: 1361
Joined: 2013/09/06 03:12:10

Re: Kernel compilation on CentOS

Post by Whoever » 2017/10/17 06:09:35

Are you configuring the kernel for your hardware at any step?

vivekgwd
Posts: 16
Joined: 2017/10/17 05:06:40

Re: Kernel compilation on CentOS

Post by vivekgwd » 2017/10/17 06:36:21

No,i am not configuring kernel

User avatar
TrevorH
Site Admin
Posts: 33215
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Kernel compilation on CentOS

Post by TrevorH » 2017/10/17 09:17:48

Why? Why would you attempt to build 2.6.32.3 when it's more than 7 years old? It'll be riddled with security vulnerabilities and is unsafe to use.

We already ship a 2.6.32 kernel that's up to date and patched against known problems.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

vivekgwd
Posts: 16
Joined: 2017/10/17 05:06:40

Re: Kernel compilation on CentOS

Post by vivekgwd » 2017/10/17 10:06:44

Hi

we have an application which requires compilation of kernel 2.6.32.3 even though
centos 6.9(final) is providing higher and stable version.

User avatar
TrevorH
Site Admin
Posts: 33215
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Kernel compilation on CentOS

Post by TrevorH » 2017/10/17 11:00:36

It dates from January 2010 and is unsafe to use.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

User avatar
jlehtone
Posts: 4530
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Kernel compilation on CentOS

Post by jlehtone » 2017/10/17 13:28:39

vivekgwd wrote:we have an application which requires compilation of ...
Interesting. "Compilation", not "existence"?

Whatever the actual dependency is, it does not sound healthy.
Is there chance to talk sense into the application?

User avatar
avij
Retired Moderator
Posts: 3046
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: Kernel compilation on CentOS

Post by avij » 2017/10/17 13:48:49

What happens if you try to run the said application using standard CentOS kernels?

vivekgwd
Posts: 16
Joined: 2017/10/17 05:06:40

Re: Kernel compilation on CentOS

Post by vivekgwd » 2017/10/17 13:48:57

Thanks for suggestions,

our application till now was running on RHEL 6.5 with our custom kernel(2.6.32.3)
we are now migrating to centos 6.9(final),so for that purpose, we need to compile this kernel
as initial part of project.

i just wanted to know whether i am following correct steps to compile kernel on centos.
if not,please suggest me how to move forward.

User avatar
TrevorH
Site Admin
Posts: 33215
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Kernel compilation on CentOS

Post by TrevorH » 2017/10/17 13:50:38

Identify why your app is tied to an obsolete kernel and replace it with the CentOS supplied one.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply