Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
This one weird trick solved all my kernel version problems
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
jesnow
Guru
Guru


Joined: 26 Apr 2006
Posts: 588

PostPosted: Tue Apr 07, 2015 1:47 am    Post subject: This one weird trick solved all my kernel version problems Reply with quote

Sorry about the subject line.

I like keeping a kernel version around for a while (I hung onto 3.14.16 for months after it was out of portage), but if you don't watch out, portage will remove it for you when you do a normal emerge --depclean. I'm just dumb enough that I forget to not let that happen.

The way round it is to get the particular slot of the kernel you like into your world file, like this:

Code:
 # emerge --noreplace sys-kernel/gentoo-sources:3.14.16


Now 3.14.16 will not be touched by emerge --depclean, but newer kernel versions can come and go, until I build my next stable kernel and do the same.

A good reason to do this is sloth, I just don't want to change my kernel until I have to, and by then the sources are no longer in portage. Also, I have to install third party drivers each time and that's a pain, so I do it as infrequently as I can.

And I lost 10 pounds of belly fat.
Back to top
View user's profile Send private message
fpemud
Apprentice
Apprentice


Joined: 15 Feb 2012
Posts: 276

PostPosted: Tue Apr 07, 2015 8:58 am    Post subject: Reply with quote

Put this in /etc/portage/make.conf:
Code:
UNINSTALL_IGNORE="${UNINSTALL_IGNORE} /usr/src/linux-*"

Then portage won't touch any old linux source code. It is the recommended way to solve this problem.
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10280
Location: Somewhere over Atlanta, Georgia

PostPosted: Tue Apr 07, 2015 10:33 am    Post subject: Reply with quote

fpemud wrote:
Put this in /etc/portage/make.conf:
Code:
UNINSTALL_IGNORE="${UNINSTALL_IGNORE} /usr/src/linux-*"

Then portage won't touch any old linux source code. It is the recommended way to solve this problem.
No, it's not. jesnow has got it exactly right. Well, except for the sloth part. :wink:

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
Dr.Willy
Guru
Guru


Joined: 15 Jul 2007
Posts: 498
Location: NRW, Germany

PostPosted: Tue Apr 07, 2015 12:43 pm    Post subject: Reply with quote

I don't think having portage handle kernels doesn't provide any benefit at all.
You save a bit of effort on the installing side and have a bit of additional effort on the uninstalling side.
Back to top
View user's profile Send private message
jesnow
Guru
Guru


Joined: 26 Apr 2006
Posts: 588

PostPosted: Wed Apr 08, 2015 12:37 pm    Post subject: Reply with quote

Thank you, though I think this works too, I didn't know about it. My only reservation would be the accumulation of old sources in /usr/src. And which one of these 10 has all its compiled-in drivers? My way I always have just the sources I invested time in, plus the latest set for when I need to change something.


John R. Graham wrote:
fpemud wrote:
Put this in /etc/portage/make.conf:
Code:
UNINSTALL_IGNORE="${UNINSTALL_IGNORE} /usr/src/linux-*"

Then portage won't touch any old linux source code. It is the recommended way to solve this problem.
No, it's not. jesnow has got it exactly right. Well, except for the sloth part. :wink:

- John
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum