LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-17-2005, 03:06 PM   #1
Michael_C15
LQ Newbie
 
Registered: Apr 2005
Posts: 26

Rep: Reputation: 15
Compiling the Kernel


Okay so before i go on heres why i was compiling the kernel http://www.linuxquestions.org/questi...hreadid=313705
And i was following the instructions from this website http://www.linuxplanet.com/linuxplanet/tutorials/202/1/

Okay so everything was going good untill i type "make zImage" and then i got this http://www.freewebs.com/halflife2fil...EL_PROBLEM.doc (Couldnt post, there was too much text) So any ideas on whats causing this? Was there something i was supposed to do before i did what that website told me to do?
Please Help
 
Old 04-17-2005, 03:12 PM   #2
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 64
The link you are trying to follow is for the 2.4 kernel series. It is a bit different to compile the kernel on 2.6 series, which is the one I believe you are using with Mandy 10. Do this:

# cd /usr/src/linux
# make menuconfig
# make && make modules_install

Regards!
 
Old 04-17-2005, 03:13 PM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
doc? a word document???? just tell us. and don't use zImage, use make bzImage instead.
 
Old 04-17-2005, 03:23 PM   #4
Michael_C15
LQ Newbie
 
Registered: Apr 2005
Posts: 26

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by Megaman X
The link you are trying to follow is for the 2.4 kernel series. It is a bit different to compile the kernel on 2.6 series, which is the one I believe you are using with Mandy 10. Do this:

# cd /usr/src/linux
# make menuconfig
# make && make modules_install

Regards!
Is that everything? How do i install the kernel once im done? Thanks you two for your fast reply
 
Old 04-17-2005, 03:55 PM   #5
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 64
Almost everything . Then you will need to install your new kernel to /boot and tell the boot loader it's name and where it is:

# cp arch/i386/boot/bzImage /boot/<choose a name>

then update your boot loader config and reinstall your boot loader (if you use lilo). If it's lilo, run "/sbin/lilo". If it's grub, you just need to update your grub.conf, usually located at /boot/grub/grub.conf

There might be a few steps that I'm forgetting though .
 
Old 04-17-2005, 05:04 PM   #6
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
here is how i go about compiling my kernel

cd /usr/src/linux-2.6....

make xconfig

edit the Makefile

make bzImage && make modules && make modules_install
cp arch/i386/boot/bzImage /boot/vmlinuz-2.6.11.7.128
cp System.map /boot/System.map-2.6.11.7.128
mkinitrd -0 /boot/initrd-2.6.11.7.128 2.6.11.7.128

the mkinitrd command is upto ur system if it follows the initrd files

and after this i edit my lilo/grub.conf files

regards
 
Old 04-17-2005, 05:35 PM   #7
Michael_C15
LQ Newbie
 
Registered: Apr 2005
Posts: 26

Original Poster
Rep: Reputation: 15
I tried what you said Megaman but it gave me the same error And I think im useing the 2.4 kernel.. Is there a way to upgrade it to the 2.6 version?
 
Old 04-17-2005, 06:50 PM   #8
mjmwired
Member
 
Registered: Apr 2004
Distribution: CentOS6, CentOS5, F16, F15, Ubuntu, OpenSuse
Posts: 620

Rep: Reputation: 39
Hi Michael, please explain the following:
What distribution AND version of Linux are you using? (ex: Redhat 9.0)
What was the file name of the kernel source you obtained? (ex: linux-2.4.30.tar.bz2)

Depending on what Linux you are using it may be very little or quite a bit of work to switch from 2.4 to 2.6 kernel.
Depending on which kernel you are compiling the compile process is different.
 
Old 04-17-2005, 08:07 PM   #9
Michael_C15
LQ Newbie
 
Registered: Apr 2005
Posts: 26

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by mjmwired
Hi Michael, please explain the following:
What distribution AND version of Linux are you using? (ex: Redhat 9.0)
What was the file name of the kernel source you obtained? (ex: linux-2.4.30.tar.bz2)

Depending on what Linux you are using it may be very little or quite a bit of work to switch from 2.4 to 2.6 kernel.
Depending on which kernel you are compiling the compile process is different.
Im useing Mandrake 10.1 and as far as which source i have i really dont know. Is there somewhere i can download the source i need?
 
Old 04-17-2005, 11:10 PM   #10
Michael_C15
LQ Newbie
 
Registered: Apr 2005
Posts: 26

Original Poster
Rep: Reputation: 15
Okay i typed uname -r in the terminal and it told me 2.6.8.1-12mdksmp but the folder /usr/src/linux README files says it some 2.4 series kernel.. Any way to fix this?

Last edited by Michael_C15; 04-17-2005 at 11:11 PM.
 
Old 04-17-2005, 11:58 PM   #11
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 64
Give us the output of the following:

rpm | grep kernel
ls -l /usr/src/linux
 
Old 04-18-2005, 12:17 AM   #12
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
i think

if u have installed the kernel source on mandrake that would have installed the 2.4 source
try

urpmi kernel-source-2.6

also u can get the source of the kernel from kernel.org

regards
 
Old 04-18-2005, 01:25 PM   #13
Michael_C15
LQ Newbie
 
Registered: Apr 2005
Posts: 26

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by Megaman X
Give us the output of the following:

rpm | grep kernel
ls -l /usr/src/linux
the first line didnt say anything the second one showed that the linux folder pointed to the 2.4 series folder. But when i tried urpmi kernel-source-2.6 it fixed everything and i compiled the kernel and did the make and make modules_install commands but i got a question.. where does it save the new kernel to?
 
Old 04-18-2005, 02:20 PM   #14
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
Quote:
Originally posted by Michael_C15
the first line didnt say anything the second one showed that the linux folder pointed to the 2.4 series folder. But when i tried urpmi kernel-source-2.6 it fixed everything and i compiled the kernel and did the make and make modules_install commands but i got a question.. where does it save the new kernel to?
follow my first post

also u need to make custom names to copy those images files

do not overwrite them

regards
 
  


Reply


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
Compiling kernel = kernel panic Tons of Fun Debian 5 07-02-2005 02:59 PM
Compiling kernel module for linux kernel 2.4 in 2.6 guam Linux - Software 0 01-13-2005 03:02 AM
Where Is Kernel Directory In Rh9(kernel 2.4.20-8), For Compiling HSP56 MR(pctel) Mode rudy3107 Linux - Software 1 07-25-2004 05:17 AM
Help! Everything seems to be compiling into kernel! KuRe Slackware 18 12-17-2003 09:04 PM
Kernel compiling and module compiling tarballed Linux - General 1 12-22-2002 06:31 PM


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

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration