How to edit grub to add new kernel 2.6.34 under Ubuntu 12.04TLS desktop?

Asked by gaoqiang

I want to add a new kernel under Ununtu 12.04TLS, but I can't find the file "/boot/grub/menu.lst. Then, I referd some answers from Ubuntu community, It is said to edit under "/etc/grub.d" and file" /etc/default/grub". But I can't solve it . Who could tell me the steps in detail, I would be very appreciated!
My current kernel is linux-3.2.0-23-generic.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu grub2 Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

If you install the kernel debs it will make an entry for you as grub will see the kernel files in /boot

Revision history for this message
samuel (samuel-h) said :
#2

/boot/grub/menu.lst was only used in grub 1, most systems now use grub 2 which uses /boot/grub/grub.cfg, however, editing this is not recomended! Only edit it if you really know what your doing. And remember what once worked in grub 1 may not be correct for grub 2 so some reasearch into how to edit this file may be nesscary. The more safe way of doing this is to edit /etc/default/grub (there should be plenty of material online that explains how to do this), after that you run sudo update-grub, which updates /boot/grub/grub.cfg, by reading the /etc/default/grub file. This preforms error checking, and makes the syntax for editing /etc/default/grub simpler from when you just had to edit the menu.lst file. So editing it this way is probably the way to go. I can't give you much advice from there, but hopefully now that you know what to edit, you will be able to find the material online.

PS: deffininetely remember to run sudo update-grub, I always forget and spend around 5 minutes wondering why my new configuration isn't applied :D

Revision history for this message
gaoqiang (aidegaoqiang) said :
#3

Thanks very much, I think i would solve it.^ ^

Can you help with this problem?

Provide an answer of your own, or ask gaoqiang for more information if necessary.

To post a message you must log in.