Audio/video stream recording forums (http://stream-recorder.com/forum/index.php)
-   Linux and software for Linux (http://stream-recorder.com/forum/forumdisplay.php?f=61)
-   -  

How to edit grub entries in Ubuntu 9.10 (No file /boot/grub/menu.lst)

(http://stream-recorder.com/forum/showthread.php?t=5122)

Stream Recorder 12-11-2009 05:42 AM

How to edit grub entries in Ubuntu 9.10 (No file /boot/grub/menu.lst)


 
Grub entries in Ubuntu 9.10 can be found in the following file
Code:

/boot/grub/grub.cfg
compared to the following file used in previous versions:
Code:

/boot/grub/menu.lst
grub.cfg contains the Grub menu instructions. Unlike menu.lst, grub.cfg is NOT MEANT TO BE EDITED!!! grub.cfg is automatically generated or updated whenever "update-grub" is executed. The command must be run as root.


Code:

grub (/etc/default/grub)
This file contains information previously found in the upper section of /boot/grub/menu.lst. It contains settings primarily affecting Grub's menu display. This file can be edited by root to make changes to these settings; they will be imported into grub.cfg when "update-grub" is executed.

Code:

/etc/grub.d/ (folder)
The files in this folder are read during execution of '"update-grub"'command. The scripts in these files export the information they gather into /boot/grub/grub.cfg


More about editing Grub2 entries

Stream Recorder 12-11-2009 06:02 AM

Re: How to edit grub entries in Ubuntu 9.10 (No file /boot/grub/menu.lst)


 
If you want to remove entries with old kernels from your Grub menu, remove the kernel and the Grub entry will be removed as well.

How to remove old kernels
  1. Go to Terminal and paste the following command: uname -r
    It will print the version of the Linux kernel you are running, this is the one you want to keep. It should look something like this: 2.6.31-16-generic.
  2. Go to System -> Administration -> Synaptic Package Manager
  3. Paste "linux-image-" (without quotes) into the search box of Synaptic Package Manager. The results should show every available and installed kernel. A green box on the left indicates that the package is installed.
  4. Once you have located an old kernel, right-click on it and select "Mark For Complete Removal". Repeat for every kernel that you want to remove (make sure to leave the current kernel!!!) and click the Apply.

Please note that you need to be very careful with what you remove. Do NOT remove your current kernel, or anything that is not a linux-image. It is possible to break Ubuntu otherwise!

Your computer and Grub menu should now be free of old kernels.

mikellis 06-06-2011 04:08 AM

Re: How to edit grub entries in Ubuntu 9.10 (No file /boot/grub/menu.lst)


 
Thank you so much for this brilliant description of how to edit the Grub 2 file. Other web sites suggested messing about with a linux config files and all sorts of horrors.! Your simple explanation worked perfectly first time. Thank you.


All times are GMT -6. The time now is 10:50 AM.