LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 11-15-2011, 07:27 PM   #1
dcroxton
Member
 
Registered: Apr 2004
Distribution: Ubuntu Jaunty
Posts: 91

Rep: Reputation: 16
Wrong kernel headers


Some time back, Ubuntu automatically switched me from a "-generic" kernel to a "-generic-pae" kernel. The problem is, it didn't update the repository dependencies with it. Therefore, every time the kernel gets updated, I have to go in through a recovery console to download the proper headers so my nvidia driver works.

I'm not going to ask why Ubuntu doesn't get the correct kernel headers automatically, but I would like to know how I can fix it: how can I set the kernel headers package to depend on the "-generic-pae" version rather than the "-generic" version that it is set to now?
 
Old 11-16-2011, 03:35 AM   #2
fortran
Member
 
Registered: Nov 2011
Location: Cairo, Egypt
Distribution: CentOS, RHEL, Fedora
Posts: 300
Blog Entries: 2

Rep: Reputation: 51
Remove it from synaptic package manager.
 
Old 11-16-2011, 04:32 AM   #3
fotoguy
Senior Member
 
Registered: Mar 2003
Location: Brisbane Queensland Australia
Distribution: Custom Debian Live ISO's
Posts: 1,291

Rep: Reputation: 62
I know your not afer this answer, but you don't need to change the header files, The reason why the kernel hearders aren't updated, is to do with the version gcc was originally compiled with. There is no reason to change from the original kernel headers, even when changing the kernels, you can still compile modules to the old kernel headers. If you do change them, you can run into compiling problems

Last edited by fotoguy; 11-16-2011 at 04:35 AM.
 
Old 11-16-2011, 04:56 AM   #4
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
Yes, Synaptic is probably the best route for you.

I am more interested in how "Ubuntu automatically" did this for you. Does someone from Canonical do your update/upgrade cycles remotely? If you have that kind of support I would let them straighten it out.

If not, then you had to approve the update/upgrade that did this. If you are using automatic update/upgrades then you approved anything Update Mangler wants to do without even worrying about looking at the stuff before it is done.

If you use Update Mangler manually you had to approve the stuff then. Read carefully what it is doing.

I suggest you start using a real package manager like Synaptic to do your update/upgrades. It gives you more information. You do have to read it for it to do you any good.

Better would be to use apt-get or aptitude as they show you everything. Of coarse if you want aptitude you will have to install it as Ubuntu, knowing folks don't want to know anything about what is going on leave it out of the default install now.

"aptitude safe-upgrade" is probably the safest way to avoid problems.
 
Old 11-16-2011, 10:20 AM   #5
dcroxton
Member
 
Registered: Apr 2004
Distribution: Ubuntu Jaunty
Posts: 91

Original Poster
Rep: Reputation: 16
Thanks for the replies.

OK, so I don't read the update information too carefully. When I do a distribution upgrade, I don't want to verify the 100+ packages that get updated. I upgrade so I can keep up with the distribution, without which you fall behind in software versions.

Anyway, I don't care that it changed my kernel to the pae version. What bothers me is that it didn't change the headers package to match. I don't understand why I wouldn't need to update the headers as fotoguy says -- what I know is that every time the kernel version changes, I end up with the headers for the wrong kernel (same number, but not pae), and my nvidia drivers don't work. I can't get into an X session. Once I get the matching headers installed, nvidia works. This probably also affects VirtualBox and I don't know what else, but since I can't do anything until I get the proper headers, I never get to see them fail.

I thought there was some way of setting dependencies so that the headers would always match the kernel version. Isn't there some "linux-kernel-headers" package that always depends on the latest installed kernel package? (I'm not on my Linux box at the moment, so I can't check.) I could check Update Manager and disallow it to change the kernel, but that's not really what I want: I just want it to change both the kernel and the headers at the same time.
 
Old 11-16-2011, 10:40 AM   #6
snowday
Senior Member
 
Registered: Feb 2009
Posts: 4,667

Rep: Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411
Quote:
Originally Posted by dcroxton View Post
Isn't there some "linux-kernel-headers" package that always depends on the latest installed kernel package?
Yes there is. "linux-headers-generic" or "linux-headers-generic-pae". Check to see that you have the correct one installed.
 
Old 11-22-2011, 05:24 PM   #7
dcroxton
Member
 
Registered: Apr 2004
Distribution: Ubuntu Jaunty
Posts: 91

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by snowpine View Post
Yes there is. "linux-headers-generic" or "linux-headers-generic-pae". Check to see that you have the correct one installed.
Whoa, that was smart. You might even think I could have figured it out. Thanks.
 
  


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
Trying to install ethernet adapter driver, not finding kernel-devel or kernel-headers oneFishtwoFish Red Hat 5 08-31-2010 06:24 PM
Zypper wants to dl the wrong kernel headers... YaST doesnt have current headers zorb SUSE / openSUSE 2 11-28-2009 11:12 AM
What so wrong about my mail headers? /a newbie question/ GSMD Linux - Networking 8 05-30-2006 10:13 AM
rhel put kerberos headers in wrong place Ratclaws Linux - Enterprise 0 12-09-2005 11:57 AM
Installing Modem Drivers (wrong RM headers I fear)? r3sistance Linux - Newbie 1 12-13-2004 06:51 PM

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

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