Announcement

Collapse
No announcement yet.

[SOLVED] - grub2 and setting Windows as default boot

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [SOLVED] - grub2 and setting Windows as default boot

    [rant]First off, my children are spoiled and don't want to use Linux on the computer I put together for them. [/rant]

    I need to edit my grub configuration so that Windows 7 is the default boot client. Here is my current list:

    Code:
    root@dpich-M70:/home/dpich# grep menuentry /boot/grub/grub.cfg
    menuentry 'Ubuntu, with Linux 2.6.35-25-generic' --class ubuntu --class gnu-linux --class gnu --class os {
    menuentry 'Ubuntu, with Linux 2.6.35-25-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
    menuentry 'Ubuntu, with Linux 2.6.35-24-generic' --class ubuntu --class gnu-linux --class gnu --class os {
    menuentry 'Ubuntu, with Linux 2.6.35-24-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
    menuentry 'Ubuntu, with Linux 2.6.35-22-generic' --class ubuntu --class gnu-linux --class gnu --class os {
    menuentry 'Ubuntu, with Linux 2.6.35-22-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
    menuentry "Memory test (memtest86+)" {
    menuentry "Memory test (memtest86+, serial console 115200)" {
    menuentry "Windows 7 (loader) (on /dev/sda1)" {
    root@dpich-M70:/home/dpich#
    According to https://help.ubuntu.com/community/Grub2, I need to issue this to set the default boot option:

    Code:
    sudo grub-set-default 3 or sudo grub-set-default "Ubuntu, Linux 2.6.32-15-generic"
    So on to my questions. If I use the number and there is a new kernel, setting my default as 9 (winders), and then adding another kernel, would the default be able to handle the shift? New kernel makes menu item 9 move to menu item 11. Or, could I just use grub-set-default "Windows 7 (loader) (on /dev/sda1)" instead locking it into the name?

    I don't think that this is that hard. I'm probably just making it hard than it is, which is normal for me.

    #2
    Re: grub2 and setting Windows as default boot

    Wouldn't it be simpler if you used:
    startupmanager
    ?
    "A problem well stated is a problem half solved." --Charles F. Kettering
    "Sometimes the questions are complicated and the answers are simple."--Dr. Seuss

    Comment


      #3
      Re: grub2 and setting Windows as default boot

      The easiest way I can think of is to alter the scripts in /etc/grub.d

      Look there and you see:

      Code:
      -rwxr-xr-x 1 root root 4444 23.11.2010 13:38 00_header*
      -rwxr-xr-x 1 root root 1416 23.11.2010 13:30 05_debian_theme*
      -rwxr-xr-x 1 root root 4843 23.11.2010 13:38 10_linux*
      -rwxr-xr-x 1 root root 918 23.03.2010 02:40 20_memtest86+*
      -rwxr-xr-x 1 root root 6605 23.11.2010 13:38 30_os-prober*
      -rwxr-xr-x 1 root root 214 23.11.2010 13:38 40_custom*
      -rw-r--r-- 1 root root 483 23.11.2010 13:38 README
      These are executable scripts than run in the order they are listed. I think if you simply rename 30_os-proberto 07_os-prober and run update-grub, you'd be good to go. Thsi assumes the only other os you have installed is windows.

      Otherwise, you can build a custom menu in 40_custom and move it to 07_custom.

      Please Read Me

      Comment


        #4
        grub2 and setting Windows as default boot

        Thanks Guys! Both great suggestions and they both work!

        Comment

        Working...
        X