Next: , Previous: , Up: Special environment variables   [Contents][Index]


15.1.10 default

If this variable is set, it identifies a menu entry that should be selected by default, possibly after a timeout (see timeout). The entry may be identified by number (starting from 0 at each level of the hierarchy), by title, or by id.

For example, if you have:

menuentry 'Example GNU/Linux distribution' --class gnu-linux --id example-gnu-linux {
	...
}

then you can make this the default using:

default=example-gnu-linux

If the entry is in a submenu, then it must be identified using the number, title, or id of each of the submenus starting from the top level, followed by the number, title, or id of the menu entry itself, with each element separated by ‘>’. For example, take the following menu structure:

GNU/Hurd --id gnu-hurd
  Standard Boot --id=gnu-hurd-std
  Rescue shell --id=gnu-hurd-rescue
Other platforms --id=other
  Minix --id=minix
    Version 3.4.0 --id=minix-3.4.0
    Version 3.3.0 --id=minix-3.3.0
  GRUB Invaders --id=grub-invaders

The more recent release of Minix would then be identified as ‘Other platforms>Minix>Version 3.4.0’, or as ‘1>0>0’, or as ‘other>minix>minix-3.4.0’.

This variable is often set by ‘GRUB_DEFAULT’ (see Simple configuration), grub-set-default, or grub-reboot.