LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 07-25-2003, 05:54 PM   #1
Slackz0r
LQ Newbie
 
Registered: Jul 2003
Posts: 15

Rep: Reputation: 0
Downloading New Kernel Help


Alright well to start off i run slackware 7.1, its pretty clunky and i need to do a tune up. I ran myself over to kernel.org and picked myself up a new kernel. the file is patch-2-4-21.bz2 . Well what must i do to get this kernel i just downloaded into a compiled working version that i can use on my computer. I read through the other walkthroughs and im not sure its workin out too good. so if someone would be oh so kind enough to lend me a helping hand, i probably wont end up throwing my laptop at a streetsweeper tomorrow morning.
 
Old 07-25-2003, 06:56 PM   #2
jpbarto
Senior Member
 
Registered: Mar 2003
Location: Pittsburgh, PA
Distribution: Gentoo / NetBSD
Posts: 1,251

Rep: Reputation: 45
first if you've got the bandwidth just download the full kernel version. (that's the one linked to with the 'F' hyperlink) that way you won't have to mess with patches.

If you don't have the bandwidth I think the patch will only work against a 2.4.20 kernel. And the 2.4.20 patch only works against the 2.4.19, etc.

Anyway, once you have your extracted kernel source code just lying there in /usr/src/linux-2.4.21 cd into it and then execute the following commands:

make xconfig ### this will allow you a very nice graphical way to configured your new kernel
make dep ### this will create the dependancies between your configured kernel modules
make bzImage ### this will make your actuall kernel
make modules ### this will create your modules
make modules_install ### this will install the modules to /lib/modules/2.4.21

then copy /usr/src/linux-2.4.21/arch/i386/boot/bzImage to /boot/linux-2.4.21.kernel

then edit the appropraite bootloader config file (grub = /etc/grub.conf and lilo = /etc/lilo.conf) and then you're good to go.

(don't forget to execute lilo after changing its config file).

hth,
jpbarto
 
Old 07-26-2003, 11:22 AM   #3
XPediTioN
Member
 
Registered: Jun 2003
Location: Illinois
Distribution: Slackware 9.1
Posts: 305

Rep: Reputation: 30
I just downloaded linux-2.4.21.tar.gz and before I untar it I want to know if by upgrading my kernel I have to redo my Nvidia Vanta configuration with the appropiate driver 4363 and also reinstall my modem driver or it just upgrade the kernel and leave the other stuff as it is.

XPediTioN
 
Old 07-26-2003, 11:32 AM   #4
Slackz0r
LQ Newbie
 
Registered: Jul 2003
Posts: 15

Original Poster
Rep: Reputation: 0
would you so kind as to telling me the URL that you acquired the latest kernel in tar.gz form.
 
Old 07-26-2003, 11:44 AM   #5
jpbarto
Senior Member
 
Registered: Mar 2003
Location: Pittsburgh, PA
Distribution: Gentoo / NetBSD
Posts: 1,251

Rep: Reputation: 45
latest kernel:
www.kernel.org

more specifically:
http://www.kernel.org/pub/linux/kern...2.4.21.tar.bz2

the drivers for your modem and nvidia will more than likely have to be recompiled as well. (you could try the old ones but you're only asking for trouble).
 
Old 07-26-2003, 03:05 PM   #6
XPediTioN
Member
 
Registered: Jun 2003
Location: Illinois
Distribution: Slackware 9.1
Posts: 305

Rep: Reputation: 30
Where do I untar the kernel?
 
Old 07-26-2003, 03:12 PM   #7
DrOzz
Senior Member
 
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185

Rep: Reputation: 60
/usr/src/
 
Old 07-26-2003, 03:30 PM   #8
XPediTioN
Member
 
Registered: Jun 2003
Location: Illinois
Distribution: Slackware 9.1
Posts: 305

Rep: Reputation: 30
What do I have to do in Slackware so that I don't mess up while installing my kernel. Where do I untar it /usr/src/ or where because i think it's differet on Slackware. Another thing what do I choose in the xconfig. I don't know what to do.
 
Old 07-26-2003, 03:45 PM   #9
Locura
Member
 
Registered: May 2003
Distribution: Ubuntu 6.10 SE, Mac OS 10.4.8
Posts: 370

Rep: Reputation: 30
Quote:
Originally posted by jpbarto
Anyway, once you have your extracted kernel source code just lying there in /usr/src/linux-2.4.21 cd into it and then execute the following commands:

make xconfig ### this will allow you a very nice graphical way to configured your new kernel
make dep ### this will create the dependancies between your configured kernel modules
make bzImage ### this will make your actuall kernel
make modules ### this will create your modules
make modules_install ### this will install the modules to /lib/modules/2.4.21

then copy /usr/src/linux-2.4.21/arch/i386/boot/bzImage to /boot/linux-2.4.21.kernel

then edit the appropraite bootloader config file (grub = /etc/grub.conf and lilo = /etc/lilo.conf) and then you're good to go.
Since I have never compiled a kernel, just a couple questions about the process you have outlined.

1) All this compiling, make dep, make bzImage, etc... that won't overwrite files for another version, just create/replace ones within the directory structure for 2.4.21, right?

2) Copying the bzImage file to /boot/linux-2.4.21.kernel, you should be able to just add an entry to lilo.conf and boot either kernel (and yes I do know about running lilo -v afterwards), instead of replacing 2.4.20 or whatever other version you currently have, correct?

