Hay algunas versiones de Linux que tienen el grub configurado para que este recuerde el ultimo sistema operativo con que se inicio y lo tenga seleccionado como default. Esto es muy útil cuando usas un equipo con múltiples sistemas operativos (Windows y/o Linux) y andas reiniciando entre ellos.
Hay dos opciones que vamos a tomar de la documentación oficial del grub (no la wiki de Arch): GRUB_DEFAULT y GRUB_SAVEDEFAULT:
‘GRUB_DEFAULT’
……………..
If you set this to ‘saved’, then the default menu entry will be that saved by ‘GRUB_SAVEDEFAULT’, grub-set-default, or grub-reboot.
‘GRUB_SAVEDEFAULT’
If this option is set to ‘true’, then, when an entry is selected, save it as a new default entry for use by future runs of GRUB. This is only useful if ‘GRUB_DEFAULT=saved’; it is a separate option because ‘GRUB_DEFAULT=saved’ is useful without this option, in conjunction with grub-set-default or grub-reboot. Unset by default. This option relies on the environment block, which may not be available in all situations (see Environment block).
Ok, para hacer esto en nuestro ArchLinux, o en cualquier distro con grub2 ya que los archivos son estándar, hay que editar el archivo /etc/default/grub y
Editar esta linea asi (el default es cero):
GRUB_DEFAULT=saved
Y descomentar esta otra:
GRUB_SAVEDEFAULT=true
Por ultimo editamos el archivo /etc/grub.d/40_custom y agregamos al final la opción:
savedefault
Al final actualizamos el grub
grub-mkconfig -o /boot/grub/grub.cfg
Y listo.
Si por ejemplo tienen ArchLinux y Windows, reinician el equipo con Windows, y al reiniciar de nuevo Windows sera la opción default hasta que inicien con Arch 😀