LinuxQuestions.org
Visit Jeremy's Blog.
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 05-22-2011, 11:51 PM   #1
piratesmack
Member
 
Registered: Feb 2009
Distribution: Slackware, Arch
Posts: 519

Rep: Reputation: 138Reputation: 138
Accidentally upgraded kernel-headers, should I downgrade?


When I first did my install of Slackware 13.37, I installed the 2.6.38.4 kernel from /testing.

I did a "upgradepkg testing/kernel*.t?z"

Well just now I realized that there was a kernel-headers package in /testing, and I've heard that you should only use the kernel headers that glibc was compiled with.

So did I make a mistake installing the kernel-headers from /testing?
And if I revert back to the stock kernel-headers package, will I have to recompile all the programs I've compiled with the 2.6.38.4 headers?

Thanks

Last edited by piratesmack; 05-23-2011 at 05:56 AM.
 
Old 05-23-2011, 12:44 AM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1 on Lenovo Thinkpad W520
Posts: 8,752

Rep: Reputation: Disabled
Just to be safe, I would 'upgradepkg /linux-13.37_mirror/slackware/d/kernel-headers-2.37.6_smp-x86-2.txz'.

But may be you should wait for an answer with a sounder rationale

Last edited by Didier Spaier; 05-23-2011 at 12:51 AM.
 
1 members found this post helpful.
Old 05-23-2011, 05:04 AM   #3
GazL
Senior Member
 
Registered: May 2008
Posts: 4,949
Blog Entries: 15

Rep: Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539
My assumption was that when Pat built these packages he just renumbered them because of this requirement to keep headers at the appropriate level for the installed version of glibc, however a quick explodepkg and diff of the provided 37.6 v 38.4 kernel-headers packages do show a number of differences suggesting that my assumption was way off the mark.

There was a thread in this forum about a year back about kernel headers which eventually died out without really providing a definitive answer to this question.

General wisdom seems to say that you shouldn't update your kernel headers, but Pat's kernel-header packages clearly do.


The reason I'm interested in this subject is that I use my own kernels as the officially provided kernels tend to go out of upstream support very quickly. I don't install updated kernel headers when I update my kernel because of this idea that headers should match glibc. I guess the reason my system continues to work is that upstream keep new kernels backward compatible with stuff built against older headers.

When I go to 2.6.39 I might do a headers install and rebuild glibc this time and see if I hit any issues. I've not really wanted to do this before because if I change too much then I'll reach a point where I'm no longer running Slackware, but GazLware, though doing that for a while might be an interesting learning exercise.


Anyway, setting all that aside, I don't think Pat would provide a headers package in testing/ that wouldn't work, so you're probably safe using it even though this does appear to fly in the face of this 'general wisdom on headers'.
 
1 members found this post helpful.
Old 05-23-2011, 05:33 AM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4863Reputation: 4863Reputation: 4863Reputation: 4863Reputation: 4863Reputation: 4863Reputation: 4863Reputation: 4863Reputation: 4863Reputation: 4863Reputation: 4863
I am somewhat confused about this topic. I run a custom 2.6.38.6 on my main machine (/usr/src/linux points to the directory with the new sources), but have the original kernel headers installed. Can that lead to any problems? If so, how do I correct that without reverting to the original kernel?
 
Old 05-23-2011, 05:58 AM   #5
GazL
Senior Member
 
Registered: May 2008
Posts: 4,949
Blog Entries: 15

Rep: Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539
Tobi,

The /usr/src/linux symlink isn't of any value these days and is not used for the headers. In fact, I delete mine completely as it serves no purpose.

Just to be clear:
I'm currently using my own .38.7 kernel with Pat's 38.4 headers package from testing/
The only reason I'm running those headers is that I updated to Pat's 38.4 kernel (just like piratesmack did) a while back prior to switching to my own custom kernel.

As a rule, I don't update my headers when I install a custom kernel, and if I hadn't tried Pat's 38.4 packages I'd still have 37.6 headers installed. In all honestly, I wasn't expecting there to be any difference between the packaged 37.6 and 38.4 headers - That came as a bit of a surprise.

