Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to add existing kernels into eslect kernel list?[solved]
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
diablo465
Apprentice
Apprentice


Joined: 10 Sep 2013
Posts: 194

PostPosted: Wed Feb 04, 2015 11:45 pm    Post subject: How to add existing kernels into eslect kernel list?[solved] Reply with quote

I have several kernels located in the /usr/src/ folder, while only one of them is listed in eselect kernel list. How can I add them back into the kernel list?

Code:
ae429-1105 src # eselect kernel list
Available kernel symlink targets:
  [1]   linux-3.17.8-gentoo-r1 *



Code:
ls -l
total 20
lrwxrwxrwx  1 root root   22 Feb  5 09:04 linux -> linux-3.17.8-gentoo-r1
drwxr-xr-x 20 root root 4096 Nov 23 17:06 linux-3.10.25-gentoo
drwxr-xr-x 20 root root 4096 Nov 23 17:04 linux-3.12.13-gentoo
drwxr-xr-x 20 root root 4096 Feb  2 14:47 linux-3.12.21-gentoo-r1
drwxr-xr-x 20 root root 4096 Feb  5 08:47 linux-3.17.7-gentoo
drwxr-xr-x 25 root root 4096 Feb  5 09:06 linux-3.17.8-gentoo-r1


Last edited by diablo465 on Thu Feb 05, 2015 6:08 am; edited 1 time in total
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: Wed Feb 04, 2015 11:47 pm    Post subject: Reply with quote

They may no longer be installed. What's the output of
Code:
equery list -i gentoo-sources
(run as root)?

- 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
diablo465
Apprentice
Apprentice


Joined: 10 Sep 2013
Posts: 194

PostPosted: Wed Feb 04, 2015 11:52 pm    Post subject: Reply with quote

John R. Graham wrote:
They may no longer be installed. What's the output of
Code:
equery list -i gentoo-sources
(run as root)?

- John


Code:

ae429-1105 lib # equery list -i gentoo-sources
 * Searching for gentoo-sources ...
[IP-] [  ] sys-kernel/gentoo-sources-3.17.8-r1:3.17.8-r1


I do wish to make the old kernel work as a backups.
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: Thu Feb 05, 2015 12:03 am    Post subject: Reply with quote

Well, unfortunately (or not, depending on your perspective), none of those are any longer in the Portage tree. Getting them back, while not impossible, is a pain. You can see what's currently available with
Code:
equery list -p gentoo-sources

There's a somewhat subtle difference between
Code:
emerge gentoo-sources
and
Code:
emerge =gentoo-sources-3.17.8-r1
The former tells Portage to install the latest version of gentoo-sources that you're keyworded for and to keep you up to date with the latest version during "emerge --update" runs. The latter, though, tells Portage you explicitly want a particular version. Subsequent "emerge --update" runs will not erase this version.

You can pin your current version like that without re-installing by using the --noreplace option:
Code:
emerge --noreplace =gentoo-sources-3.17.8-r1

Hope this helps. ;)

- 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
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7138
Location: Saint Amant, Acadiana

PostPosted: Thu Feb 05, 2015 12:14 am    Post subject: Reply with quote

You can have unlimited number of backup kernels (/boot partition size permitting) and they all will work without sources installed. What you see in your /usr/src is remnants of kernel sources after emerge --depclean.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
diablo465
Apprentice
Apprentice


Joined: 10 Sep 2013
Posts: 194

PostPosted: Thu Feb 05, 2015 12:57 am    Post subject: Reply with quote

Jaglover wrote:
You can have unlimited number of backup kernels (/boot partition size permitting) and they all will work without sources installed. What you see in your /usr/src is remnants of kernel sources after emerge --depclean.


Thanks for the explain. I understood how other kernels are removed. Yes, I can still boot the non-listed kernels as long as boot file are in /boot folder.

Howerver, it is find that I can not manually make the non-listed kenerls (e.g., linux-3.10.25-gentoo ) any more. Specifically the Makefile missing in the non-listed kernels after emerge --depclean.


How do i get the Makefile for the non-listed kenerls? It seems that copying makefile from the listed kernel (i.e., gentoo-sources-3.17.8-r1) is not working.


Code:

