Change listings in Grub

NoOp glgxg at sbcglobal.net
Sun Jun 20 00:58:58 UTC 2010


On 06/19/2010 12:17 PM, Edwin McGuire wrote:
> Can I change to one listing of kernel choice on menu instead of 3 which I have. Thanks to Colin was able to change default OS this way,
>  sudo gedit /etc/default/grub

Colin told you wrong... Please do not use 'sudo gedit'. Instead use
'gksudo or gksu gedit'. For graphical applications use gksu or gksudo
instead.

>  then
>  sudo update-grub
> I have6 lines of Linux kernels:
> 
> 0        Ubuntu, Linux 2.6.31-22-Generic
> 1        Ubuntu, Linux 2.6.31-22-Generic (recovery mode)
> 2        Ubuntu, Linux 2.6.31-21-Generic
> 3        Ubuntu, Linux 2.6.31-21-Generic (recovery mode)
> 4        Ubuntu, Linux 2.6.31-14-Generic
> 5        Ubuntu, Linux 2.6.31-14-Generic (recovery mode)
> 6    #  memory test (memtest86+)
> 7        memory test (memtest86+,serial console 115200)
> 8    *   Microsoft Windows XP Professional 
> 
> *   now default
> #  old default
> 
> can I delete lines 2-5.
> then also change default # again to 4.

It wouldn't make any difference. The lines are not contained in
/etc/default/grub. The information is reporting the linux kernels on
your system.

> new would be:
> 
> 0    Ubuntu, Linux 2.6.31-22-Generic
> 1    Ubuntu, Linux 2.6.31-22-Generic (recovery mode)
> 2    memory test (memtest86+)
> 3    memory test (memtest86+,serial console 115200)
> 4    Microsoft Windows XP Professional 
> 
> Am I on the right track.

*No* If you wish to remove some of the kernels (I recomend that you
*keep* one older kernel - 2.6.31-21-Generic for the time being - that
gives you a fallback kerenel if you have problems with
2.6.31-22-Generic). Open Synaptic and look for 2.6.31-14. Click on the
leftmost column to see what is installed (green), select all 2.6.31-14's
with 'linux-headers, linux-image) and 'Mark for complete removal' - Apply.

Now if you wish to remove one of the 'memory test' entries read the pdf
that I sent to you:
<quote>
20_memtest86+ Searches for /boot/memtest86+.bin and includes it as an
option on the GRUB 2 boot menu. There is currently no line option to
remove this entry from the menu. The display of memtest86+ can be
inhibited by removing the executable bit from this file: sudo chmod -x
/etc/grub.d/20_memtest86+ and then running sudo update-grub.
</quote>

so:

$ sudo chmod -x /etc/grub.d/20_memtest86+
$ sudo update-grub

And now you should see:
0        Ubuntu, Linux 2.6.31-22-Generic
1        Ubuntu, Linux 2.6.31-22-Generic (recovery mode)
2        Ubuntu, Linux 2.6.31-21-Generic
3        Ubuntu, Linux 2.6.31-21-Generic (recovery mode)
4    *   Microsoft Windows XP Professional

If you decide that you'd like to have the memtest back later on:

$ sudo chmod +x /etc/grub.d20_memtest86+

and then:

$ sudo update-grub

to verify that it works & you now have the memtest86+ back.






More information about the ubuntu-users mailing list