From 23b4b1feb631b805afc8bf55e206fa6f753e646c Mon Sep 17 00:00:00 2001 From: "Jose M. Guisado" Date: Wed, 16 Aug 2023 14:34:14 +0200 Subject: live: drop IniciarSesion script when uefi booting Replace IniciarSesion script in favor of native Python code when booting a UEFI system. This applies when running the "session" command. WIP: Only UEFI boots Windows systems. Raise NotImplementedError exception trying to boot a Linux system using UEFI. --- src/live/ogOperations.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src') diff --git a/src/live/ogOperations.py b/src/live/ogOperations.py index b72f7df..d5f22a9 100644 --- a/src/live/ogOperations.py +++ b/src/live/ogOperations.py @@ -32,6 +32,8 @@ from src.utils.probe import os_probe, cache_probe from src.utils.disk import * from src.utils.cache import generate_cache_txt, umount_cache, init_cache from src.utils.tiptorrent import * +from src.utils.uefi import * +from src.utils.boot import * from src.utils.sw_inventory import get_package_set from src.utils.hw_inventory import get_hardware_inventory, legacy_list_hardware_inventory @@ -259,6 +261,14 @@ class OgLiveOperations: def session(self, request, ogRest): disk = request.getDisk() partition = request.getPartition() + + if is_uefi_supported(): + logging.info('UEFI support detected') + logging.info(f'Booting disk={disk} partition={partition}') + boot_os_at(int(disk), int(partition)) + self.reboot() + return + cmd = f'{ogClient.OG_PATH}interfaceAdm/IniciarSesion {disk} {partition}' try: -- cgit v1.2.3-18-g5258