Last edited by GazL; 05-23-2011 at 06:28 AM. Reason: added clarification.
 
1 members found this post helpful.
Old 05-23-2011, 06:50 AM   #6
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4863Reputation: 4863Reputation: 4863Reputation: 4863Reputation: 4863Reputation: 4863Reputation: 4863Reputation: 4863Reputation: 4863Reputation: 4863Reputation: 4863
GazL: Thanks for that clarification.
 
Old 05-23-2011, 11:45 PM   #7
piratesmack
Member
 
Registered: Feb 2009
Distribution: Slackware, Arch
Posts: 519

Original Poster
Rep: Reputation: 138Reputation: 138
Thanks for the replies everybody.

I have not experienced any trouble with the 38.4 headers, but I think I'll go back to the 37.6 headers until I understand this better.
 
Old 05-24-2011, 02:49 AM   #8
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291
Technically, you shouldn't update them unless you have a reason to. But then, why are they there in /testing ? I don't know.
 
Old 05-24-2011, 05:41 AM   #9
disturbed1
Senior Member
 
Registered: Mar 2005
Location: USA
Distribution: Slackware
Posts: 1,133
Blog Entries: 6

Rep: Reputation: 223Reputation: 223Reputation: 223
Quote:
Originally Posted by GazL View Post
Tobi,

The /usr/src/linux symlink isn't of any value these days and is not used for the headers. In fact, I delete mine completely as it serves no purpose.
The symlink does not serve any purpose, but the original build location does. If you build in one directory, and then either remove or move that directory, things that build against the kernel's source headers will fail. This location is read from applications that need to link/read/use the kernel source headers- such as out of tree modules (Nvidia), or other applications (mjpegtools, MythTV ...). If you don't pass which kernel to build against, the application assumes the current running kernel, and gets the source location from /lib/modules/$KERNEL/source <-- which is a symlink to the actual source location at build time.

