Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to remove a kernel
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
PseudoKrazy
Tux's lil' helper
Tux's lil' helper


Joined: 21 Nov 2003
Posts: 115
Location: USA/NJ

PostPosted: Mon Dec 29, 2003 1:09 am    Post subject: How to remove a kernel Reply with quote

Being that there is no "Uninstalling Gentoo" board, I decided to post this here. What files should I remove/unmerge if I am getting rid of a previously used kernel. I have 3 kernels, and need to get rid of the last one.
Back to top
View user's profile Send private message
tomk
Administrator
Administrator


Joined: 23 Sep 2003
Posts: 7219
Location: Sat in front of my computer

PostPosted: Mon Dec 29, 2003 1:57 am    Post subject: Reply with quote

The usual emerge unmerge should do the trick, the files will be deleted from /usr/src/<kernel_version>. Make sure that /usr/src/linux doesn't point to the version you're deleting and check your lilo/grub config ao it doesn't have the deleted kernel.

Code:
emerge unmerge kernel_name_and_version

_________________
Search | Read | Answer | Report | Strip
Back to top
View user's profile Send private message
FreeFly42
l33t
l33t


Joined: 03 Nov 2003
Posts: 848
Location: Houston, TX

PostPosted: Mon Dec 29, 2003 10:18 am    Post subject: Reply with quote

Also remove the kernel files in /boot, and the corresponding /lib/modules directory (/lib/modules/<kernel name>/)
_________________
Kent

Planes are dangerous, get out of 'em quick
Back to top
View user's profile Send private message
ed0n
l33t
l33t


Joined: 23 Apr 2003
Posts: 638
Location: Prishtine/Kosove

PostPosted: Mon Dec 29, 2003 10:52 am    Post subject: Reply with quote

I always do rm -Rf /usr/src/linux-x-x
Back to top
View user's profile Send private message
ConnorWorm
n00b
n00b


Joined: 14 Nov 2005
Posts: 44
Location: ohio

PostPosted: Thu Dec 08, 2005 4:19 am    Post subject: Reply with quote

My question is slightly different, but still the same in a way: I did a emerge -uDN world, ended up getting 2.6.14-gentoo-r4 from this. It doesn't show up in my Grub splash screen. I wondered why. Any answers will be greatly appreciated.
Back to top
View user's profile Send private message
jmbsvicetto
Moderator
Moderator


Joined: 27 Apr 2005
Posts: 4730
Location: Angra do Heroísmo (PT)

PostPosted: Thu Dec 08, 2005 4:24 am    Post subject: Reply with quote

Hi.

This is another source of confusion for newcomers. Just because you install a package it doesn't start to work by itself. As X won't start working just because you install x.org, so a new kernel won't be available at the boot screen just because you installed a new kernel source.
After emerging a new kernel, you may need to update the /src/src/linux symlink. After that, you need to configure the kernel, compile it and install it. You can use some help by using genkernel and grub-install or you can do it by hand. Finally, you should check that your /boot/grub/grub.conf has an entry for your new kernel.
_________________
Jorge.

Your twisted, but hopefully friendly daemon.
AMD64 / x86 / Sparc Gentoo
Help answer || emwrap.sh
Back to top
View user's profile Send private message
ConnorWorm
n00b
n00b


Joined: 14 Nov 2005
Posts: 44
Location: ohio

PostPosted: Thu Dec 08, 2005 4:34 am    Post subject: Reply with quote

well i can surely tell you that /boot/grub/grub.conf doesn't have it. One question: I was having previous problems with ACPI, how can I make it so the kernel doesn't attempt to use ACPI in the future boots?
Back to top
View user's profile Send private message
jmbsvicetto
Moderator
Moderator


Joined: 27 Apr 2005
Posts: 4730
Location: Angra do Heroísmo (PT)

PostPosted: Thu Dec 08, 2005 4:44 am    Post subject: Reply with quote

ConnorWorm wrote:
well i can surely tell you that /boot/grub/grub.conf doesn't have it. One question: I was having previous problems with ACPI, how can I make it so the kernel doesn't attempt to use ACPI in the future boots?

got a few questions then:
1) will this effect me with my current kernel, since i'm in X?
2) is it bad to update from 2.6.14-gentoo-r2 to 2.6.14-gentoo-r4?
3) will anything like my sound or much else be effected by said change?

P.S. could you help me with my wireless?

You can configure your kernel and disable ACPI support. The quick and easy method is to append in the kernel line of grub.conf the kernel parameter acpi=off.
1- By emerging a new kernel you're not removing neither the source nor the compiled file for previous kernel versions. You just get the ability to create a new kernel based on a newer version of the kernel sources. So it doesn't affect your running kernel.
2. There's no problem in updating a kernel version - actually you should be doing that from time to time. New versions are released either to address bugs of previous versions or to include newer features.
3. When you create your new kernel based on the more recent kernel tree, you have to make sure that you select the drivers for your devices. You can do it by hand, or by using the previous kernel .config file. There are a few cases where kernel options change, that by using this last method you won't get the new default values.
As to your last question, I have limited experience with wireless. I own and have configured both a Intersil Prism and an Atheros wireless cards in Gentoo, but have rarely used them. The best way to get help from me or any other member of the forum, is for you to explain your problem and provide sufficient information.
_________________
Jorge.

Your twisted, but hopefully friendly daemon.
AMD64 / x86 / Sparc Gentoo
Help answer || emwrap.sh
Back to top
View user's profile Send private message
ConnorWorm
n00b
n00b


Joined: 14 Nov 2005
Posts: 44
Location: ohio

PostPosted: Thu Dec 08, 2005 4:58 am    Post subject: Reply with quote

Then I will go with the acpi=off option. I had used genkernel to create r2, even though i've gotten picked on for using it. (It don't bother me, I'm afraid to make my own kernel, and genkernel is "easier"). How would I copy the .config file like you said before? How would i get my ALSA drivers to work?

Oh, I found the previous thread I had created about my wireless problem. http://forums.gentoo.org/viewtopic-t-409715-highlight-.html
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 16115
Location: Colorado

PostPosted: Thu Dec 08, 2005 6:03 am    Post subject: Re: How to remove a kernel Reply with quote

PseudoKrazy wrote:
Being that there is no "Uninstalling Gentoo" board
No, but there is a Kernel forum.


Moved from Installing Gentoo.
_________________
lolgov. 'cause where we're going, you don't have civil liberties.

In Loving Memory
1787 - 2008
Back to top
View user's profile Send private message
dsd
Developer
Developer


Joined: 30 Mar 2003
Posts: 2162
Location: nr London

PostPosted: Thu Dec 08, 2005 8:00 am    Post subject: Reply with quote

there is also a kernel upgrade guide which answers many of these questions (including uninstallation) :
http://www.gentoo.org/doc/en/kernel-upgrade.xml
_________________
http://dev.gentoo.org/~dsd
Back to top
View user's profile Send private message
Timbers2k
Apprentice
Apprentice


Joined: 03 Oct 2003
Posts: 215

PostPosted: Thu Dec 08, 2005 4:20 pm    Post subject: Reply with quote

I've been using Gentoo for quite a while now, but I still can't figure out how to find some of these guides. If you go to the Documentation links from the home page some of them are listed, but by no means all of them. The Kernel Upgrade Guide shown in the previous post isn't listed, unless in someplace I'm not looking. It seems to me that there should be a central location where someone to go to find all the available documentation. Most of the time I have to search the forums to find out what is available.
Back to top
View user's profile Send private message
dsd
Developer
Developer


Joined: 30 Mar 2003
Posts: 2162
Location: nr London

PostPosted: Thu Dec 08, 2005 4:28 pm    Post subject: Reply with quote

it suprises me how many people find this. if you go to the documentation page you get this:

Quote:
Our documentation is categorized and hierarchically navigable. If you want a quick overview of all available documentation without the additional information, please use our Documentation Listing page.


followed by a list of categories.

the kernel upgrade guide can be found under the System Administration page which is linked to from the main documentation page mentioned above.

as the text also mentions, there is also a Documentation Listing page which provides an overview of all available documentation.

do you have any suggestions as to how we can improve navigation here? i see people missing it time and time again, but i really dont understand why...
_________________
http://dev.gentoo.org/~dsd
Back to top
View user's profile Send private message
sundialsvc4
Guru
Guru


Joined: 10 Nov 2005
Posts: 436

PostPosted: Thu Dec 08, 2005 5:34 pm    Post subject: Reply with quote

I strongly recommend making copies of .config with each update you make. Pretty much anytime you compile the kernel. Put them in dated, non-hidden files, somewhere like (say...) a folder in /root.
Back to top
View user's profile Send private message
tgh
Apprentice
Apprentice


Joined: 05 Oct 2005
Posts: 222

PostPosted: Thu Dec 08, 2005 5:59 pm    Post subject: Reply with quote

dsd wrote:
do you have any suggestions as to how we can improve navigation here? i see people missing it time and time again, but i really dont understand why...


Maybe a search feature on the documentation page? Something that would allow you to search through all of the files listed on the document list page?

On the index.xml page, "2. Gentoo Linux Documentation" maybe should be changed to "2. Gentoo Linux Documentation Categories". There's also a link in the last paragraph in section 1 that simply takes you back to the same page (which I find confusing, look for the link on the word "categorized").

In the left-hand menu, I suggest an entry under "Main Index" that links directly to the document listing (list.xml) in addition to the "Main Index" link that points at index.xml. Maybe call the "Main Index" -> "Home" and have a new entry called "Index" pointing at list.xml.

(I had never found list.xml before until you indicated that I should look closer at the links buried in the text on the main categories page.)
Back to top
View user's profile Send private message
jmbsvicetto
Moderator
Moderator


Joined: 27 Apr 2005
Posts: 4730
Location: Angra do Heroísmo (PT)

PostPosted: Thu Dec 08, 2005 6:14 pm    Post subject: Reply with quote

sundialsvc4 wrote:
I strongly recommend making copies of .config with each update you make. Pretty much anytime you compile the kernel. Put them in dated, non-hidden files, somewhere like (say...) a folder in /root.

In my view, a better alternative is to get the habit of copying the kernel and the .config files to /boot. If you remove the old kernels tree source, you'll still have the file in /boot.
It's also a good idea to enable the access to the kernel config in /proc/config.gz in the kernel configuration.
_________________
Jorge.

Your twisted, but hopefully friendly daemon.
AMD64 / x86 / Sparc Gentoo
Help answer || emwrap.sh
Back to top
View user's profile Send private message
Timbers2k
Apprentice
Apprentice


Joined: 03 Oct 2003
Posts: 215

PostPosted: Thu Dec 08, 2005 6:26 pm    Post subject: Reply with quote

tgh wrote:
dsd wrote:
do you have any suggestions as to how we can improve navigation here? i see people missing it time and time again, but i really dont understand why...


In the left-hand menu, I suggest an entry under "Main Index" that links directly to the document listing (list.xml) in addition to the "Main Index" link that points at index.xml. Maybe call the "Main Index" -> "Home" and have a new entry called "Index" pointing at list.xml.

(I had never found list.xml before until you indicated that I should look closer at the links buried in the text on the main categories page.)


This is the one I like. Put in in that left hand menu, because I've never seen that link buried in the page, and never knew it was there.
Back to top
View user's profile Send private message
Paapaa
l33t
l33t


Joined: 14 Aug 2005
Posts: 955
Location: Finland

PostPosted: Thu Dec 08, 2005 6:38 pm    Post subject: Reply with quote

tomk wrote:
The usual emerge unmerge should do the trick, the files will be deleted from /usr/src/<kernel_version>.


When doing "emerge -P gentoo-sources" the contents of /usr/src/ are NOT deleted for some reason. They have to be deleted manually. (I mean the older versions, of course). Does -C also remove the correct directory under /usr/src/?
Back to top
View user's profile Send private message
dsd
Developer
Developer


Joined: 30 Mar 2003
Posts: 2162
Location: nr London

PostPosted: Thu Dec 08, 2005 7:03 pm    Post subject: Reply with quote

when you compile a kernel it creates lots of object files (.o) and some other temporary files
these are not removed by portage in any situation because portage did not put them there in the first place. it is safe to remove them manually, and that is pretty much your only option (unless you script it)
_________________
http://dev.gentoo.org/~dsd
Back to top
View user's profile Send private message
dsd
Developer
Developer


Joined: 30 Mar 2003
Posts: 2162
Location: nr London

PostPosted: Thu Dec 08, 2005 7:14 pm    Post subject: Reply with quote

tgh wrote:
Maybe a search feature on the documentation page? Something that would allow you to search through all of the files listed on the document list page?


the website is currently being redesigned, and search features will be implemented soon after the new design goes online.

Quote:
On the index.xml page, "2. Gentoo Linux Documentation" maybe should be changed to "2. Gentoo Linux Documentation Categories". There's also a link in the last paragraph in section 1 that simply takes you back to the same page (which I find confusing, look for the link on the word "categorized").

In the left-hand menu, I suggest an entry under "Main Index" that links directly to the document listing (list.xml) in addition to the "Main Index" link that points at index.xml. Maybe call the "Main Index" -> "Home" and have a new entry called "Index" pointing at list.xml.

