LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-04-2004, 11:34 PM   #1
zexter
Member
 
Registered: Oct 2003
Location: Saint Louis, Missouri
Distribution: Mandrake 10 Official
Posts: 210

Rep: Reputation: 30
installing source


in order for me to install my graphics driver i have to install the kernel's source... how would i do this?

and is this what i need to install... linux-2.6.8.1.tar.bz2
im running mandrake 10.1 community

someone please help me out here!

Last edited by zexter; 11-04-2004 at 11:43 PM.
 
Old 11-05-2004, 01:36 AM   #2
CroMagnon
Member
 
Registered: Sep 2004
Location: New Zealand
Distribution: Debian
Posts: 900

Rep: Reputation: 33
Your drivers will probably want the source for the kernel you're running. The best thing to do is grab the mandrake RPM package for your kernel source, rather than downloading the pure tarball from kernel.org (or whatever).
 
Old 11-05-2004, 01:39 AM   #3
zexter
Member
 
Registered: Oct 2003
Location: Saint Louis, Missouri
Distribution: Mandrake 10 Official
Posts: 210

Original Poster
Rep: Reputation: 30
where would i get that? and what would i do with it once i have it?
 
Old 11-05-2004, 02:02 AM   #4
CroMagnon
Member
 
Registered: Sep 2004
Location: New Zealand
Distribution: Debian
Posts: 900

Rep: Reputation: 33
Doesn't mandrake have some nice GUI package selection software? Have a look for that first, since it will probably make the process completely painless. Otherwise, head to this link:
http://rpms.mandrakeclub.com/rpms/ma...2mdk.i586.html
and download the file on the source rpm link, then install it via rpm (it's pretty likely you will just be able to double-click the file).
 
Old 11-05-2004, 05:21 AM   #5
DaneM
Member
 
Registered: Oct 2003
Location: Chico, CA, USA
Distribution: Linux Mint
Posts: 881

Rep: Reputation: 130Reputation: 130
Here's the deal...

Hi, everybody. The first thing I'd like to know is which driver you're installing? ATI? nVidia? Each has its own eccentricities and dependancies.

Personally, I'd download a stock kernel from www.kernel.org unless you have one on hand that you KNOW will work with these drivers. Stay away from versions 2.6.8 and 2.6.9. They have some pretty nasty bugs. I find that 2.6.7 is the best so far. Here are some steps that will get you pointed in the right direction.

1) go to ftp://ftp.kernel.org/pub/linux/kernel/v2.6/ and download kernel version 2.6.7
2) copy it to your /usr/src directory
3) cd /usr/src
4) decompress and un-tar it using either "tar -zxvf linux-2.6.7.tar.gz" or "tar -jxvf linux-2.6.7.tar.bz2".
5) cd linux (the directory of your current kernel) (if this doesn't work, don't sweat it)
6) cp .config* ../linux-2.6.7 (if this doesn't work, don't sweat it)
7) cd /usr/src/linux-2.6.7
8) make clean
9) make oldconfig (again, if this doesn't work, don't sweat it)
10) make xconfig
11) TAKE YOUR TIME and pick all the options that your computer might even think about using (you can go back and clean up later if you want). A check mark means compiled into kernel, a dot means loaded as a module. For most things you're better off compiling into kernel.
12) edit /etc/lilo.conf (assuming you use lilo; take similar steps for grub) and add a new entry identical to your current one for an image at "/boot/vmlinuz-2.6.7". Name it whatever you want. KEEP YOUR OLD ENTRY IN CASE THIS DOESN'T WORK!
13) type "lilo" (or do something similar for grub)
14) (in /usr/src/linux-2.6.7) make
15) make modules
16) make modules_install
17) make bzImage
18) cd arch/i386/boot
19) cp bzImage /boot/vmlinuz-2.6.7
20) cross your fingers and reboot into new kernel
21) tweak with it until it works the way you want it to. (Check LQ for help on this.)

