LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-12-2007, 01:20 PM   #1
Mikhail
LQ Newbie
 
Registered: Aug 2006
Posts: 3

Rep: Reputation: 0
multiple ubuntu versions in grub


Hi all,

I have been using ubuntu for a few months now, however when the grub boot loader starts there are three different versions of ubuntu available, one an update on the next I presume. How can I clean this up to show only the most recent update?

Thanks for your help
Mik
 
Old 02-12-2007, 01:25 PM   #2
oskar
Senior Member
 
Registered: Feb 2006
Location: Austria
Distribution: Ubuntu 12.10
Posts: 1,142

Rep: Reputation: 49
Well, it should start the first one automatically, so there isn't really any gain in removing them. It's also not a good idea. If the kernel should break or panic, you can still boot with the last one.
To answer the question though.

/boot/grub/menu.lst

There you have all the boot entries. The one at the top gets booted automatically.

At least just comment them out, by putting a "#" in front of the lines you want to get rid of. That way you can activate them again using a live cd, in case anything goes wrong.

---edit---
Just realized, I should clear this up.
Those are most likely entries for older kernel versions (it sais kernel* in the entry). Could of course be different systems, if you have more than one ubuntu system installed.

To edit them, use "gksu gedit" and then the path to the file you want to edit.
BUT - I suggest the moment you start editing configuration files, you should get comfortable with vi. Because it might just be your only tool left. So it's "sudo vi".
you can run the vimtutor to get started.

Last edited by oskar; 02-12-2007 at 01:32 PM.
 
Old 02-12-2007, 01:35 PM   #3
Gethyn
Member
 
Registered: Aug 2003
Location: UK
Distribution: (X)Ubuntu 10.04/10.10, Debian 5, CentOS 5
Posts: 900

