Grubb list menu

NoOp glgxg at sbcglobal.net
Fri Feb 5 22:25:04 UTC 2010


On 02/05/2010 10:37 AM, Israel David wrote:
> Hello,
>> Is there a possibility to inverse the order in Grub i.e. windows on top and
>> ubuntu bottom on startup?

Others have mentioned that you can edit /boot/grub/menu.lst, however
that no longer applies if you are using grub2 (installed karmic 9.10
fresh). Unfortunately it's no longer easy to do that with grub2.

These may be of help:
https://help.ubuntu.com/community/Grub2
 - for older versions (pre-karmic)
https://help.ubuntu.com/community/GrubHowto

If you're new to Ubuntu/linux/grub, then perhaps the easiest solution is
to install the startupmanager:
https://help.ubuntu.com/community/StartUpManager
While startupmanager is missing some key features in the grub2 version
that were most useful for grub, it will still allow you to easily select
which OS/kernel to default to from a gui (graphic) application.

  To do the same from a command line (cli):

$ grep menuentry /boot/grub/grub.cfg

that will show you the entries in the menu... count down to the windows
entry and set it as the default by modifing /etc/default/grub. So for
example if your result looks something like this:

$ grep menuentry /boot/grub/grub.cfg
menuentry "Ubuntu, Linux 2.6.31-19-generic" {
menuentry "Ubuntu, Linux 2.6.31-19-generic (recovery mode)" {
menuentry "Ubuntu, Linux 2.6.31-18-generic" {
menuentry "Ubuntu, Linux 2.6.31-18-generic (recovery mode)" {
menuentry "Ubuntu, Linux 2.6.31-17-generic" {
menuentry "Ubuntu, Linux 2.6.31-17-generic (recovery mode)" {
menuentry "Ubuntu, Linux 2.6.31-16-generic" {
menuentry "Ubuntu, Linux 2.6.31-16-generic (recovery mode)" {
menuentry "Ubuntu, Linux 2.6.31-16-386" {
menuentry "Ubuntu, Linux 2.6.31-16-386 (recovery mode)" {
menuentry "Ubuntu, Linux 2.6.31-15-generic" {
menuentry "Ubuntu, Linux 2.6.31-15-generic (recovery mode)" {
menuentry "Ubuntu, Linux 2.6.31-14-generic" {
menuentry "Ubuntu, Linux 2.6.31-14-generic (recovery mode)" {
menuentry "Memory test (memtest86+)" {
menuentry "Memory test (memtest86+, serial console 115200)" {
menuentry "Microsoft Windows XP Professional (on /dev/sda1)" {

I can see that my Win menu entry is 16 (0 thru 16). So I would edit:

$ gksu gedit /etc/default/grub

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.

GRUB_DEFAULT=0

and change to:

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.

GRUB_DEFAULT=16

save the file and then:

$ sudo update-grub

Now if I reboot, the Win item will be automatically selected.

I've still not figured out a way to actually rearrange the menu items in
grub2 (ala put the Win entry at the top), so hopefully someone will come
along with that answer.






More information about the ubuntu-users mailing list