|
|
|
@ -33,7 +33,7 @@ from libcalamares.utils import check_chroot_call
|
|
|
|
|
|
|
|
|
|
def get_uuid():
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
Checks and passes 'uuid' to other routine.
|
|
|
|
|
|
|
|
|
|
:return:
|
|
|
|
|
"""
|
|
|
|
@ -50,7 +50,7 @@ def get_uuid():
|
|
|
|
|
|
|
|
|
|
def get_bootloader_entry_name():
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
Passes 'bootloader_entry_name' to other routine based on configuration file.
|
|
|
|
|
|
|
|
|
|
:return:
|
|
|
|
|
"""
|
|
|
|
@ -63,6 +63,7 @@ def get_bootloader_entry_name():
|
|
|
|
|
|
|
|
|
|
def get_kernel_line(kernel_type):
|
|
|
|
|
"""
|
|
|
|
|
Passes 'kernel_line' to other routine based on configuration file.
|
|
|
|
|
|
|
|
|
|
:param kernel_type:
|
|
|
|
|
:return:
|
|
|
|
@ -81,6 +82,7 @@ def get_kernel_line(kernel_type):
|
|
|
|
|
|
|
|
|
|
def create_conf(uuid, conf_path, kernel_line):
|
|
|
|
|
"""
|
|
|
|
|
Creates gummiboot configuration files based on given parameters.
|
|
|
|
|
|
|
|
|
|
:param uuid:
|
|
|
|
|
:param conf_path:
|
|
|
|
@ -113,6 +115,7 @@ def create_conf(uuid, conf_path, kernel_line):
|
|
|
|
|
|
|
|
|
|
def create_loader(loader_path):
|
|
|
|
|
"""
|
|
|
|
|
Writes configuration for loader.
|
|
|
|
|
|
|
|
|
|
:param loader_path:
|
|
|
|
|
"""
|
|
|
|
@ -133,6 +136,7 @@ def create_loader(loader_path):
|
|
|
|
|
|
|
|
|
|
def install_gummiboot(efi_directory):
|
|
|
|
|
"""
|
|
|
|
|
Installs gummiboot as bootloader for EFI setups.
|
|
|
|
|
|
|
|
|
|
:param efi_directory:
|
|
|
|
|
"""
|
|
|
|
@ -164,6 +168,7 @@ def install_gummiboot(efi_directory):
|
|
|
|
|
|
|
|
|
|
def install_grub(efi_directory, fw_type):
|
|
|
|
|
"""
|
|
|
|
|
Installs grub as bootloader, either in pc or efi mode.
|
|
|
|
|
|
|
|
|
|
:param efi_directory:
|
|
|
|
|
:param fw_type:
|
|
|
|
@ -201,6 +206,8 @@ def install_grub(efi_directory, fw_type):
|
|
|
|
|
|
|
|
|
|
def prepare_bootloader(fw_type):
|
|
|
|
|
"""
|
|
|
|
|
Prepares bootloader and set proper flags to EFI boot partition (esp,boot).
|
|
|
|
|
Based on value 'efi_boot_loader', it either calls gummiboot or grub to be installed.
|
|
|
|
|
|
|
|
|
|
:param fw_type:
|
|
|
|
|
:return:
|
|
|
|
@ -234,7 +241,7 @@ def prepare_bootloader(fw_type):
|
|
|
|
|
|
|
|
|
|
def run():
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
Starts procedure and passes 'fw_type' to other routine.
|
|
|
|
|
|
|
|
|
|
:return:
|
|
|
|
|
"""
|
|
|
|
|