BOINC-AUSTRALIA FORUM

Members Only => ALL ABOUT HARDWARE => ALL THINGS LINUX => Topic started by: Mike Mitchell on August 01, 2009, 01:42:57 PM

Title: Reducing The Number Of Boot Images
Post by: Mike Mitchell on August 01, 2009, 01:42:57 PM
What is the correct way to reduce the number of boot images?

Yoda posted a method on the old forum but for the life of me I can't remember how it is done and my Kubuntu box has about 18 of them now.

:penguin: <= The Kubuntu Penguins?
Title: Re: Reducing The Number Of Boot Images
Post by: kashi on August 01, 2009, 02:15:51 PM
 I think you go to Adept or Synaptic or whatever and search for linux-image and remove the old ones.
Title: Re: Reducing The Number Of Boot Images
Post by: Mike Mitchell on August 04, 2009, 01:32:58 PM
Quote from: kashi on August 01, 2009, 02:15:51 PM
I think you go to Adept or Synaptic or whatever and search for linux-image and remove the old ones.

How is that done?
Title: Re: Reducing The Number Of Boot Images
Post by: BF on August 04, 2009, 02:23:18 PM
Quote from: Mike Mitchell on August 01, 2009, 01:42:57 PM
What is the correct way to reduce the number of boot images?

Yoda posted a method on the old forum but for the life of me I can't remember how it is done and my Kubuntu box has about 18 of them now.

:penguin: <= The Kubuntu Penguins?

If you're talking about cleaning up the boot menu, instructions for that are here (http://www.howtogeek.com/howto/ubuntu/clean-up-ubuntu-grub-boot-menu-after-upgrades/).
Title: Re: Reducing The Number Of Boot Images
Post by: WikiWill on August 04, 2009, 02:25:44 PM
Do you mean kernel images?  I go for the manual approach.  Disclaimer: this is for Ubuntu so your approach may need to be different.

As root (eg using 'sudo -s' from your normal account), do this:
# cd /boot
# ls -l vml*
# uname -a

The 'ls' cmd lists all kernels.  Then the uname cmd shows which kernel image is in use.

Then I use rm *carefully* to remove unwanted versions.  For example on my current system I'm using 2.6.28-14-generic, so I do:

# ls *2.6.28-11*

The above confirms my selection criteria is right

# rm *2.6.28-11*

The above removes all components of the old kernel.

Then I edit the boot menu (GRUB in my case):

# cp grub/menu.lst grub/menu.backup
# vi grub/menu.lst

and I delete the 4-line sets for each kernel version and matching generic config that I rm'ed earlier.  This file controls your PC's boot process so be careful eh!

This is all a bit old skool, I'm sure there are quicker tools now.
Title: Re: Reducing The Number Of Boot Images
Post by: veebee on August 04, 2009, 04:51:39 PM
are you guys talking about when the machine's booting up, it basically 'asks you" which kernel to load (just after "loading GRUB")?

only one of my machines actually "shows" that...

I imagine though, that the others are the same, just simply automatically loading the latest? (I have Ubuntu 8.04, 8.10 and 9.04 on my three machines here.)
Title: Re: Reducing The Number Of Boot Images
Post by: kashi on August 04, 2009, 06:01:21 PM
Quote from: Mike Mitchell on August 04, 2009, 01:32:58 PM
Quote from: kashi on August 01, 2009, 02:15:51 PM
I think you go to Adept or Synaptic or whatever and search for linux-image and remove the old ones.

How is that done?

I haven't got a working install of Kubuntu at the moment to give exact instructions, but from memory you just start Synaptic and type linux-image in the search box. In the results that you receive you tick the checkbox "mark for removal" of all the old versions of linux-image entries that you no longer need. You need to keep the latest one you are using of course and I used to keep the one before that as a kind of backup and remove all the other old ones. This automatically removes the grub entries for the old linux-image files you have removed.

I'm sure you can do it manually, but this way was easier and safer for me with my limited Linux knowledge.
Title: Re: Reducing The Number Of Boot Images
Post by: Mike Mitchell on August 05, 2009, 12:16:47 AM
I thought the method Yoda posted in the old forum had a way to tick an option or two to purge the older kernel images. I can remove them manually but was hoping for a slightly more automated option, after all, there have been quite a few kernels released since 9.04 was made public.
Title: Re: Reducing The Number Of Boot Images
Post by: Mike Mitchell on August 21, 2009, 09:43:19 PM
I found it:

How to purge the excess Linux images:
sudo apt-get autoclean

Well, perhaps it just worked this time. Don't know what I did the last time but it just knocked out the old images and left the last two. Just what I was after, hope I can remember next time.  biggrin
Title: Re: Reducing The Number Of Boot Images
Post by: BF on August 21, 2009, 10:09:02 PM
Quote from: Mike Mitchell on August 21, 2009, 09:43:19 PM
I found it:

How to purge the excess Linux images:
sudo apt-get autoclean

Well, perhaps it just worked this time. Don't know what I did the last time but it just knocked out the old images and left the last two. Just what I was after, hope I can remember next time.  biggrin

Ctrl D  biggrin
Title: Re: Reducing The Number Of Boot Images
Post by: Mike Mitchell on August 22, 2009, 12:35:10 AM
Quote from: BF on August 21, 2009, 10:09:02 PMCtrl D  biggrin

??? Not sure what ya mean? I use Ctrl D when I'm finished to close the CLI but I'm old and remember lots of Ctrl codes. (Like Ctrl M, L, T, etc)
Title: Re: Reducing The Number Of Boot Images
Post by: kashi on August 22, 2009, 01:31:34 AM
Thanks for sharing that information Mike. I didn't know about autoclean. I used Synaptic to clean up old files.

While I was looking to see how autoclean worked I found an article with many different ways to delete old packages and dependencies that are no longer needed in Linux:
How to spring-clean an Apt-based distro (http://www.freesoftwaremagazine.com/columns/how_to_spring_clean_an_apt_based_distro)
Title: Re: Reducing The Number Of Boot Images
Post by: Mike Mitchell on August 22, 2009, 02:43:16 AM
Good link Kashi, I particularly like this one: sudo gtkorphan &

Plus one for the assist.  :penguin:
Title: Re: Reducing The Number Of Boot Images
Post by: BF on August 22, 2009, 03:20:10 AM
Quote from: Mike Mitchell on August 22, 2009, 12:35:10 AM
Quote from: BF on August 21, 2009, 10:09:02 PMCtrl D  biggrin

??? Not sure what ya mean? I use Ctrl D when I'm finished to close the CLI but I'm old and remember lots of Ctrl codes. (Like Ctrl M, L, T, etc)

In your browser Ctrl D makes a bookmark..  so you will remember next time >:D
Title: Re: Reducing The Number Of Boot Images
Post by: Mike Mitchell on August 22, 2009, 04:51:02 PM
Quote from: BF on August 22, 2009, 03:20:10 AMIn your browser Ctrl D makes a bookmark..  so you will remember next time >:D

Ah, I was up the wrong tree and barking.