Of course, if the instructions for your video driver say to do something along the way, be sure to do it. Most video drivers require a pretty recent kernel, but if not you might be able to get away with skipping some of the above.

Good luck!

==Dane
 
Old 11-05-2004, 05:33 AM   #6
CroMagnon
Member
 
Registered: Sep 2004
Location: New Zealand
Distribution: Debian
Posts: 900

Rep: Reputation: 33
Wow... I can't quite believe someone recommending compiling a kernel (older than the one installed by his distro) for a user that isn't sure how to use his package manager, because of "some pretty nasty bugs". I've compiled and used 2.6.8 and 2.6.9 with no problems - I think it would be best to detail what these bugs are before you start second-guessing Mandrake. Besides that, the kernel installed by Mandrake was likely patched (hence the 12mdk suffix) to work better with the system - I don't think I would follow that advice without more justification.
 
Old 11-05-2004, 05:59 AM   #7
DaneM
Member
 
Registered: Oct 2003
Location: Chico, CA, USA
Distribution: Linux Mint
Posts: 881

Rep: Reputation: 130Reputation: 130
Understandable, CroMagnon.

Unless it's been patched (which I don't know if a patch exists yet), the main problems are a memory leak and broken CD reading-burning in both of the newer kernels. To test it, try to use mkisofs to make an image of a directory that's about as big as your RAM, or larger (650 MB or so). Open top or some other monitoring program in another window. As files pass from hard drive to RAM and back to the hard drive, the amount of RAM used will continually increase until ALL of the actual memory and swap memory are completely used up. At that point you'll find yourself unable to do anything useful with your computer until you restart. Going to init 1 and back to 3/5 again helps to some degree, but there will be several hundred MB of ram lost nonetheless.

In other kernels, RAM is used until the amount available becomes low, at which point the RAM that ought to be free will be used like a kind of virtual swap partition, and the computer will theoretically never run out of it to the point where the computer freezes. (To the best of my understanding)

The CD reading/writing bug I'm not as clear on, but I've read that kernels 2.6.8 and 2.6.9 refuse certain function calls and thus makes it impossible to use certain programs to write CDs. K3b and Xcdroast have been reported to have problems.

I'd actually be interested in knowing whether those kernels are patched in Mandrake 10.1, so if you get around to it please post your test results!

--Dane
 
Old 11-05-2004, 07:42 AM   #8
bigjohn
Senior Member
 
Registered: Jun 2002
Location: UK .
Distribution: *buntu (usually Kubuntu)
Posts: 2,692
Blog Entries: 9

Rep: Reputation: 45
Am I right in thinking that this is an Nvidia driver issue?

If so, then you should need to mess around too much.

For mandrake, it's like this.

(1)Open a terminal (konsole or whatever you call it) then
Code:
uname -r
That gives you the exact kernel version - which for mandrake, is a "mandrakised" version.

(2)Then, open a browser and go to easy urpmi, then, using the drop down options read and follow the instructions for your distro.

It's usually best if you make sure that you have sources selected for main, contrib, updates, plf and jpackage (i.e. all of them, but you shouldn't need to select the "show specific sources too" option). You'll probably be better situated if you select mirrors closest to your location i.e. the same country is usually best, though not necessarily, as although I'm in the UK, I usually get the best results from the Dutch and various Scandanavian mirrors!

Anyway, after you've got to the stage 3 section, you have a bit of command line input to cut/copy and paste into a terminal/konsole/whatever - it normally has to be done as root. also, once you've done the cut/copy and paste it usually starts updating the sources automatically, though depending on your config, you may just have to hit enter + if it happens to stop, or just won't go any further ,you may find that you have to run the easy urpmi process just for the source that the updating has stopped/not worked with as it usually means that for what ever reason your system hasn't managed to access the mirror.

