LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   multiple ubuntu versions in grub (https://www.linuxquestions.org/questions/linux-newbie-8/multiple-ubuntu-versions-in-grub-527856/)

Mikhail 02-12-2007 12:20 PM

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

oskar 02-12-2007 12:25 PM

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.

Gethyn 02-12-2007 12:35 PM

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.

oskar 02-12-2007 12:57 PM

You have alot of confidence in your system :D
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.

Hitboxx 02-12-2007 02:02 PM

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.

bouchecl 02-12-2007 03:49 PM

Quote:

Originally Posted by oskar
You have alot of confidence in your system :D
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.

oskar 02-13-2007 01:29 AM

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.

Duck2006 02-13-2007 11:11 AM

http://www.cis.ksu.edu/~bhoward/vi/

bouchecl 02-13-2007 11:34 AM

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!

oskar 02-13-2007 12:22 PM

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.

Duck2006 02-13-2007 01:27 PM

I use nano, i find it much easyer to use.

Gethyn 02-14-2007 11:44 AM

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...)


All times are GMT -5. The time now is 12:32 AM.