Last edited by Locura; 07-26-2003 at 03:46 PM.
 
Old 07-26-2003, 05:55 PM   #10
Slackz0r
LQ Newbie
 
Registered: Jul 2003
Posts: 15

Original Poster
Rep: Reputation: 0
alright, see i got the whole process of installing the new kernel, its simply i dont frequent UNIX a lot, and i need to know how to untar the files into /usr/src

when i open up the patch-2-4-21.bz2 i can see all the files within, can i just copy these files over to /usr/src and then continue with the kernel recompilation??
 
Old 07-26-2003, 06:14 PM   #11
jpbarto
Senior Member
 
Registered: Mar 2003
Location: Pittsburgh, PA
Distribution: Gentoo / NetBSD
Posts: 1,251

Rep: Reputation: 45
Locura... compiling a new kernel will not create any files outside of the source /usr/src/2.4.21 directory until you execute the commands
make modules_install
and cp arch/i386/boot/bzImage /boot/2.4.21-kernel

and yes after you copy the kernel image to the /boot directory and edit lilo.conf you will be able to boot either (or every) kernel you have installed (or have lilo configured for).

slackz0r: when you bunzip2 the patch you'll then have to use the patch utility to apply the patch (this of course assumes you have a 2.4.20 kernel source directory).
 
Old 07-26-2003, 06:15 PM   #12
jpbarto
Senior Member
 
Registered: Mar 2003
Location: Pittsburgh, PA
Distribution: Gentoo / NetBSD
Posts: 1,251

Rep: Reputation: 45
xpedition: never fear... just untar the kernel source into /usr/src

mv linux-2.4.21.tar.gz /usr/src
cd /usr/src
tar -xvzf linux-2.4.21.tar.gz

this will dump all the files into a newly created linux-2.4.21 directory.
it won't mess up any files.
 
Old 07-26-2003, 06:43 PM   #13
Slackz0r
LQ Newbie
 
Registered: Jul 2003
Posts: 15

Original Poster
Rep: Reputation: 0
my current kernel is 2.2.16 and its not really up to the times these days, therefore im installing 2.4.21. and since im a big n00blar i need some help with .bz2 and all that jazz. once i get all the pre-kernel recompilation stuff complete i can do the make xconfig, make dep, and all that stuff, its just that baby step in the beginning im strugglin with
 
Old 07-26-2003, 07:24 PM   #14
Locura
Member
 
Registered: May 2003
Distribution: Ubuntu 6.10 SE, Mac OS 10.4.8
Posts: 370

Rep: Reputation: 30
An easy way to un-tar a bz2 is to use tar -xjvf filename.tar.bz2.

Last edited by Locura; 07-26-2003 at 08:38 PM.
 
Old 07-26-2003, 08:27 PM   #15
jpbarto
Senior Member
 
Registered: Mar 2003
Location: Pittsburgh, PA
Distribution: Gentoo / NetBSD
Posts: 1,251

Rep: Reputation: 45
slackz0r: mv linux-2.4.21.tar.bz2 to /usr/src
execute bunzip2 linux-2.4.21.tar.bz2...
this should leave you with a linux-2.4.21.tar file
then tar -xvf linux-2.4.21.tar

this will create a linux-2.4.21 directory
cd to the newly created linux-2.4.21 directory and type either
make xconfig or make menuconfig

then slowly (about an hour for a newbie) go through each option and if you're unsure about whether you should select yes, no, or module for an option click the help button and it will tell you what the option does and what you as an unsure user should safely choose. Then after that do the make dep, make bzimage, make modules, make modules_install...etc bit.

Don't worry though... if you get something wrong then you can always reboot to the kernel you are using now (providing you don't delete the existing kernel). Plus if you're REALLY unsure about whether you should include a function or not just include it as a module... that way you can decide after you reboot whether you should use the function (you can modprobe the function once you're up and running)

hope that helps and good luck
jpbarto
 
  


Reply



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
downloading virtualking Linux - Software 1 06-04-2003 08:23 AM
downloading monkeyjiann Linux - Newbie 5 01-31-2002 02:37 PM
Downloading Kernel V2.4 rdaves@earthlink.net Linux - Newbie 2 05-23-2001 01:43 PM
Help Downloading Jcurry Linux - Newbie 1 04-11-2001 02:27 PM
downloading help silent_trooper Linux - Software 1 01-13-2001 09:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:20 AM.

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
Open Source Consulting | Domain Registration