(3) Once the updating of sources has completed, you'll need to go into the the Mandrake Control Centre (MCC aka "Configure my computer")>software manager>updates, and run the updates so you can see what needs updating on your system (if anything). If you already have some kernel-sources installed, but they are the incorrect ones, the version you require will show in the updates section. If you don't have any installed at all, then you'll have to look in the "install software section" instead of the "update" section. If you then ask it to show you "all packages alphabetically" you just scroll down to kernel-sources-2.x.xx.mdk and tell it to install.

(4) Once you've got the kernel sources that match the kernel version you're running, you just download the nvidia driver and follow the instructions in the readme about how to run the script and what changes you have to make to your X server (beit Xfree or Xorg - I suspect that with mandrake 10.1 it should be Xorg now).

You know if you've got it right, as you normally get an Nvidia splash screen during boot up process (A bright white screen with Nvidia logo in black/green you can't miss it!).

If I've guessed wrongly and it's the ATI driver you're trying to install, then sorry for wasting your time!


HTH

regards

John
 
Old 11-05-2004, 10:27 PM   #9
CroMagnon
Member
 
Registered: Sep 2004
Location: New Zealand
Distribution: Debian
Posts: 900

Rep: Reputation: 33
Quote:
To test it, try to use mkisofs to make an image of a directory that's about as big as your RAM, or larger (650 MB or so). Open top or some other monitoring program in another window. As files pass from hard drive to RAM and back to the hard drive, the amount of RAM used will continually increase until ALL of the actual memory and swap memory are completely used up.
Very interesting, but I think the problem must be more specific than that, possibly even unrelated to the kernel. Reason being, I use mkisofs quite frequently to make DVD ISO images under 2.6.9 (I believe I had 2.6.8.1 installed previously, but I may be mistaken). I can assure you that I don't have 4.5GB of RAM + swap! I have burnt few CDs under linux, but the ones I did were all as close to full as I could make them. I haven't had to reboot or even change runlevels to make the system usable, and although my RAM+swap does exceed 700MB, it's not by much (768), and I'm sure it would have caused problems with KDE and my other apps running...

What version of mkisofs was that, and were you using an IDE or SCSI burner? I use an IDE burner (can't check the mkisofs version right now, but it would be whatever was current in Debian testing about 1 month ago)
 
Old 11-06-2004, 02:59 AM   #10
DaneM
Member
 
Registered: Oct 2003
Location: Chico, CA, USA
Distribution: Linux Mint
Posts: 881

Rep: Reputation: 130Reputation: 130
Hmmm...Maybe it was just kernel 2.6.8. Check on the k3b and xcdroast websites. I'm not booted into Linux right now, so I can't tell you the mkisofs version. I use a SCSI (emulated) burner. I ran some pretty rigorous tests while running 2.6.8 and there was definately a memory leak. When I boot into 2.6.7 the problem's gone. Same options are compiled in both versions.

Anyhow, if all this mucking around with the kernel isn't necessary with your particular driver, then don't bother ;-) .

Have a good one.

--Dane
 
Old 11-06-2004, 03:49 AM   #11
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
The kernel source is in the kernel-source package.

as root type:
urpmi kernel-source
 
Old 11-07-2004, 04:53 PM   #12
CroMagnon
Member
 
Registered: Sep 2004
Location: New Zealand
Distribution: Debian
Posts: 900

Rep: Reputation: 33
I have found mentions of the leak DaneM was talking about, and it seems to have been fixed in 2.6.9 (bio_uncopy_user, mentioned in the changelog). Apparently it only manifested itself when burning audio CDs, which might explain why I haven't seen it - I only burnt mp3 CDs for my car.
 
  


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
apt-get kernel-source is installing the wrong kernel source. JordanH Ubuntu 10 07-08-2005 06:42 PM
Installing from source...??? JNaas Linux - Newbie 8 10-28-2004 06:36 PM
Installing from source Mahoot Linux - Software 3 09-03-2003 03:50 AM
Installing from source? cclavey Linux - Software 6 03-29-2003 11:19 PM
Installing X from source Config Linux - Software 7 07-11-2002 10:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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