LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-07-2003, 06:34 PM   #1
Kramer
Member
 
Registered: Aug 2003
Location: Somewhere south of sanity...
Distribution: Mandrake 9.1
Posts: 550

Rep: Reputation: 30
Question If I download a kernel (2.4.22) what do I do with it?


So I downloaded the kernel 2.4.22 and moved it to the usr/src/ directory. Ive used bunzip2 to unzip it. Also, I have the appropriate ACPI patch with it as well, since I cant seem to get it to run on the 2.4.21 kernel. What should I do now? I tried to patch the kernel since the one I unzipped says "patch 2.4.22" but the prompt just sits there. Im lost........
 
Old 10-07-2003, 06:54 PM   #2
meldroc
Member
 
Registered: Aug 2003
Posts: 102

Rep: Reputation: 15
Usually you patch a kernel by going into /usr/src/linux (or wherever you untarred (that's tar -jxvf kernel.tar.bz2 - you did create the kernel directory trees with tar, didn't you?) your kernel, then typing patch -p 0 < foo.diff. The < is important, since patch only reads diffs from standard input. The -p tells patch how many levels to strip from directory paths inside the patch. Usually -p 0 or -p 1 works fine.
 
Old 10-07-2003, 07:04 PM   #3
Kramer
Member
 
Registered: Aug 2003
Location: Somewhere south of sanity...
Distribution: Mandrake 9.1
Posts: 550

Original Poster
Rep: Reputation: 30
thats the problem, it doesnt have .tar in the name. If it did, Id know what to do with it. Im back in Windows for the moment anyway (a little guitar recording in order for the night). What do I need to do to get a .tar archive? the acpi patch has the .diff extension, but no tar either. I unzipped both into my usr/src/linux directory.
 
Old 10-07-2003, 07:20 PM   #4
hw-tph
Senior Member
 
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 58
You have the 2.4.21 to 2.4.22 patch, not the full kernel release, that's why it's not a tar archive. Since it's only one file (that patch file itself) using tar doesn't do anything helpful.

tar, the TApe ARchiver, only sticks files together - it doesn't compress, while bzip2 and gzip can only handle single input files. That's why you often see .tar.gz and .tar.bz2 extensions.

Download the full kernel release. It's called linux-2.4.22.tar.bz2.

hw
 
Old 10-07-2003, 07:29 PM   #5
Kramer
Member
 
Registered: Aug 2003
Location: Somewhere south of sanity...
Distribution: Mandrake 9.1
Posts: 550

Original Poster
Rep: Reputation: 30
ok, that makes sense. Am I doing everything else right otherwise?
 
Old 10-07-2003, 07:54 PM   #6
Kramer
Member
 
Registered: Aug 2003
Location: Somewhere south of sanity...
Distribution: Mandrake 9.1
Posts: 550

Original Poster
Rep: Reputation: 30
Ok, got it patched. Now when I go to recompile, and I do "make xconfig" I get the error message

make: *** [xconfig] Error 2

 
Old 10-07-2003, 09:36 PM   #7
tillyoubreakit
Member
 
Registered: Sep 2003
Location: Bavaria, Germany
Distribution: Redhat 9.0
Posts: 49

Rep: Reputation: 15
So do I ....please help us :-)

I need the kernel patch to support AGP on my 875p chipset.

Thanks

-Florian
 
Old 10-07-2003, 10:20 PM   #8
Kramer
Member
 
Registered: Aug 2003
Location: Somewhere south of sanity...
Distribution: Mandrake 9.1
Posts: 550

Original Poster
Rep: Reputation: 30
Is there any other way to configure a kernel in a GUI other than xconfig?
 
Old 10-08-2003, 03:16 AM   #9
repe
Member
 
Registered: Aug 2003
Location: Finland
Distribution: Slackware 9.0 & 9.1. FreeBSD 4.8 & 5.1
Posts: 30

Rep: Reputation: 15
make menuconfig
 
Old 10-08-2003, 03:44 AM   #10
hw-tph
Senior Member
 
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 58
Make sure you have the development packages for libncurses if you're going to use menuconfig, and make sure you have Tk installed if you want to use xconfig.

hw
 
Old 10-08-2003, 07:38 AM   #11
Kramer
Member
 
Registered: Aug 2003
Location: Somewhere south of sanity...
Distribution: Mandrake 9.1
Posts: 550

Original Poster
Rep: Reputation: 30
I used xconfig when I tried to compile the first kernel. Now that Im trying the 2.4.22, it gives me that error. What gives?
 
Old 10-08-2003, 07:49 AM   #12
aaa
LQ Guru
 
Registered: Jul 2003
Location: VA
Distribution: Slack 10.1
Posts: 2,194

