add efibootmgr only on uefi systems
This commit is contained in:
parent
85c5275a8f
commit
63a94a5770
|
|
@ -39,7 +39,7 @@ class Installer():
|
||||||
:type hostname: str, optional
|
:type hostname: str, optional
|
||||||
|
|
||||||
"""
|
"""
|
||||||
def __init__(self, target, *, base_packages='base base-devel linux linux-firmware efibootmgr'):
|
def __init__(self, target, *, base_packages='base base-devel linux linux-firmware'):
|
||||||
self.target = target
|
self.target = target
|
||||||
self.init_time = time.strftime('%Y-%m-%d_%H-%M-%S')
|
self.init_time = time.strftime('%Y-%m-%d_%H-%M-%S')
|
||||||
self.milliseconds = int(str(time.time()).split('.')[1])
|
self.milliseconds = int(str(time.time()).split('.')[1])
|
||||||
|
|
@ -50,8 +50,10 @@ class Installer():
|
||||||
}
|
}
|
||||||
|
|
||||||
self.base_packages = base_packages.split(' ') if type(base_packages) is str else base_packages
|
self.base_packages = base_packages.split(' ') if type(base_packages) is str else base_packages
|
||||||
if hasUEFI() == False:
|
if hasUEFI():
|
||||||
self.base_packages.pop(self.base_packages.index("efibootmgr"))
|
self.base_packages.append("efibootmgr")
|
||||||
|
else:
|
||||||
|
self.base_packages.append("grub")
|
||||||
self.post_base_install = []
|
self.post_base_install = []
|
||||||
|
|
||||||
storage['session'] = self
|
storage['session'] = self
|
||||||
|
|
|
||||||
|
|
@ -149,7 +149,7 @@ def ask_for_bootloader() -> str:
|
||||||
if hasUEFI()==False:
|
if hasUEFI()==False:
|
||||||
bootloader="grub-install"
|
bootloader="grub-install"
|
||||||
else:
|
else:
|
||||||
bootloader_choice = input("Would you like to use GRUB as a bootloader instead off systemd-boot [y/N] ").lower()
|
bootloader_choice = input("Would you like to use GRUB as a bootloader instead of systemd-boot? [y/N] ").lower()
|
||||||
if bootloader_choice == "y":
|
if bootloader_choice == "y":
|
||||||
bootloader="grub-install"
|
bootloader="grub-install"
|
||||||
return bootloader
|
return bootloader
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue