Grub Question
As the kernel keeps getting updated will grub just keep adding more and more entries to the boot menu? Can I edit the menu.lst and just delete the older ones without hurting anything?
|
Yes you can edit your menu.lst but why?
|
I'm more used to Fedora but I suspect Ubuntu uses much the same approach. Normally the automatic additions to Grub are limited to the new version and the version it is replacing. Older stanzas are automatically removed.
As to editing the file (\boot\grub\menu.lst or \boot\grub\grub.conf (depending on distro)), "root" can always do that but here, the caveat is "handle with care". If you really try you can end up with an un-bootable system and whilst recreating menu.lst or in a really bad case re-installing grub are both fairly straightforward, neither is really something you want to have to do on a weekly basis. John |
Quote:
If I decide I'll never boot with the older kernel again as is usually the case, I remove the older linux-kernel-image, headers, and linux-kbuild via the package manager like apt or synaptic, and the grub menu.lst will automatically be updated to reflect the changes. There's no need to edit the grub menu.lst if you don't want to use the older kernel, just remove this kernel that you don't want, and keep your system lean to prevent eventual bloating. You can always re-install it later if you decide you want it back. |
You can delete any entry that you want but usually it's a good idea to have at least two kernels on your system.So the best solution would be to limit the number of kernels that will be shown in the grub boot menu.To do so edit /boot/grub/menu.lst (gksu gedit /boot/grub/menu.lst), find "#howmany=all" and change it to "#howmany=2",save the file and then run "sudo update-grub".Then you will see only newest two kernels.You can then delete older kernels if you like.
|
Quote:
I can hardly imagine how anyone with a minimal common sense could render unbootable a system by just removing one old kernel from the list (unless the only remaining kernel is a self-compiled and untested kernel, of course). Besides that, if you screw up your config, reinstalling grub to the mbr is not going to help at all. And, anyway, as long as grub is on the mbr and you have a kernel on your disk, the system is bootable, because grub, unlike lilo, permits manual operation at boot time, so you can edit your kernel lines and boot any kernel that you have on your hard drive, as long as it's into one of the filesystems that grub can read from. You even have a shell-like feeling and tab autocompletion, even an elephant could find a kernel to boot from that way. Sample grub.conf: Code:
title foo-2.5.22 |
In ubuntu go to Synaptic Package Manager and load startup manager, you can clean up your menu.lat from there.
|
All times are GMT -5. The time now is 07:22 AM. |