Slackware's kernel headers package has a strange name. As it is actually not the kernel's headers (at one time they were a kernel's headers though ). Better name might be glibc-headers? I think a simple renaming of this package would cut down on a bit confusion it currently causes. Kernel headers are also located in Slackware's kernel-source package, but these serve a different purpose than the (glibc)kernel-headers package. Perhaps some of the confusion comes for the fact that some Distro simply link /usr/src/linux/include/{linux,asm} to /usr/include, others do call the package libc headers, and Slackware simply call them kernel headers. Now I'm getting confused
 
Old 05-24-2011, 07:06 AM   #10
lumak
Member
 
Registered: Aug 2008
Location: Phoenix
Distribution: Arch
Posts: 799
Blog Entries: 32

Rep: Reputation: 111Reputation: 111
@ "source" headers

Apparently, from what I've seen of other such posts, is that distros are supposed to "sanitize" the source tree as well and have this as a seperate package from the kernel source so what you can do such things as compile the nVidia drivers without actually having the source. This is also the cause of the symlink to /usr/include since they can be used there as well.

This looks like the following is supposed to be run...
Code:
make clean - keeps enough of the generated files to compile kernel modules
make headers_install - install sanitized headers to INSTALL_HDR_PATH
This implys that not even the kernel recommends using <exactly> the same headers for the source tree and the /usr/include headers.

Unfortunatly this still doesn't answer the glibc problem.
 
Old 05-24-2011, 07:23 AM   #11
GazL
Senior Member
 
Registered: May 2008
Posts: 4,949
Blog Entries: 15

Rep: Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539
Quote:
Originally Posted by disturbed1 View Post
Perhaps some of the confusion comes for the fact that some Distro simply link /usr/src/linux/include/{linux,asm} to /usr/include, others do call the package libc headers, and Slackware simply call them kernel headers. Now I'm getting confused
Yep, I'm aware of the old practice of linking /usr/src/linux/include/... into /usr/include, but that practice has been discouraged for quite a long time now, and I'd be very surprised to find any of the major distros still doing that. That's not what I'm confused about.

The confusion surrounds the question: Why are the headers contained within testing/kernel-headers-2.6.38.4*.txz different to those in kernel-headers-2.6.37.6*.txz when they both share the same glibc build, and when the general wisdom says that the kernel headers should remain at the version that was used to build glibc.

I get the feeling that this 'general wisdom' isn't the whole story but just the safest option because new kernels are compatible with older executables and libraries built against older headers. If you update the headers then you may need to rebuild some libraries. I don't see why glibc would be a special case as it's quite possible for other libraries to also use kernel features/headers directly which may be subject to change. Perhaps Pat's just been lucky so far when updating them.

The whole topic seems quite messy.
 
1 members found this post helpful.
Old 05-24-2011, 07:54 AM   #12
disturbed1
Senior Member
 
Registered: Mar 2005
Location: USA
Distribution: Slackware
Posts: 1,133
Blog Entries: 6

Rep: Reputation: 223Reputation: 223Reputation: 223
Quote:
Originally Posted by GazL View Post
The confusion surrounds the question: Why are the headers contained within testing/kernel-headers-2.6.38.4*.txz different to those in kernel-headers-2.6.37.6*.txz when they both share the same glibc build, and when the general wisdom says that the kernel headers should remain at the version that was used to build glibc.
It does buck the general posts about the subject that's been beaten into our heads over the years.

My post wasn't directed towards you. Just a general post for others that browse by. I can imagine someone interpreting delete the link as deleting the actual source tree

Last edited by disturbed1; 05-24-2011 at 08:02 AM.
 
1 members found this post helpful.
Old 05-24-2011, 08:35 AM   #13
GazL
Senior Member
 
Registered: May 2008
Posts: 4,949
Blog Entries: 15

Rep: Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539Reputation: 2539
Quote:
Originally Posted by disturbed1 View Post
My post wasn't directed towards you. Just a general post for others that browse by. I can imagine someone interpreting delete the link as deleting the actual source tree
Fair enough. My point was that the /usr/src/linux symlink wasn't necessary and that is what I was referring to, not suggesting anyone delete the /usr/src/linuix-$version contents, but yes, it's probably a good idea to make that point explicitly to save anyone from making a mistake. Thanks for mentioning that.

Going slightly off-topic, but still talking about what you've been referring to:
I've been considering changing the way I build my kernels to use the make O= option to keep the source pristine, but I'm not sure how best to handle these build and source symlinks under /lib/modules/$uname -r). I've seen some distros actually copy the contents across rather than rely on the symlinks, but I'm not sure how much would need copying (wouldn't want to have to copy the entire tree as that could get a little large).
 
Old 05-24-2011, 02:15 PM   #14
regis_n_bits
Member
 
Registered: Mar 2006
Distribution: Slackware64-current (kernel 4.19.5)
Posts: 94

Rep: Reputation: Disabled
Gazl, you shouldn't need to worry about the symlinks, or copying files, if you set the destination of your make command to a directory that does not get deleted.

I created a directory called /usr/local/builds just for use with kernel building. Each kernel build goes into its own separate sub-directory (e.g. /usr/local/builds/2.6.38.7-abc). You just have to remember to use the "O=/usr/local/builds/2.6.38.-abc" for all of your make commands. The symlinks will end up pointing to this new directory (no need to change symlinks or copy files).

As long as the this build directory remains intact (and the kernel source code exists too), you shouldn't have any problems.

The original kernel source code remains pristine (although you may need to run make mrproper once).
 
2 members found this post helpful.
  


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
[9.10] Kernel upgraded, but won't install headers? littlebigman Ubuntu 3 08-24-2010 06:50 AM
Zypper wants to dl the wrong kernel headers... YaST doesnt have current headers zorb SUSE / openSUSE 2 11-28-2009 11:12 AM
FC6 kernel issue, how to downgrade kernel? ACDII Fedora 10 03-21-2007 09:08 AM
ACX100 TI chipset WIFI card 2.6.14 Kernel, downgrade kernel? fieldyweb Linux - Wireless Networking 1 02-11-2006 03:56 AM
Downgrade kernel ,dual kernel boot beep_beep Linux - Software 0 08-17-2004 01:25 AM

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

All times are GMT -5. The time now is 01:13 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration