Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan M. Taylor <dylan@dylanmtaylor.com>2022-02-13 04:09:05 -0500
committerGitHub <noreply@github.com>2022-02-13 10:09:05 +0100
commit8457aa5660553faa811f26246059fa4cd84852cd (patch)
treedfcacb74a90c38bbbc591817ceb21dcf6760e20e
parent2c897cdcc6d5d0e7ee024c374cdf9c849870e081 (diff)
Set default bootloader based on presence of UEFI (#980)
* Set default bootloader based on presence of UEFI * Correct a comment
-rw-r--r--archinstall/lib/menu/selection_menu.py4
-rw-r--r--examples/guided.py2
2 files changed, 4 insertions, 2 deletions
diff --git a/archinstall/lib/menu/selection_menu.py b/archinstall/lib/menu/selection_menu.py
index afa713ba..84bb8e2f 100644
--- a/archinstall/lib/menu/selection_menu.py
+++ b/archinstall/lib/menu/selection_menu.py
@@ -6,6 +6,7 @@ from typing import Callable, Any, List, Iterator
from .menu import Menu
from ..general import SysCommand, secret
+from ..hardware import has_uefi
from ..storage import storage
from ..output import log
from ..profiles import is_desktop_profile
@@ -454,7 +455,8 @@ class GlobalMenu(GeneralMenu):
self._menu_options['bootloader'] = \
Selector(
_('Select bootloader'),
- lambda: ask_for_bootloader(storage['arguments'].get('advanced', False)),)
+ lambda: ask_for_bootloader(storage['arguments'].get('advanced', False)),
+ default="systemd-bootctl" if has_uefi() else "grub-install")
self._menu_options['hostname'] = \
Selector(_('Specify hostname'), lambda: ask_hostname())
self._menu_options['!root-password'] = \
diff --git a/examples/guided.py b/examples/guided.py
index 39d324fe..60cf79ad 100644
--- a/examples/guided.py
+++ b/examples/guided.py
@@ -55,7 +55,7 @@ def ask_user_questions():
# Get disk encryption password (or skip if blank)
global_menu.enable('!encryption-password')
- # Ask which boot-loader to use (will only ask if we're in BIOS (non-efi) mode)
+ # Ask which boot-loader to use (will only ask if we're in UEFI mode, otherwise will default to GRUB)
global_menu.enable('bootloader')
global_menu.enable('swap')