LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 11-14-2003, 03:39 PM   #1
daYz
Member
 
Registered: Nov 2003
Distribution: Debian
Posts: 164

Rep: Reputation: 30
How to recompile the kernel?


Hi,

Where can i find information about recompiling the kernel? I can only find information about compiling it.

Thanks.
 
Old 11-14-2003, 06:26 PM   #2
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,791
Blog Entries: 1

Rep: Reputation: 414Reputation: 414Reputation: 414Reputation: 414Reputation: 414
You're splitting semantic hairs. If by "recompiling" you mean compiling a new kernel using the same configuration as the old kernel, then you need to investigate using the make oldconfig configuration command. Or you can just use make menuconfig or make xconfig(if you working within X) and do the configuration from scratch.

Either way, you want to visit DaOne's sticky post at the top of this forum.
 
Old 11-14-2003, 09:04 PM   #3
320mb
Senior Member
 
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577

Rep: Reputation: 47
Slackware Essentials Book!
did you buy the slack 9.1 Cd set?? this book comes with it, if not
goto slackware.com and read the book, it knows all, tells all about
Slackware.
 
Old 11-15-2003, 04:42 AM   #4
daYz
Member
 
Registered: Nov 2003
Distribution: Debian
Posts: 164

Original Poster
Rep: Reputation: 30
Ok thanks. I am following DaOne's topic now.

I have heard the book on slackware.com is not up to date. Is this the same for the book included on the (download) cd?

Offtopic: is there a utility that tells me on wich cd a utility is I'm looking for? For RedHat there is whichcd for example. It searches for packages on the cd's without the cd's being mounted.
 
Old 11-15-2003, 01:52 PM   #5
Jiggy
Member
 
Registered: Nov 2003
Posts: 36

Rep: Reputation: 15
I just want to make sure i got this right.... In DaOnes kernel thread the make install command will automatically rename your old kernel files in /boot to *.old which is what you want since in step 1 you already configured lilo to be able to boot to your old kernel using the *.old files?


Also is it ok if i created and saved my kernel config before i did this step?

"Now we need to edit the Makefile to make sure your new kernel is copied to the appropriate directory.

If you are using 8.1 or later, open /usr/src/linux/Makefile in a text editor, scroll to line 74 and
uncomment the the line #export INSTALL_PATH=/boot.
For 8.0 you must leave this line commented."

Last edited by Jiggy; 11-15-2003 at 05:14 PM.
 
Old 11-15-2003, 03:46 PM   #6
daYz
Member
 
Registered: Nov 2003
Distribution: Debian
Posts: 164

Original Poster
Rep: Reputation: 30
I succeeded recompiling my kernel, but how do I remove the old one?

Thanks.

Sorry Jiggy, I don't know the answer to your question.
 
Old 11-15-2003, 07:58 PM   #7
skog
Member
 
Registered: Sep 2003
Location: TX
Distribution: slackware
Posts: 301

Rep: Reputation: 30
rm /boot/oldkernelname

i typically make a softlink to the actual kernel so just copy your new kernel to /boot something like:
cp /usr/src/linux/arch/i386/boot/bzImage /boot/vmlinuz-2.4.22
cd /boot
ln -s vmlinuz-2.4.22 vmlinuz
rm /boot/oldkernelname
lilo /* make sure your /etc/lilo.cfg file points to /boot/vmlinuz though */

if you use grub then just edit /boot/grub/menu.lst so that it points to /boot/vmlinuz
#slackware
title slackware
kernel (hd0,0)/vmlinuz root=/dev/hda2 ro
 
Old 11-15-2003, 08:14 PM   #8
DaOne
Member
 
Registered: Jan 2003
Location: USA
Distribution: Slackware
Posts: 498

Rep: Reputation: 30
Quote:
Originally posted by Jiggy
I just want to make sure i got this right.... In DaOnes kernel thread the make install command will automatically rename your old kernel files in /boot to *.old which is what you want since in step 1 you already configured lilo to be able to boot to your old kernel using the *.old files?

Yes, this is correct.

Also is it ok if i created and saved my kernel config before i did this step?

I make a copy of my .config before I do anything. This way, it will not be lost if something were to go wrong, or if I decide to do make proper.

"Now we need to edit the Makefile to make sure your new kernel is copied to the appropriate directory.

If you are using 8.1 or later, open /usr/src/linux/Makefile in a text editor, scroll to line 74 and
uncomment the the line #export INSTALL_PATH=/boot.
For 8.0 you must leave this line commented."
Anything I missed here? HTH.
 
Old 11-15-2003, 09:47 PM   #9
Jiggy
Member
 
