| Ubuntu This forum is for the discussion of Ubuntu Linux. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
07-20-2007, 04:17 AM
|
#1
|
|
Member
Registered: Jan 2007
Location: Singapore
Distribution: Windows XP,Mac OS X 10.4, Ubuntu 7.10
Posts: 24
Rep:
|
How to remove the previous Ubuntu linux kernel.
Recently, when I go for an update. There is update of kernel. However, since then , I have 2 more options, which are the 2 new version of Kernel and its recovery mode.
I do not know what to do with the Grub as I tried to "c" (Without the " ") and d or e.(Command-Line tried before, Delete a command , edit the command also)
Note: After i finish, I press Esc and there is nothing change. How should I save them. There is no "s" .(Without the " ")
Perhaps, there might be a better way to do. If there is , can anyone kindly say so.
Thanks.
|
|
|
|
07-20-2007, 04:29 AM
|
#2
|
|
Guru
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,209
Rep: 
|
You can remove them with the packet manager.
Synaptic will show you the kernels you have installed.
However - you should always retain one old kernel that you know works. It will have a regular boot and a recovery option... so will the new kernel, for a total of four menu items.
|
|
|
|
07-20-2007, 06:20 AM
|
#3
|
|
Guru
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131
Rep: 
|
Even if Synaptic didn't show you the previous kernels (it had simply not removed them, but upgraded your kernel to a new version, thinking there is only one version left) you can simply remove the unneeded kernel files (note the version, don't remove your running kernel  ) from under /boot/, and remove the corresponding sections from /boot/grub/menu.lst (or rather just run 'grub-update' as root - it does it automatically for you).
Note that if you have several kernels of same version, with different configurations, the modules might not work for more than one kernel. I usually keep two kernels, current and one older, so that if the current happened to not work, I could use the older one instead. And when you upgrade your kernel it's nice to know there's "backup" available for maintenance, if something goes wrong.
Personally I don't upgrade the kernel unless it's really needed. It just forces to reinstall video/wireless drivers in some cases, and causes headache, and gives nothing new if it works perfectly already before the upgrade. Only if you have devices that need newer kernel, or you want to change the configuration or something, you should upgrade the kernel.
Don't fix a working thing, unless it improves security.
|
|
|
|
07-20-2007, 07:44 AM
|
#4
|
|
Guru
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,209
Rep: 
|
Quote:
|
Personally I don't upgrade the kernel unless it's really needed.
|
Normally good advise... a bit harder to follow for users of closely maintained distros like Ubuntu.
When manually removing a kernel - remember to remove the source and headers as well (if installed)  And you need to clean up the packet database.
It is cleanest to use the packet manager wherever possible in ubuntu.
|
|
|
|
07-20-2007, 07:47 AM
|
#5
|
|
Guru
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131
Rep: 
|
Quote:
|
Originally Posted by Simon Bridge
Normally good advise... a bit harder to follow for users of closely maintained distros like Ubuntu.
|
Not at all, just add the kernel package to the list of packages that shouldn't be upgraded, in Synaptic or Adept or whatever one uses as the front-end.
Quote:
|
Originally Posted by Simon Bridge
It is cleanest to use the packet manager wherever possible in ubuntu.
|
So true. When you don't have a package manager in your distribution, you cry to get one, and when you have one, you cry to get it out  Meaning that when there is no package manager, things get difficult when installing big/difficult software packages, and when there is a package manager, you're more or less forced to use it to keep things clean.
|
|
|
|
07-20-2007, 08:24 AM
|
#6
|
|
Senior Member
Registered: Aug 2003
Location: Indpls
Distribution: Desktop- Debian Lenny, Laptops- Ubuntu 8.10, Debian Lenny UMPC- Ubuntu 8.10
Posts: 1,297
Rep:
|
Quote:
|
Originally Posted by ussr_1991
Recently, when I go for an update. There is update of kernel. However, since then , I have 2 more options, which are the 2 new version of Kernel and its recovery mode.
I do not know what to do with the Grub as I tried to "c" (Without the " ") and d or e.(Command-Line tried before, Delete a command , edit the command also)
Note: After i finish, I press Esc and there is nothing change. How should I save them. There is no "s" .(Without the " ")
Perhaps, there might be a better way to do. If there is , can anyone kindly say so.
Thanks.
|
Do you just really want to remove the old Kernel(I generally keep them around and don't bother removing them), or do you just want to remove it from your grub list? Since I generally don't uninstall them, I just comment them out of my menu.lst with the # sign. This leaves a working kernel I can get to if something goes haywire, etc.
Just run sudo gedit /boot/grub/menu.lst from terminal, and use the # sign to comment out the old kernel...
Similar to below.. (Note the # sign before Title on the old Kernel and old recovery entry)
Code:
## ## End Default Options ##
title Ubuntu, kernel 2.6.20-16-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.20-16-generic root=UUID=0d308763-ec3e-4ab7-91c7-17b7b7246d4b ro quiet splash
initrd /boot/initrd.img-2.6.20-16-generic
quiet
savedefault
title Ubuntu, kernel 2.6.20-16-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.20-16-generic root=UUID=0d308763-ec3e-4ab7-91c7-17b7b7246d4b ro single
initrd /boot/initrd.img-2.6.20-16-generic
#title Ubuntu, kernel 2.6.20-15-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=0d308763-ec3e-4ab7-91c7-17b7b7246d4b ro quiet splash
initrd /boot/initrd.img-2.6.20-15-generic
quiet
savedefault
#title Ubuntu, kernel 2.6.20-15-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=0d308763-ec3e-4ab7-91c7-17b7b7246d4b ro single
initrd /boot/initrd.img-2.6.20-15-generic
title Ubuntu, memtest86+
root (hd0,0)
kernel /boot/memtest86+.bin
quiet
### END DEBIAN AUTOMAGIC KERNELS LIST
Last edited by IndyGunFreak; 07-20-2007 at 08:28 AM.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 01:10 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|