View previous topic :: View next topic |
Author |
Message |
Funkematics n00b


Joined: 25 Aug 2018 Posts: 4
|
Posted: Thu Nov 29, 2018 9:55 pm Post subject: Installed a new Kernel, botched it, now wanna remove |
|
|
All the guides online seem to be concerned with removing old kernels, I'm looking for
help removing all kernels that aren't the one I'm using now (which is the old one), or new kernels.  |
|
Back to top |
|
 |
Muso Veteran


Joined: 22 Oct 2002 Posts: 1052 Location: The Holy city of Honolulu
|
Posted: Thu Nov 29, 2018 10:37 pm Post subject: Re: Installed a new Kernel, botched it, now wanna remove |
|
|
FunkyCosmonaut wrote: | All the guides online seem to be concerned with removing old kernels, I'm looking for
help removing all kernels that aren't the one I'm using now (which is the old one), or new kernels.  |
Why don't you just copy the working config in the kernel you are in to the new kernel and run make syncconfig?
https://wiki.gentoo.org/wiki/Kernel/Upgrade
Here's my (now fixed with --oneshot) kernel upgrading system (as root):
YMMV
Code: |
cp /usr/src/linux/.config ~/kernel-config-`uname -r`
eselect kernel list
eselect kernel set 2
mount /boot
cd /usr/src/linux
zcat /proc/config.gz > /usr/src/linux/.config
make syncconfig
make && make modules_install
make install
grub-mkconfig -o /boot/grub/grub.cfg
emerge --oneshot nvidia-drivers
emerge --oneshot vmware-modules
umount /boot
reboot
|
_________________ "You can lead a horticulture but you can't make her think" ~ Dorothy Parker
2021 is the year of the Linux Desktop! |
|
Back to top |
|
 |
fedeliallalinea Administrator


Joined: 08 Mar 2003 Posts: 31535 Location: here
|
Posted: Fri Nov 30, 2018 7:11 am Post subject: |
|
|
Muso instead of
Code: | emerge --oneshot nvidia-drivers
emerge --oneshot vmware-modules |
why you don't run emerge @module-rebuild? This command rebuild all modules installed through portage in your system. _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
 |
Dwosky Tux's lil' helper


Joined: 07 Nov 2018 Posts: 141
|
Posted: Fri Nov 30, 2018 7:45 am Post subject: Re: Installed a new Kernel, botched it, now wanna remove |
|
|
FunkyCosmonaut wrote: | I'm looking for help removing all kernels that aren't the one I'm using now (which is the old one), or new kernels.  |
Have you checked the eclean-kernel tool? https://wiki.gentoo.org/wiki/Kernel/Removal#Removing_kernel_leftovers
It removes the kernels that are no longer refereced, so theoretically you should be able to hold your current old kernel and remove the older or newer ones in case they're no longer referenced. |
|
Back to top |
|
 |
Funkematics n00b


Joined: 25 Aug 2018 Posts: 4
|
Posted: Fri Nov 30, 2018 12:21 pm Post subject: Re: Installed a new Kernel, botched it, now wanna remove |
|
|
OoooOoOoooOo, Thank you everyooooone.
I actually had more than one botched kernels installed, lets just say I made many attempts.
But now I can clean up all the others and do a rebuild. |
|
Back to top |
|
 |
Jaglover Watchman


Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
 |
Muso Veteran


Joined: 22 Oct 2002 Posts: 1052 Location: The Holy city of Honolulu
|
Posted: Fri Nov 30, 2018 1:52 pm Post subject: |
|
|
fedeliallalinea wrote: | Muso instead of
Code: | emerge --oneshot nvidia-drivers
emerge --oneshot vmware-modules |
why you don't run emerge @module-rebuild? This command rebuild all modules installed through portage in your system. |
Will check on the next kernel. I wasn't sure if it would pull in the vmware-modules.
Code: | emerge -p @module-rebuild
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild R ] x11-drivers/nvidia-drivers-415.18
[ebuild R ] net-wireless/rtl8812au_aircrack-ng-5.2.20_p20180904-r1
[ebuild R ] app-emulation/vmware-modules-330.0.2
|
Nice! Process updated. _________________ "You can lead a horticulture but you can't make her think" ~ Dorothy Parker
2021 is the year of the Linux Desktop! |
|
Back to top |
|
 |
fedeliallalinea Administrator


Joined: 08 Mar 2003 Posts: 31535 Location: here
|
Posted: Fri Nov 30, 2018 2:04 pm Post subject: |
|
|
Muso wrote: | Will check on the next kernel. I wasn't sure if it would pull in the vmware-modules. |
Theoretically yes because is linux-mod eclass that add module to list (and vmware-module inherit from linux-mod), you can check reading file /var/lib/module-rebuild/moduledb _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
 |
skellr l33t


Joined: 18 Jun 2005 Posts: 989 Location: The Village, Portmeirion
|
Posted: Fri Nov 30, 2018 8:27 pm Post subject: Re: Installed a new Kernel, botched it, now wanna remove |
|
|
FunkyCosmonaut wrote: | OoooOoOoooOo, Thank you everyooooone.
I actually had more than one botched kernels installed, lets just say I made many attempts.
But now I can clean up all the others and do a rebuild. |
One thing that is nice when you want to experiment with the kernel is to give it a "local Version". If you give it a local version of something like -test it will append -test to the kernel,config, and modules directory so it won't overwrite/clobber your working kernel of the same version when you make install.
Code: | General Setup - > () Local version - append to kernel release |
|
|
Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 55011 Location: 56N 3W
|
Posted: Fri Nov 30, 2018 8:45 pm Post subject: |
|
|
skellr,
There is a downside to local version too. Its not, or at least, wasn't in the past, respected by all out of tree kernel modules.
nvidia-drivers was one popular case.
Thu fix for that is to edit the kernel Makefile which starts
Code: | # SPDX-License-Identifier: GPL-2.0
VERSION = 4
PATCHLEVEL = 19
SUBLEVEL = 0
EXTRAVERSION = -gentoo | and change the EXTRAVERSION. Then run in the kernel tree. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
 |
|