Registered: Nov 2003
Posts: 36

Rep: Reputation: 15
Yeah that cleared it up for me, thank you
 
Old 11-15-2003, 10:28 PM   #10
Jiggy
Member
 
Registered: Nov 2003
Posts: 36

Rep: Reputation: 15
Well i tried it and after i typed "make bzimage" command it said:

root@localhost:/usr/src/linux# make bzimage
make: *** No rule to make target `bzimage'. Stop.
root@localhost:/usr/src/linux#


so i stoped


Edit: Doh, its case sensitive, the I should of been upper case. Why couldn't they of just said unknown command or something.... I'm about to reboot using the new kernel. Which me luck

Last edited by Jiggy; 11-15-2003 at 11:02 PM.
 
Old 11-15-2003, 11:14 PM   #11
Jiggy
Member
 
Registered: Nov 2003
Posts: 36

Rep: Reputation: 15
WOOO HOOOO!! I have SOUND!!!!11

Ok heres what happend, i compiled and rebooted. And for some reason lilo didn't give me the option of using my old kernel. I loaded Slackware which turned out to be my new kernel, i knew this because i got a lot of IPTables errors which didn't surprise me because i didn't compile it with that feature. So i went back and added it recompiled the kernel and rebooted and lilo then for some reason now gave me the option of booting to slack.old. I booted to Slackware and i got the same IPTables errors BUT what i didn't get is the most important. I didn't get the sound server error that i had been getting for a LONG time. I now have sound!

Edit: The IPTables errors are fixed now. Durring the compile i caught a few errors. One was something like

AMD_free_gatt
warning incompatible pointer type

one was about intel and there was another i dunno about. They went by pretty fast so hopefully they are in my logs?

Last edited by Jiggy; 11-15-2003 at 11:41 PM.
 
Old 11-16-2003, 01:06 AM   #12
snocked
Member
 
Registered: Dec 2002
Location: St. Louis, MO
Distribution: Slackware 9.1
Posts: 482

Rep: Reputation: 30
After you edit lilo, you have to run /sbin/lilo for changes to be made.
 
Old 11-16-2003, 01:36 AM   #13
Jiggy
Member
 
Registered: Nov 2003
Posts: 36

Rep: Reputation: 15
Thanks, rebooting seems to work as well for me... I got a question though. Nvidia drivers require me to edit the XFree86Config to include Load "dri" There is a option in the kernel config to enable support for DRI and when you do you have to select your video card. The problem is my video card isn't on the list. I have a Nvidia Geforce 2 pro. Nvidia isn't even listed there. The text that shows up when you click on DRI says that you need to select your video card...

I just noticed theres also the option to "Build drivers for old (XFree 4.0) DRM (NEW)

My XF86 version is 4.3.0... Should i select that option or just select the DRI and leave any other DRI options blank?

Last edited by Jiggy; 11-16-2003 at 01:44 AM.
 
Old 11-16-2003, 06:13 AM   #14
daYz
Member
 
Registered: Nov 2003
Distribution: Debian
Posts: 164

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by skog
rm /boot/oldkernelname

i typically make a softlink to the actual kernel so just copy your new kernel to /boot something like:
cp /usr/src/linux/arch/i386/boot/bzImage /boot/vmlinuz-2.4.22
cd /boot
ln -s vmlinuz-2.4.22 vmlinuz
rm /boot/oldkernelname
lilo /* make sure your /etc/lilo.cfg file points to /boot/vmlinuz though */

if you use grub then just edit /boot/grub/menu.lst so that it points to /boot/vmlinuz
#slackware
title slackware
kernel (hd0,0)/vmlinuz root=/dev/hda2 ro
Thanks skog. I did not exactly what you described, but I made a link to /boot/vmlinuz-2.4.22 from /usr/src/linux/arch/i386/boot/bzImage, and adapted lilo to it. When I tried making a softlink the way you described it, I got the error that the link couldn't be made because the file vmlinuz already existed.
 
  


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
how to recompile kernel 2.4.21-15.EL zameer_india Linux - Newbie 2 12-24-2004 02:02 AM
kernel recompile error (kernel panic) tombaaaaa Linux - Newbie 4 08-04-2004 05:32 PM
Recompile kernel 2.6 heema Linux - General 3 05-26-2004 11:29 AM
9.2 kernel recompile dukeinlondon Mandriva 3 11-10-2003 07:34 AM
Recompile Kernel ? Amerist Linux - Newbie 5 04-16-2002 05:13 AM


All times are GMT -5. The time now is 03:16 PM.

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