Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] rm /usr/src/linux-version but still I have in grub
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
saeb
Tux's lil' helper
Tux's lil' helper


Joined: 13 Apr 2017
Posts: 82
Location: iran

PostPosted: Fri Dec 15, 2017 3:19 pm    Post subject: [Solved] rm /usr/src/linux-version but still I have in grub Reply with quote

hi there . I removed some linux version from
Code:
 /usr/src
and
Code:
 /lib/modules
but still I have them in grub menu and I can use them!

Code:
 saeb@Fujitsu  ~  ls -l /usr/src/     
total 12
lrwxrwxrwx  1 root root   19 Dec 15 17:46 linux -> linux-4.14.6-gentoo
drwxr-xr-x 26 root root 4096 Dec 15 16:45 linux-4.14.4-gentoo
drwxr-xr-x 26 root root 4096 Dec 15 18:32 linux-4.14.6-gentoo
drwxr-xr-x 22 root root 4096 Jul 13 03:06 linux-4.9.34-gentoo
 saeb@Fujitsu  ~ 



Code:

 saeb@Fujitsu  ~  ls -l /lib/modules/ 
total 8
drwxr-xr-x 3 root root 4096 Dec 15 16:49 4.14.4-gentoo
drwxr-xr-x 3 root root 4096 Jul  7 01:37 4.9.34-gentoo
 saeb@Fujitsu  ~ 




Code:

 saeb@Fujitsu  ~  ls /boot
config-4.13.12-gentoo                      kernel-genkernel-x86_64-4.14.6-gentoo
grub                                       kernel-genkernel-x86_64-4.9.34-gentoo
initramfs-genkernel-x86_64-4.13.10-gentoo  System.map-4.13.12-gentoo
initramfs-genkernel-x86_64-4.13.11-gentoo  System.map-genkernel-x86_64-4.13.10-gentoo
initramfs-genkernel-x86_64-4.13.12-gentoo  System.map-genkernel-x86_64-4.13.11-gentoo
initramfs-genkernel-x86_64-4.14.4-gentoo   System.map-genkernel-x86_64-4.13.12-gentoo
initramfs-genkernel-x86_64-4.9.34-gentoo   System.map-genkernel-x86_64-4.14.4-gentoo
kernel-genkernel-x86_64-4.13.10-gentoo     System.map-genkernel-x86_64-4.14.6-gentoo
kernel-genkernel-x86_64-4.13.11-gentoo     System.map-genkernel-x86_64-4.9.34-gentoo
kernel-genkernel-x86_64-4.13.12-gentoo     vmlinuz-4.13.12-gentoo
kernel-genkernel-x86_64-4.14.4-gentoo
 saeb@Fujitsu  ~ 


Code:
 saeb@Fujitsu  ~  eselect kernel list
Available kernel symlink targets:
  [1]   linux-4.14.4-gentoo
  [2]   linux-4.14.6-gentoo *
 saeb@Fujitsu  ~ 



Code:
cat /boot/grub/grub.cfg|xclip -selection clipboard


https://beepaste.io/view/a52xgO
_________________
I`m noob and I have a jillion question


Last edited by saeb on Fri Dec 15, 2017 4:17 pm; edited 1 time in total
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 21799
Location: here

PostPosted: Fri Dec 15, 2017 3:29 pm    Post subject: Reply with quote

In /usr/src there is only source code of kernels, are in /boot the 'real' kernel image.
If you want remove kernel in grub menu you should remove kernel, initramfs and System.map (remove same version you want of these 3 files) from /boot and then re-create grub.cfg with grub-mkconfig -o /boot/grub/grub.cfg.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
saeb
Tux's lil' helper
Tux's lil' helper


Joined: 13 Apr 2017
Posts: 82
Location: iran

PostPosted: Fri Dec 15, 2017 4:16 pm    Post subject: Reply with quote

fedeliallalinea wrote:
In /usr/src there is only source code of kernels, are in /boot the 'real' kernel image.
If you want remove kernel in grub menu you should remove kernel, initramfs and System.map (remove same version you want of these 3 files) from /boot and then re-create grub.cfg with grub-mkconfig -o /boot/grub/grub.cfg.

thanks, is that mean I can
Code:
rm /usr/src/linux* ?

_________________
I`m noob and I have a jillion question
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


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

PostPosted: Fri Dec 15, 2017 4:22 pm    Post subject: Reply with quote

It's good form to keep your current kernel source. After all, you might want to change its configuration, recompile, and reinstall.

Also note that removing the source from /usr/src doesn't remove it from your world set. At the appropriate point you should also "emerge -C" the appropriate package, for example,
Code:
emerge -C =gentoo-sources-4.9.49-r1
- 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
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