(I had never found list.xml before until you indicated that I should look closer at the links buried in the text on the main categories page.)


thanks for the great feedback. i've filed bug 114897 for this. if you have any more good ideas where this one came from, please do contact me or file some bugs yourself :)
_________________
http://dev.gentoo.org/~dsd
Back to top
View user's profile Send private message
lusken
Tux's lil' helper
Tux's lil' helper


Joined: 27 Mar 2003
Posts: 88
Location: Norway

PostPosted: Thu Dec 08, 2005 7:24 pm    Post subject: Reply with quote

I guess you can delete old catalogs in /lib/modules also. In addition to old catalogs in /usr/src, it there any more old kernel-related cruft that is safe to delete?
_________________
- lusken
Sliced bread are for old people.
Back to top
View user's profile Send private message
JSharku
Apprentice
Apprentice


Joined: 09 Feb 2003
Posts: 189
Location: Belgium

PostPosted: Thu Dec 08, 2005 7:33 pm    Post subject: Reply with quote

Paapaa wrote:

When doing "emerge -P gentoo-sources" the contents of /usr/src/ are NOT deleted for some reason. They have to be deleted manually. (I mean the older versions, of course). Does -C also remove the correct directory under /usr/src/?


Do a "make distclean" first in that dir, it removes all the temporary files and other stuff dsd mentioned which is not installed (and thus unrecognized) by portage. After that "emerge -C/-P" will work as expected.

EDIT: By "that dir" I mean /usr/src/linux-x.y.z, if you want to unmerge multiple versions you have to do it in each of these dirs.

Sharku
_________________
If only life were portage-driven:
Code:
USE="-bitch -in-laws nice gorgeous smart" emerge girlfriend
*sigh*
--
Open Source for Windows!
Back to top
View user's profile Send private message
lusken
Tux's lil' helper
Tux's lil' helper


Joined: 27 Mar 2003
Posts: 88
Location: Norway

PostPosted: Thu Dec 08, 2005 8:04 pm    Post subject: Reply with quote

I have a "safe" kernel in /boot in case of trouble. Is it ok to "emerge -P/-C" that kernel? I will never install new modules on this kernel as the only intention is to have a kernel that supports "all" hardware so I can put the harddisk in another computer if *everything* goes ... (I'm a fanatic christian, I refuse to use bad language)


Code:
USE="-bitch -in-laws nice gorgeous smart" emerge girlfriend


Never ever underestimate the in-laws, their're the best prophets you'll ever get!
_________________
- lusken
Sliced bread are for old people.
Back to top
View user's profile Send private message
JSharku
Apprentice
Apprentice


Joined: 09 Feb 2003
Posts: 189
Location: Belgium

PostPosted: Fri Dec 09, 2005 1:19 am    Post subject: Reply with quote

lusken wrote:
I have a "safe" kernel in /boot in case of trouble. Is it ok to "emerge -P/-C" that kernel? I will never install new modules on this kernel as the only intention is to have a kernel that supports "all" hardware so I can put the harddisk in another computer if *everything* goes ... (I'm a fanatic christian, I refuse to use bad language)


A lot of ebuilds will want the /usr/src/linux symlink to be there and pointing towards your currently running kernel, so best keep that around if you want to avoid a lot of broken emerges. It won't hurt to remove previous versions, though as already mentioned, I'd keep the config file and/or the /proc/config.gz support, "just in case". I have several of these kernels, without the correspondig sources in /usr/src, no problem at all... As for making a kernel that supports "all" hardware, keep in mind that the processor type does put some restrictions on what machines it can run on.

Code:
USE="-bitch -in-laws nice gorgeous smart" emerge girlfriend

Quote:
Never ever underestimate the in-laws, their're the best prophets you'll ever get!
Yup, prophets of doom in my case. :evil: At the risk of sounding like a sappy country & western song, maybe I should add
Code:
USE="-bitterness -heartbroken" emerge -e me


Sharku
_________________
If only life were portage-driven:
Code:
USE="-bitch -in-laws nice gorgeous smart" emerge girlfriend
*sigh*
--
Open Source for Windows!
Back to top
View user's profile Send private message
ConnorWorm
n00b
n00b


Joined: 14 Nov 2005
Posts: 44
Location: ohio

PostPosted: Fri Dec 09, 2005 2:33 am    Post subject: Reply with quote

so could someone here provide an '"idiot" proof guide to using the new kernel vrs the old one? plus, could removing/uninstalling of the old kernel be in there too???
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