Announcement

Collapse
No announcement yet.

How do I change the default OS in Grub?

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

    How do I change the default OS in Grub?

    I want to change the default OS that Grub will open. On the Grub site it says I need to find the "menu.lst" file. I did a search for this file but it didn't show up.

    What to do?

    Thanks!

    #2
    Re: How do I change the default OS in Grub?

    There is more than one "Grub". The menu.lst file is used in the old GRUB, aka GRUB Legacy, or Grub 0.9x.

    The newer GRUB - the one installed by kubuntu 9.10 - aka GRUB2, GRUB-PC, GRUB 1.97 - uses a different set of files.

    The one you're looking for is /etc/default/grub.

    Look for the line GRUB_DEFAULT=0
    and change the number to the one you want as default

    Please Read Me

    Comment


      #3
      Re: How do I change the default OS in Grub?

      Originally posted by oshunluvr
      There is more than one "Grub". The menu.lst file is used in the old GRUB, aka GRUB Legacy, or Grub 0.9x.

      The newer GRUB - the one installed by kubuntu 9.10 - aka GRUB2, GRUB-PC, GRUB 1.97 - uses a different set of files.

      The one you're looking for is /etc/default/grub.

      Look for the line GRUB_DEFAULT=0
      and change the number to the one you want as default
      You'll also want to run 'sudo update-grub' after the change to apply the changes to grub config.

      One problem with changing the default number is that if you install newer kernels (without removing the old ones) the number you chose will likely point to a different OS/kernel that you originally set. So you'll need to change the default again or remove old kernels.

      If you wish to change another OS (like windows) as the default, a better option is usually to move the Windows menu entry to the top and leave GRUB_DEFAULT as "0". You can move non-linux OSs to the top of the menu by renaming /etc/grub.d/30_os-prober to something like /etc/grub.d/08_os-prober (so it gets run prior to /etc/grub.d/10_linux)...you'll also need to run 'sudo update-grub' after this change.

      Comment


        #4
        Re: How do I change the default OS in Grub?

        For your bookmarks.

        GRUB 2

        GRUB 2 A Guide for Users
        http://kubuntuforums.net/forums/inde...opic=3106368.0

        by drs305
        http://ubuntuforums.org/showthread.php?t=1195275

        Ubuntu WIKI (largely written by drs305)
        https://help.ubuntu.com/community/Grub2

        by Herman
        http://members.iinet.net/%7Eherman546/p20.html


        GRUB Legacy
        How To GRUB Methods - Toolkit
        http://kubuntuforums.net/forums/inde...opic=3081671.0
        An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

        Comment


          #5
          Re: How do I change the default OS in Grub?

          Originally posted by oshunluvr
          .....
          The one you're looking for is /etc/default/grub.

          Look for the line GRUB_DEFAULT=0
          and change the number to the one you want as default
          And knowing which number to use to set "GRUB_DEFAULT" to is the trick. To know that you have to open up /boot/grub/grub.cfg and count the number of lines beginning with "menuentry", starting with 0, till you come to the menuentry with the kernel you want to have run automatically when you boot up.


          This situation is a definite departure from the simplicity of "menu.lst", where one simply used an editor to rearrange the order of the entries to suit themselves, saved the file, and rebooted. Grub was an improvement over LILO, but I haven't read why the developers changed from grub to grub2. IMO, grub2 needs a LOT of work, or a better gui editor, in order for it to return to the simplicity of grub and menu.lst. Systemsettings used to have a grub editor but the only time I tried it I was greeted with a mess: it tried to create menu.lst and messed up grub.cfg, so while Jaunty was using grub2 the grub editor was for grub. Lucid Lynx does not have a grub editor in systemsettings.
          "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
          – John F. Kennedy, February 26, 1962.

          Comment


            #6
            Re: How do I change the default OS in Grub?

            According to drs305 in his Introduction (Section 1), some work is planned for StartupManager, and it can handle a couple simple tasks now for GRUB 2, but it's a long way off from being of much use:
            http://ubuntuforums.org/showthread.php?t=1195275

            As for your other comments about GRUB 2, I must agree, as do, I believe, most other people familiar with GRUB. GRUB2 does handle GPT and some other things, but, well, seems that GRUB Legacy could have been modified to do that also. GRUB 2 seems a bit ... inconvenient, not intuitive, I think. The key--so we don't have to mess with it--is to have a GOOD GUI editor for it, one that actually works in all situations (multi-disk, multi-boot). GRUB 2 makes any custom booting setups seem, again, inconvenient, difficult, not entirely straightforward. What am I really saying here? GRUB 2 took all the fun out this!

            An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

            Comment


              #7
              Re: How do I change the default OS in Grub?

              Yeah - I actually think they put some into GRUB2 that everyone always whined about in lilo!

              i.e. Having to execute an external program to update the bootloader "update-grub" = "lilo"

              Kinda cracks me up.

              No doubt there are MANY things better in GRUB2, but I just thought that one example was ironic.

              Please Read Me

              Comment

              Working...
              X