Rep: Reputation: 32
Rather than using vi, I would suggest opening Synaptic and removing the old kernel versions (*only* after you have verified that the new one works, of course!). Keeps things tidier with the package management system, and saves you having to fiddle with vi (not that vi isn't useful, but personally I prefer to avoid it whenever possible). Ubuntu takes care of the boot list by automatically adding an entry when a new kernel is installed via the package management system, and automatically removing the corresponding entry when that kernel is removed via the package management system.

Last edited by Gethyn; 02-12-2007 at 01:38 PM.
 
Old 02-12-2007, 01:57 PM   #4
oskar
Senior Member
 
Registered: Feb 2006
Location: Austria
Distribution: Ubuntu 12.10
Posts: 1,142

Rep: Reputation: 49
You have alot of confidence in your system
I needed vi more than once. xorg is pretty vulnerable. I'm not saying it doesn't suck. But it sucks even more if you have to learn it on a fried system.
And I've needed my older kernel more than once too. So I wouldn't remove it. Unless you only have a 4gig harddrive.

Last edited by oskar; 02-12-2007 at 01:58 PM.
 
Old 02-12-2007, 03:02 PM   #5
Hitboxx
Senior Member
 
Registered: Mar 2006
Location: India
Distribution: Fedora
Posts: 1,562
Blog Entries: 3

Rep: Reputation: 61
I second Gethyn, its much better using synaptic/apt-get to remove kernels. But as a rule of thumb i always keep the most immediate kernel together with the new kernel, for those days, just in case.
 
Old 02-12-2007, 04:49 PM   #6
bouchecl
Member
 
Registered: Nov 2005
Location: Quebec
Distribution: Fedora Core / Ubuntu
Posts: 37

Rep: Reputation: 15
Quote:
Originally Posted by oskar
You have alot of confidence in your system
I needed vi more than once. xorg is pretty vulnerable. I'm not saying it doesn't suck. But it sucks even more if you have to learn it on a fried system.
And I've needed my older kernel more than once too. So I wouldn't remove it. Unless you only have a 4gig harddrive.
Why use 'vi' when many distros carry 'nano' or 'pico', a fine and much friendlier cli-based editor. I personally dislike the escape, and the esoteric sequences such as :-w-q .

As for the original question, keep the two kernels for a few days after the update. I'm a FC user and kernels are updated quite regularly (sometimes two times a month). I remove the second kernel only after I made sure the kernel modules for the new one are available and stable, especially when you take a huge step (such as the move from 2.6.18.2869 to 2.6.19.2895 in FC or a transition from 2.6.15.26 to 2.6.17.10 in Ubuntu Edgy). Things may break (such as proprietary display drivers), and it could take more than a few minutes to fix.
 
Old 02-13-2007, 02:29 AM   #7
oskar
Senior Member
 
Registered: Feb 2006
Location: Austria
Distribution: Ubuntu 12.10
Posts: 1,142

Rep: Reputation: 49
Quote:
Originally Posted by bouchecl
Why use 'vi' when many distros carry 'nano' or 'pico', a fine and much friendlier cli-based editor. I personally dislike the escape, and the esoteric sequences such as :-w-q .
All you need is: i(insert-mode), Esc(normal-mode), :q!(just quit) and :wq(write changes and quit)
The difference is that vi is always there, while nano isn't always there... At least not on boot floppies... well on some it is...

You got a point

And of course you should use apt/synaptic/aptitude to remove the kernel... I'm just saying: comment it out, if you don't want to see it, it can't get you into that much trouble.

Last edited by oskar; 02-13-2007 at 02:42 AM.
 
Old 02-13-2007, 12:11 PM   #8
Duck2006
Member
 
Registered: Sep 2006
Distribution: Ubuntu 8.04 Hardy Heron LST
Posts: 346

Rep: Reputation: 33
http://www.cis.ksu.edu/~bhoward/vi/
 
Old 02-13-2007, 12:34 PM   #9
bouchecl
Member
 
Registered: Nov 2005
Location: Quebec
Distribution: Fedora Core / Ubuntu
Posts: 37

Rep: Reputation: 15
Quote:
Originally Posted by Duck2006
Look, I know my way around 'vi'. I can use it, so thanks anyway for the FAQ.

It's just that I think 'vi' is counter-intuitive! I hate vi!
 
Old 02-13-2007, 01:22 PM   #10
oskar
Senior Member
 
Registered: Feb 2006
Location: Austria
Distribution: Ubuntu 12.10
Posts: 1,142

Rep: Reputation: 49
Hey, I'm totally on your side.
And you're right, if you're just going to use ubuntu, or another big distro, you can rely on nano to be there. But if you are on a truly stripped down system - like a boot floppy, chances are there's only vi. And knowing your way around it could save your life.
 
Old 02-13-2007, 02:27 PM   #11
Duck2006
Member
 
Registered: Sep 2006
Distribution: Ubuntu 8.04 Hardy Heron LST
Posts: 346

Rep: Reputation: 33
I use nano, i find it much easyer to use.
 
Old 02-14-2007, 12:44 PM   #12
Gethyn
Member
 
Registered: Aug 2003
Location: UK
Distribution: (X)Ubuntu 10.04/10.10, Debian 5, CentOS 5
Posts: 900

Rep: Reputation: 32
Quote:
Originally Posted by oskar
Hey, I'm totally on your side.
And you're right, if you're just going to use ubuntu, or another big distro, you can rely on nano to be there. But if you are on a truly stripped down system - like a boot floppy, chances are there's only vi. And knowing your way around it could save your life.
I hope never to be in a situation where my life depends on my use of vi (hey, i sense a geek action film in the making...)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple versions of packages installed bakwas_internet Fedora 7 06-01-2007 02:04 PM
Synaptic Multiple Versions Hook99 Linux - Newbie 6 03-13-2005 11:04 AM
multiple versions of gcc Avatar33 Linux - General 3 02-22-2005 03:06 PM
Multiple versions of GLIBC El Craigo Red Hat 2 08-12-2004 12:14 AM
multiple gcc versions and selectability tincat2 Linux - Software 1 06-08-2003 03:38 AM


All times are GMT -5. The time now is 10:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration