Ubuntu 10.4 Menu Issue

Asked by Cruiser

I wish to change the position that Windows 7 Recovery is appearing on the menu. At the moment it appears in position to one and I want it to appear at position two.
 The menu shows:
Windows 7 (loader) (on /dev/sda1)
Windows 7 (loader) (on /dev/sda2)
Ubuntu with Linux 2.6.32-24-generic
Ubuntu with Linux 2.6.32-24-generic (recovery mode)

When I switch on I want the system to initially go in to Windows 7 but it goes into the Windows 7 recovery mode.
I have altered the position of Ubuntu by just changing the file number so that it loads later into the grub.cfg
I have looked at your answer section and tried puting the following code into 40_custom but it doesn't work.
menuentry "Windows 7" {
 insmod ntfs
 set root=(hd0,2)
 search --no-floppy --fs-uuid --set e2c0e27ec0e257f5
 drivemap -s (hd0) ${root}
 chainloader +1
}
menuentry "Windows 7 Recovery" {
 insmod ntfs
 set root=(hd0,1)
 search --no-floppy --fs-uuid --set e2c0e27ec0e257f5
 drivemap -s (hd0) ${root}
 chainloader +1
}
It shows the following in grub.cfg:
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry "Windows 7" {
 insmod ntfs
 set root=(hd0,2)
 search --no-floppy --fs-uuid --set e2c0e27ec0e257f5
 drivemap -s (hd0) ${root}
 chainloader +1
}
menuentry "Windows 7 Recovery" {
 insmod ntfs
 set root=(hd0,1)
 search --no-floppy --fs-uuid --set e2c0e27ec0e257f5
 drivemap -s (hd0) ${root}
 chainloader +1
}
### END /etc/grub.d/40_os-prober ###

When the computer is reset the Windows entries are missing from the start menu.

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

You edit the default in /etc/default/grub

Then run:

sudo update-grub

To apply the setting.

Revision history for this message
delance (olivier-delance) said :
#2

In /etc/default/grub, DEFAULT has currently value 0, set it to 1.
To edit this file, use (as it's a system file)
   sudo gedit /etc/default/grub
And then
   sudo update-grub
And reboot

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

sudo is NOT to be used with gedit. Using sudo with graphical apps like nautilus and gedit will change the ownership of the users ~/.ICEauthority to root;root and the user will get system issues. This is VERY easy to avoid by using the system properly. The correct method is:

gksudo gedit /etc/default/grub

and you will not damage your system. I suggest you read:
http://www.psychocats.net/ubuntu/graphicalsudo

It is fixable by booting to root recovery and chmodding to the user again but it can be so easily avoided

Revision history for this message
delance (olivier-delance) said :
#4

In /etc/default/grub, DEFAULT has currently value 0, set it to 1.
To edit this file, use (as it's a system file)
   gksudo gedit /etc/default/grub
And then
   sudo update-grub
And reboot

Revision history for this message
Cruiser (cruiser46) said :
#5

I was trying to swap the position in which the menu presented itself on the screen, however the editing of the default grub as suggested does position the start up at the correct location on the menu and as such if I am not attending when the computer fires up it will now go into the required OS. When I become more used to Ubuntu I might change this to be my preferred start system.
If you can suggest how I can actually swap the position an entry is listed in the menu I might help me to get my head around how that works. I know that altering the names of the files held in grub.d folder will alter the sequence that they start up in but I cannot see how to alter the individual items within the file 30_os-prober which will alter its position to be shown in the menu.
Thanks for your help

Revision history for this message
delance (olivier-delance) said :
#6

Sorry, I misunderstood question.
Rename /etc/grub.d/40_custom as /etc/grub.d/15_custom, and run
   sudo update-grub
and reboot.

Can you help with this problem?

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

To post a message you must log in.