From cb0bd3d194ddd4ecaab8e671444f1bf7abc8f908 Mon Sep 17 00:00:00 2001 From: "Jose M. Guisado" Date: Thu, 8 Sep 2022 11:07:55 +0200 Subject: image_create: add legacy ogCopyEfiBootloader Use legacy script that saves the Windows-specific content from the ESP to the image target filesystem. Current image restore solution from OpenGnsys scripts expect the EFI partition to be stored in the target system partition. (Only for Windows 10) For example, storing the ESP in the NTFS partition of a Windows image. Expect use of bash script ogCopyEfiBootloader until further integration is merged. --- src/utils/legacy.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/utils/legacy.py') diff --git a/src/utils/legacy.py b/src/utils/legacy.py index 7ea2bd6..84bd245 100644 --- a/src/utils/legacy.py +++ b/src/utils/legacy.py @@ -53,3 +53,13 @@ def ogChangeRepo(ip): return subprocess.run(f'ogChangeRepo {ipaddr}', shell=True) + + +def ogCopyEfiBootloader(disk, partition): + cmd = f'ogCopyEfiBootloader {disk} {partition]' + try: + proc = subprocess.run(cmd, + shell=True) + except: + logging.error('Exception when running ogCopyEfiBootloader') + raise ValueError('Subprocess error: ogCopyEfiBootloader') -- cgit v1.2.3-18-g5258