Kernel Compilation

Protecting your Linux box
Post Reply
Kamranalilakhnavi
Lance Naik
Posts: 25
Joined: Thu Mar 31, 2005 2:26 am

Kernel Compilation

Post by Kamranalilakhnavi »

Hello Everyone,
I am compiling kernel with grsecurity pacth on RedHat4 Enterprise. Every thing went fine but I am not able to boot my system with new kernel , getting the following error.

Warning: unable to open an initial console.

System hanged after this warning.
Any help would be highly appreciated..


"
Regards,
Pasha
LinuxFreaK
Site Admin
Posts: 5132
Joined: Fri May 02, 2003 10:24 am
Location: Karachi
Contact:

Re: Kernel Compilation

Post by LinuxFreaK »

Dear Kamranalilakhnavi,
Salam,
Kamranalilakhnavi wrote:I am compiling kernel with grsecurity pacth on RedHat4 Enterprise. Every thing went fine but I am not able to boot my system with new kernel , getting the following error.

Warning: unable to open an initial console.

System hanged after this warning.
Any help would be highly appreciated.."
Have you selected support for Unix pty support and under file system have you selected devpts ?

Best Regards.
Farrukh Ahmed
Kamranalilakhnavi
Lance Naik
Posts: 25
Joined: Thu Mar 31, 2005 2:26 am

Post by Kamranalilakhnavi »

Hello,
I am compiling it from old kernel config.
Regards,
Pasha
Kamranalilakhnavi
Lance Naik
Posts: 25
Joined: Thu Mar 31, 2005 2:26 am

Post by Kamranalilakhnavi »

I didn't choose any new option.
Regards,
Pasha
LinuxFreaK
Site Admin
Posts: 5132
Joined: Fri May 02, 2003 10:24 am
Location: Karachi
Contact:

Re:

Post by LinuxFreaK »

Dear Kamranalilakhnavi,
Salam,

Please post output of following command.

# cd /usr/src/linux
# grep "CONFIG_UNIX98_PTYS" config


Best Regards.
Farrukh Ahmed
nomankhn
Colonel
Posts: 714
Joined: Wed Aug 07, 2002 8:00 pm

Post by nomankhn »

Hi Sir,

Pls check do you have all headers and their code is avaialble with that distribution and by the way what update you are using and what specific version you are using for security software.

If you are still getting that error, contact your vendor or its better to install following software but still you need source-code to compile it from source code. lets try it from www.kernel.org

following softwares are required for kernel that comes with RedHat Advance server update #2.

kernel-devel-2.6.9-22.EL
kernel-smp-devel-2.6.9-22.EL
kernel-doc-2.6.9-22.EL
kernel-2.6.9-22.EL
kernel-hugemem-devel-2.6.9-22.EL
kernel-utils-2.4-13.1.69

you pls check your side.

cd /usr/src/kernel/*EL-i686

My suggestion is that you should recompile your security software with that kernel version sourc-code that it prefers.

Regards,
Noman Liaquat
LinuxFreaK
Site Admin
Posts: 5132
Joined: Fri May 02, 2003 10:24 am
Location: Karachi
Contact:

Post by LinuxFreaK »

Dear nomankhn,
Salam,
nomankhn wrote:Pls check do you have all headers and their code is avaialble with that distribution and by the way what update you are using and what specific version you are using for security software.

If you are still getting that error, contact your vendor or its better to install following software but still you need source-code to compile it from source code. lets try it from www.kernel.org

following softwares are required for kernel that comes with RedHat Advance server update #2.

kernel-devel-2.6.9-22.EL
kernel-smp-devel-2.6.9-22.EL
kernel-doc-2.6.9-22.EL
kernel-2.6.9-22.EL
kernel-hugemem-devel-2.6.9-22.EL
kernel-utils-2.4-13.1.69

you pls check your side.

cd /usr/src/kernel/*EL-i686

My suggestion is that you should recompile your security software with that kernel version sourc-code that it prefers.
I believe he is trying to re-compile kernel so it does not need any kernel headers. As he is compiling from source.

Best Regards.
Farrukh Ahmed
nomankhn
Colonel
Posts: 714
Joined: Wed Aug 07, 2002 8:00 pm

Post by nomankhn »

Year Mr.Farrukh,

I know that what he asked for and I observe this thing number of times on RHEL thats why i am asking w.r.t to that headers, it will not start if some files are not there in.

/usr/include/

its impossible then.

Regards,
Noman Liaquat
nomankhn
Colonel
Posts: 714
Joined: Wed Aug 07, 2002 8:00 pm

Post by nomankhn »

Hi Kamranalilakhnavi,

Could you pls tell me about your RedHat Relase and kernel version.

Regards,
Noman Liaquat
LinuxFreaK
Site Admin
Posts: 5132
Joined: Fri May 02, 2003 10:24 am
Location: Karachi
Contact:

Re:

Post by LinuxFreaK »

Dear nomankhn,
Salam,

Okay, This thread is dedicated to you :)

Best Regards.
Farrukh Ahmed
Kamranalilakhnavi
Lance Naik
Posts: 25
Joined: Thu Mar 31, 2005 2:26 am

Post by Kamranalilakhnavi »

Hello,
Kernel Version: 2.6.9-5.EL
Redhat: RHEL4


I have the following directories in
[root@station3 src]# pwd
/usr/src
[root@station3 src]# ls
kernels redhat
[root@station3 src]#
/usr/src/linux
Regards,
Pasha
nomankhn
Colonel
Posts: 714
Joined: Wed Aug 07, 2002 8:00 pm

Post by nomankhn »

Right,

now download the kernel from www.kernel.org and start its compilation.

Download this kernel and start compiling then

http://www.kernel.org/pub/linux/kernel/ ... .14.tar.gz

Regards,
Noman Liaquat
Kamranalilakhnavi
Lance Naik
Posts: 25
Joined: Thu Mar 31, 2005 2:26 am

Post by Kamranalilakhnavi »

Thanks NoMan and Farrukh for your help.
Regards,
Pasha
Post Reply