LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 02-18-2002, 05:52 PM   #1
justiceisblind
Member
 
Registered: Jan 2002
Location: Stevens Point, WI
Distribution: Mandrake 10.0 (P4 2.8 w/ HT, Radeon 9700 Pro, 80 GB/120GB HDDs)
Posts: 242

Rep: Reputation: 30
How do I install the kernel sources??


I am runniung slackware 8.0 (zipslack), and I downloaded the kernel source files to compile my modem drivers into, but I don't know how to install the source...the file name is
linux-2.2.19.tar.bz2
Installpkg won't install it, it says it's corrupt, what do i do? Re-download or use another tool??
 
Old 02-18-2002, 06:00 PM   #2
el_felipe
Member
 
Registered: Dec 2001
Location: Sicily (Italy)
Distribution: DEBIAN! - (also used: Red Hat, Mandrake, Slackware, SuSE, BestLinux, EasyLinux, muLinux...)
Posts: 92

Rep: Reputation: 15
assuming linux-2.2.19.tar.bz2 is in /tmp:

1) cd /usr/src
2) tar xjf /tmp/linux-2.2.19.tar.bz2
3) mv linux linux-2.2.19
4) ln -s linux-2.2.19 linux

That's it. To compile the kernel:

1) cd /usr/src/linux
2) make mrproper
3) make xconfig

Are you sure you don't want the latest kernel available? www.kernel.org

el_felipe
 
Old 02-18-2002, 06:05 PM   #3
justiceisblind
Member
 
Registered: Jan 2002
Location: Stevens Point, WI
Distribution: Mandrake 10.0 (P4 2.8 w/ HT, Radeon 9700 Pro, 80 GB/120GB HDDs)
Posts: 242

Original Poster
Rep: Reputation: 30
I would, but that's the kernel that i have installed currently, I don't want to monkey around with new stuff right now... Thanks for the help though!
 
Old 02-18-2002, 09:34 PM   #4
justiceisblind
Member
 
Registered: Jan 2002
Location: Stevens Point, WI
Distribution: Mandrake 10.0 (P4 2.8 w/ HT, Radeon 9700 Pro, 80 GB/120GB HDDs)
Posts: 242

Original Poster
Rep: Reputation: 30
there's a problem. It's not working. Here's what i get when I try to unpack it:

tar: hmm, doesn't look like a tar archive
tar: skipping to next file header
tar: only read 7032 bytes from archive
tar: error is not recoverable: exiting now

What's up?
 
Old 02-19-2002, 05:52 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
try doing it separately

bunzip2 linux.tar.bz2
tar xvf linux.tar
 
Old 02-19-2002, 07:38 AM   #6
justiceisblind
Member
 
Registered: Jan 2002
Location: Stevens Point, WI
Distribution: Mandrake 10.0 (P4 2.8 w/ HT, Radeon 9700 Pro, 80 GB/120GB HDDs)
Posts: 242

Original Poster
Rep: Reputation: 30
thanks
 
Old 03-07-2002, 01:40 AM   #7
desbyleo
Member
 
Registered: Feb 2002
Location: Erie, CO
Distribution: Red Hat 7.1
Posts: 94

Rep: Reputation: 15
Could you explain what make mrproper does?

I've had some problems with compiling kernel and I've often seen this "make mrproper"

Could give me the concept of what this does and why is it it's done before running xconfig/menuconfig?
 
Old 03-07-2002, 09:08 PM   #8
justiceisblind
Member
 
Registered: Jan 2002
Location: Stevens Point, WI
Distribution: Mandrake 10.0 (P4 2.8 w/ HT, Radeon 9700 Pro, 80 GB/120GB HDDs)
Posts: 242

Original Poster
Rep: Reputation: 30
Ya know, I've been wondering the same thing... what does make mrproper do??
 
Old 03-07-2002, 09:19 PM   #9
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 56
You should browse Makefile, locate mrproper rule and see what it does, it wipes the slate clean and allows you to compile the kernel from scratch without any config files loaded.
 
Old 03-07-2002, 09:45 PM   #10
justiceisblind
Member
 
Registered: Jan 2002
Location: Stevens Point, WI
Distribution: Mandrake 10.0 (P4 2.8 w/ HT, Radeon 9700 Pro, 80 GB/120GB HDDs)
Posts: 242

