[Solved] Change default grub option

Forum Forums New users New Users and General Questions [Solved] Change default grub option

  • This topic has 2 replies, 2 voices, and was last updated Dec 21-9:08 pm by Askic.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #47894
    Member
    Askic

      Hello guys,

      I have installed antix 19.3 in a dual boot with Windows. Recently I had to change default timeout option and you guys told me I should use Control Centre -> Edit Config File and to change GRUB_TIMEOUT value.
      Than worked like a charm. However I’d like now to change default option for booting OS. antix is on the first (default) place, and Windows is on the second, last and fourth place.
      I have looked again in the header file but there are variable and not absolute names.

      
      if [ "x${GRUB_DEFAULT}" = "x" ] ; then GRUB_DEFAULT=0 ; fi
      if [ "x${GRUB_DEFAULT}" = "xsaved" ] ; then GRUB_DEFAULT='${saved_entry}' ; fi
      if [ "x${GRUB_TIMEOUT}" = "x" ] ; then GRUB_TIMEOUT=5 ; fi
      if [ "x${GRUB_GFXMODE}" = "x" ] ; then GRUB_GFXMODE=auto ; fi
      
      if [ "x${GRUB_DEFAULT_BUTTON}" = "x" ] ; then GRUB_DEFAULT_BUTTON="$GRUB_DEFAULT" ; fi
      if [ "x${GRUB_DEFAULT_BUTTON}" = "xsaved" ] ; then GRUB_DEFAULT_BUTTON='${saved_entry}' ; fi
      if [ "x${GRUB_TIMEOUT_BUTTON}" = "x" ] ; then GRUB_TIMEOUT_BUTTON="$GRUB_TIMEOUT" ; fi
      

      So, the default option is saved entry, but I don’t know where this entry was saved. How to change this option?
      I guess it is in the /etc/default/grub but I don’t dare to edit this file until read something from you.
      Thank you!

      • This topic was modified 2 years, 4 months ago by Askic.
      • This topic was modified 2 years, 4 months ago by Askic.
      • This topic was modified 2 years, 4 months ago by Askic.
      #47907
      Moderator
      caprea
        Helpful
        Up
        0
        ::

        Yes, it’s in /etc/default/grub
        It’s the number in the line
        GRUB_DEFAULT=0

        The zero stands for the first entry.
        If the second entry shall be the first, a one must be entered there.
        GRUB_DEFAULT=1

        and so on.
        Don’t miss sudo update grub afterwards.

        #47910
        Member
        Askic
          Helpful
          Up
          0
          ::

          Thank you caprea, that solved the problem. I thought there is some kind of a GUI tool for this, but the suggested solution worked as intended. Since 0 is te 1st element, I had to change 0 with 3 in order to boot 4th option as a default one.
          Thank you very much!

        Viewing 3 posts - 1 through 3 (of 3 total)
        • You must be logged in to reply to this topic.