On 06/30/2012 07:51 AM, Tony Molloy wrote:
I've got a remote test box which is set to dual boot Fedora 17 and
CentOS 6 using grub2 as the bootloader.
It's currently set to boot into Fedora "default=0" in grub.cfg
I want to change it to temporarly boot into CentOS. I've got the
following menu entries in grub.cfg
menuentry 'Fedora (3.4.3-1.fc17.i686.PAE)'
submenu 'Advanced options for Fedora Linux'
menuentry 'CentOS release 6.2 (Final)'
submenu 'Advanced options for CentOS release 6.2 (Final)'
menuentry 'CentOS (2.6.32-220.13.1.el6.i686)
menuentry 'CentOS (2.6.32-220.7.1.el6.i686)
What should I set default to to boot into CentOS. Should it be 1 if
the submenu entries don't count or 2 if they do count.
There is a syntax for using numbers (involving the ">" character) but
is easy to use the menu title.
grub-setdefault "CentOS release 6.2 (final)" will gondition grub2 to
boot CentOS on the next boot.
The documentation for this is in the "info grub2" tree by looking at
"Environment" and then "default"