Original Poster
Rep: Reputation: 30
Cool...thanks
 
Old 03-08-2002, 01:49 AM   #11
shadowvcd
LQ Newbie
 
Registered: Mar 2002
Posts: 2

Rep: Reputation: 0
after wiping the slate clean, you may want to run the command

make oldconfig

which creates a .config file of your current configuration. Then when you run

make xconfig

you can just add your modem drivers to your current configuration rather than trying to configure 100 things that you don't know what they mean.
 
Old 03-08-2002, 01:52 PM   #12
desbyleo
Member
 
Registered: Feb 2002
Location: Erie, CO
Distribution: Red Hat 7.1
Posts: 94

Rep: Reputation: 15
OK..this is what I've found!

Ok you guys...hear this:

After you install RH 7.1 for the first time...there's NO .config to be found anywhere (not even the /usr/src/linux directory).

Everybody probably knew that.

SO... You say (and everyone has too) to run "make oldconfig" to create a .config file of your current system configuration.

(this is where I think things don't match up...)

When I do this on my system (RH 7.1)...all it does is ask me questions about my system (more than half of which I have NO clue about...and I'm sure most newbies don't either)...so I answered the questions (y or n) as best I could....BUT of course...that's not good enough. After compiliing that config, I got a bunch of things failing at boot up. Then I just re-install RH and try again.

SO...when you guys are saying...."run the make oldconfig" to create a .config file of your current system configuration...is this what you guys had in mind??

When I first heard someone say this, this is what I imagined it would do: Linux would magically look at my current system and spit out a .config file that matches my systems current (working) condifguration without having to ask me any questions at all.

NOW, if what I just said IS the way its suppose to work...would someone please tell me. Because so far...that has not been the way it works for me.

NOW HEAR THIS, in my quest to find out what my current configuration is, I looked and looked...and found a directory in /usr/src/linux called "configs" (/usr/src/linux/configs). In here, theres a bunch of xxx.config files...and one of them named:
kernel-2.4.2-i686.config

There are others for i386, etc....but my system is i686.

SO, I looked into this config file and found this has settings that seem to match what I deemed my system to be set as. I have loaded this config file in my xconfig and have saved it (so now I have a .config file in my .usr/src/linux directory). I have yet to compile it to see if this time, my system will boot up without any problems. As soon as I do...I'll post....

Any feedback is greatly appreciated!

Last edited by desbyleo; 03-08-2002 at 01:56 PM.
 
Old 03-11-2002, 12:36 PM   #13
desbyleo
Member
 
Registered: Feb 2002
Location: Erie, CO
Distribution: Red Hat 7.1
Posts: 94

Rep: Reputation: 15
IT WORKS!

Yeah, those kernel*.config files found in /usr/src/linux-x.x/configs does work when you compile using them.

Be warned: These config files will practically turn on everything in your system, so compile time increases tremendously.

The upside: For those of you who don't have a working copy of a .config file for your system, can use this a basis. Then, later on turn off those options you're not using. And those you aren't sure of, use trial and error to figure it out - if something goes wrong, just turn it back on.

Anyhow, how this helped me:

My situation was: I'm trying to configure IP MASQ, but the process includes patching my kernel. That, of course, meant also compiling. My problem was: At compile time, since I didn't have a .config file, compiling would create one for me by asking me all this questions about my system (half of which I knew nothing about). OR, if I did go into xconfig or menuconfig before I compiled, it creates a .config file that doesn't reflect my current system. Therefore, after compilation, I was left with a bad kernel.

Using these kernel*.config files (although generic) gave me a working configuration. So when I patched my kernel, I used these .config files when I compiled the kernel.

Any feedback would be greatly appreciated...as always.
 
  


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
need to install full kernel sources? vbguru12000 Debian 9 10-25-2005 01:33 PM
Install kernel sources? cheesekeeper Fedora 2 02-04-2005 06:05 AM
where to dl (and how to install) kernel 2.4.25 sources in MDK 10 shenlong Mandriva 3 04-04-2004 01:01 PM
Help!!! Cannot install the kernel sources!!! RJARRRPCGP Linux - Newbie 3 02-15-2004 10:14 PM
I didn't install full kernel sources? nutshell Linux - General 6 05-08-2003 12:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:18 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