LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Can I remove old kernel sources after kernel upgrade(to 2.6.17.13) on Slackware 11? (https://www.linuxquestions.org/questions/slackware-14/can-i-remove-old-kernel-sources-after-kernel-upgrade-to-2-6-17-13-on-slackware-11-a-551082/)

ErV 05-03-2007 04:10 PM

Can I remove old kernel sources after kernel upgrade(to 2.6.17.13) on Slackware 11?
 
Hello.
I have following qustion(s):
About a month or two ago I've manually upgraded kernel from version 2.4.33.3 to 2.6.17.13. The new kernel was built from sources. Recently I've found that sources for old kernel are still here (in /usr/src/linux-2.4.33.3), and /usr/src/linux is symlink for /usr/src/linux-2.4.33.3. Since this is an old kernel, can I (safely) remove this directory (this will break /usr/src/linux symlink)? And should I make a /usr/src/linux a symlink to a new kernel sources? Does something rely on this directory (so I must not change it)?

I just need some clarification - since it is an old kernel sources, it should not be very useful (in an ideal case), but I've seen an info(http://linuxmafia.com/faq/Kernel/usr...x-symlink.html) that glibc uses /usr/src/linux, so /usr/src/linux shouldn't be changed....

erklaerbaer 05-03-2007 04:20 PM

i think that is outdated. you can safely remove the old kernel source.

BCarey 05-03-2007 06:59 PM

It would be better if you use "removepkg /var/log/packages/kernel-source-2.4*" rather than just deleting the directory. That way you keep your /var/log/packages up to date.

Brian

ErV 05-04-2007 03:31 AM

Ok, I've removed old kernel sources and nothing bad happened :)

However, there is another question: It looks like i've managed to install two different versions of kernel headers in /usr/include/linux (in same directory), and I'm not sure which of them was overwritten. Do I need to change them too (o make them match kernel), or I shouldn't touch this directory?

itz2000 05-04-2007 03:49 AM

Quote:

Originally Posted by ErV
Ok, I've removed old kernel sources and nothing bad happened :)

However, there is another question: It looks like i've managed to install two different versions of kernel headers in /usr/include/linux (in same directory), and I'm not sure which of them was overwritten. Do I need to change them too (o make them match kernel), or I shouldn't touch this directory?

why would anything bad happen?
the kernel boots from the vmlinuz image anyways. you can even delete the current source, but it's not recommended cause next time you'll have to download the whole kernel .bz2 instead of only the patch.

ErV 05-04-2007 04:13 AM

Quote:

Originally Posted by itz2000
why would anything bad happen?

I just wasn't sure if this directory was used by something (gcc, for example) or not. I've posted a link to an article that caused doubts before...

erklaerbaer 05-04-2007 10:21 AM

Quote:

Originally Posted by ErV
Ok, I've removed old kernel sources and nothing bad happened :)

However, there is another question: It looks like i've managed to install two different versions of kernel headers in /usr/include/linux (in same directory), and I'm not sure which of them was overwritten. Do I need to change them too (o make them match kernel), or I shouldn't touch this directory?

remove them both, and reinstall the one that fits your glibc ( for 11.0 that'd be kernel-headers-2.4.33 )

ErV 05-04-2007 12:06 PM

Quote:

Originally Posted by erklaerbaer
remove them both, and reinstall the one that fits your glibc ( for 11.0 that'd be kernel-headers-2.4.33 )

Ok, will do that.

I guess that it's all - problem solved, question answered.

Thanks for everyone who posted a reply.:)


All times are GMT -5. The time now is 11:28 AM.