Rep: Reputation: 47
When you log on as a regular user in X, and open a terminal window, and use 'su', then try to run an X program, it gives an error. Try using 'make menuconfig' instead.
 
Old 10-08-2003, 07:55 AM   #13
Kramer
Member
 
Registered: Aug 2003
Location: Somewhere south of sanity...
Distribution: Mandrake 9.1
Posts: 550

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by aaa
When you log on as a regular user in X, and open a terminal window, and use 'su', then try to run an X program, it gives an error. Try using 'make menuconfig' instead.
Thats what I dont understand. It doesnt give an error, as I run alot of stuf from the prompt. I can use menuconfig, but I dont know what I should answer to some of the stuff. If i press enter, will it just skip it?
 
Old 10-08-2003, 09:09 AM   #14
yapp
Member
 
Registered: Apr 2003
Location: Netherlands
Distribution: SuSE (before: Gentoo, Slackware)
Posts: 613

Rep: Reputation: 30
There is a help button for every option. Read the explaination, and suggestion.

For a newbie kernel compilation, I'd recommend these things:

- run menuconfig. use the arrows to navigate, and 'space' (or 'M' for modules) to change the settings.

- enable the kernel module loader + hotplug.. these features are used to detect+load devices at boot time. If you want a fast kernel, you could turn these off. (but you have to load the drivers yourself) hotplugging is also used to load a driver automatically if connect an usb-device.

- compile most the required options build-in the kernel, but compile drivers as module.

- don't enable features your system doesn't have it will make your kernel big, and the best part of kernel compiling, is making a light fast kernel.

- if you doubt about some driver, just compile it as module (you can load it if you have to)

- compile all usb modules! if you have compiled these and enabled hotplug+kmod, your usb device will work automatically if you plug it in your machine. It's a bit pointless to re-compile your kernel because an USB driver is missing ... but: I don't compile all sound cards, etc.. I just choose the one I have.

- you can create a kernel adjusted to your own system, you motherboard, features, etc.. Only choose what you need, or enable it as module.

- don't forget to choose the right processor type (code will be optimized too), and stuff like the ext2+ext3 file systems


tips:
* create a symlink:
ln -s /usr/src/linux-2.4.22/ /usr/src/linux (most programs expect your kernel sources at /usr/src/linux)
Edit the revision version of /usr/src/linux/Makefile; you can install the new kernel modules without loosing your current modules. (for example, they'll install in /lib/modules/2.4.22-you if your revision is "-you")

then:
make dep
make clean
make bzImage
make modules
make modules_install
cp System.map /boot/System.map-2.4.22-you
ls -fs /boot/System.map-2.4.22-you /boot/System.map
(create the new link to system.map)
cp .config /boot/config-2.4.22-you (keep this copy!)
cp arch/i386/boot/bzImage /boot/linux-2.4.22-you (your kernel)
* edit /etc/lilo.conf, and add another section:
Code:
image = /boot/linux-2.4.22-you
  label = Linux_22-you
  read-only
* run 'lilo', and 'reboot'

Last edited by yapp; 10-08-2003 at 09:15 AM.
 
Old 10-08-2003, 10:26 AM   #15
lupin_the_3rd
Member
 
Registered: Oct 2003
Location: Memphis, TN
Distribution: Slackware current
Posts: 485

Rep: Reputation: 30
Quote:
Originally posted by Kramer
I used xconfig when I tried to compile the first kernel. Now that Im trying the 2.4.22, it gives me that error. What gives?
The 2.4.22 has the current acpi patches in it... did you get any "hunk failed" errors when patching?

Also, a good work around for configuring the kernel is to copy your working config (if your using a tweaked distro like suse, red hat, or mandrake) and use it. Copy from /boot/ kernel name.config to /usr/src/kernel sources being compiled

make xconfig lets you load a config from file as long as it's in your kernel sources directory (/usr/src/linux-2.4.22 in your case)... just type the exact name into the prompt.

This gives you a starting point... then go in and enable things like acpi (disable apm), ntfs support, etc...

Last edited by lupin_the_3rd; 10-08-2003 at 10:30 AM.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
download kernel ust Linux - Software 1 10-13-2005 02:37 AM
is there a kernel download? dragon_fire04 Linux - Software 2 02-13-2005 10:39 PM
Download kernel source waynefrank Linux - Newbie 1 02-10-2005 08:04 PM
How do you download new kernel ? TheLinuxGuy Linux - General 3 07-02-2002 08:26 PM
Can't download 2.4.17 kernel?! tarballedtux Linux - General 1 01-15-2002 02:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:19 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
Open Source Consulting | Domain Registration