ln -s /usr/src/linux-3.17.7-gentoo /usr/src/linux
ae429-1105 src # ls -l
total 20
lrwxrwxrwx  1 root root   28 Feb  5 10:44 linux -> /usr/src/linux-3.17.7-gentoo
drwxr-xr-x 20 root root 4096 Feb  5 10:51 linux-3.10.25-gentoo
drwxr-xr-x 20 root root 4096 Nov 23 17:04 linux-3.12.13-gentoo
drwxr-xr-x 20 root root 4096 Feb  2 14:47 linux-3.12.21-gentoo-r1
drwxr-xr-x 20 root root 4096 Feb  5 10:48 linux-3.17.7-gentoo
drwxr-xr-x 25 root root 4096 Feb  5 10:48 linux-3.17.8-gentoo-r1
cd linux
ae429-1105 linux # make menuconfig
make: *** No rule to make target 'menuconfig'.  Stop.

ae429-1105 src # ls ../linux-3.12.21-gentoo-r1/
arch   crypto   firmware  include  ipc     lib  modules.builtin  Module.symvers  scripts   sound       usr      vmlinux.o
block  drivers  fs        init     kernel  mm   modules.order    net             security  System.map  vmlinux

(AGAIN NO MAKEFILE ANYMORE!!!!!!!!)
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7138
Location: Saint Amant, Acadiana

PostPosted: Thu Feb 05, 2015 1:04 am    Post subject: Reply with quote

There is much more than Makefile cleaned out, after emerge --depclean the sources affected are effectively gone. Below are the kernel sources still in portage, you can install them as you wish.
Code:
$ eix gentoo-sources
[?] sys-kernel/gentoo-sources
     Available versions: 
     (3.4.105) (~)3.4.105^bs
     (3.4.106) (~)3.4.106^bs
     (3.4.9999) **3.4.9999^bs
     (3.10.63) 3.10.63^bs
     (3.10.64) (~)3.10.64^bs
     (3.10.65) (~)3.10.65^bs
     (3.10.66) (~)3.10.66^bs
     (3.10.67) (~)3.10.67^bs
     (3.10.9999) **3.10.9999^bs
     (3.12.35) 3.12.35^bs
     (3.12.9999) **3.12.9999^bs
     (3.14.27) 3.14.27^bs
     (3.14.28) (~)3.14.28^bs
     (3.14.29) (~)3.14.29^bs
     (3.14.30) (~)3.14.30^bs
     (3.14.31) (~)3.14.31^bs
     (3.17.8) (~)3.17.8^bs
     (3.17.8-r1) 3.17.8-r1^bs
     (3.18.0) (~)3.18.0^bs
     (3.18.1) (~)3.18.1^bs
     (3.18.2) (~)3.18.2^bs
     (3.18.3) (~)3.18.3^bs
     (3.18.4) (~)3.18.4^bs

_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
diablo465
Apprentice
Apprentice


Joined: 10 Sep 2013
Posts: 194

PostPosted: Thu Feb 05, 2015 1:32 am    Post subject: Reply with quote

Jaglover wrote:
There is much more than Makefile cleaned out, after emerge --depclean the sources affected are effectively gone.

Is there any way that we can prevent emerge --depclean from removing non-supported kernels? I wish to use emerge --depclean regularly but do not want it to remove my kernels.

The reason I need to stick into old kernels is because everytime I use new kernels, some annoying modules (e.g., virtualbox-bin nvidia-drivers and more) has to be recompiled. Most of the time these modules can not work after recompile. I have to wait until the updates from forums for solutions, During the waiting period I have to roll back to a old non-listed kernel where annoying modules are working. If old kernels are deprived from make, they become almost useless even if the annoying modules are working.

So currently I am standing at a situation where none of the kernels are working perfectly due to an kernel update.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7138
Location: Saint Amant, Acadiana

PostPosted: Thu Feb 05, 2015 1:54 am    Post subject: Reply with quote

I suggest you open another thread about your update problems. For me emerge @module-rebuild works every time, no problems. To answer your question about keeping some packages from cleaned out - use --exclude option. You do realize you need to modprobe -r the old module before the new one can be loaded?
_________________
Please learn how to denote units correctly!
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: Thu Feb 05, 2015 2:04 am    Post subject: Reply with quote

diablo465 wrote:
Is there any way that we can prevent emerge --depclean from removing non-supported kernels? I wish to use emerge --depclean regularly but do not want it to remove my kernels.
Yes. Someone has helpfully described how you do that. ;)

- 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
diablo465
Apprentice
Apprentice


Joined: 10 Sep 2013
Posts: 194

PostPosted: Thu Feb 05, 2015 6:08 am    Post subject: Reply with quote

John R. Graham wrote:
diablo465 wrote:
Is there any way that we can prevent emerge --depclean from removing non-supported kernels? I wish to use emerge --depclean regularly but do not want it to remove my kernels.
Yes. Someone has helpfully described how you do that. ;)

- John


Thanks, John, this definately suits my need. I will mark it as solved.
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