Change listings in Grub

Tom H tomh0665 at gmail.com
Sun Jun 20 07:11:51 UTC 2010


On Sat, Jun 19, 2010 at 3:17 PM, Edwin McGuire
<mcguiresmain at emypeople.com> 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
> 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.
> 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


Deletion of 2-5:

Either remove the two extra kernels with
aptitude purge linux-image-2.6.31-14-generic linux-image-2.6.31-21-generic
then
update-grub

Or
set GRUB_HOWMANY=1 in /etc/default/grub
and edit (to re-create grub1's howmany feature)
/etc/grub.d/10_linux
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/492995
https://answers.launchpad.net/ubuntu/+source/grub2/+question/92983
then
update-grub


Default kernel:

Either
set GRUB_DEFAULT=0 in /etc/default/grub
and
mv /etc/grub.d/30_os-prober /etc/grub.d/09_os-prober
then
update-grub

Or
set GRUB_DEFAULT=saved in /etc/default/grub
and run
set-default-grub=4
(assuming that your grub entries are as above)
and run
update-grub
and (when you reboot) select the Windows entry




More information about the ubuntu-users mailing list