From b41e6e48bb63c64479ba17ee1d77db0cdd030dde Mon Sep 17 00:00:00 2001 From: Vadim Troshchinskiy Date: Tue, 9 Sep 2025 16:36:58 +0200 Subject: [PATCH] refs #3767 -- windows boot fixes --- CHANGELOG.md | 6 ++++++ ogclient/lib/python3/GitLib/__init__.py | 19 +++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 960b850..cee1bd3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.4.3] - 2025-09-09 + +## Change + +- Oggit Windows EFI boot fixes + ## [1.4.2] - 2025-09-09 ## Change diff --git a/ogclient/lib/python3/GitLib/__init__.py b/ogclient/lib/python3/GitLib/__init__.py index 082c6d5..351bd6c 100755 --- a/ogclient/lib/python3/GitLib/__init__.py +++ b/ogclient/lib/python3/GitLib/__init__.py @@ -825,6 +825,25 @@ class OpengnsysGitLibrary: 'metadata_dir' : meta_dir }) + # Copy EFI files for ogBoot + ogboot_dir = os.path.join(path, "ogBoot") + + self.logger.debug("On NTFS, will copy EFI boot files to %s", ogboot_dir) + + boot_device = self.fs.find_boot_device() + boot_mount = self.fs.find_mountpoint(boot_device) + loader_dir = os.path.join(boot_mount, "EFI", "Microsoft", "Boot") + + if os.path.exists(loader_dir): + if os.path.exists(ogboot_dir): + self.logger.debug("Deleting old files in %s", ogboot_dir) + shutil.rmtree(ogboot_dir) + + self.logger.debug("Copying Windows boot files from %s to %s", loader_dir, ogboot_dir) + shutil.copytree(loader_dir, ogboot_dir) + else: + self.logger.error("Failed to find Windows bootloader in %s", loader_dir) + #self._ntfs_secaudit(root, os.path.join(meta_dir, "ntfs_secaudit.txt")) ntfs = True else: