mirror of https://git.48k.eu/ogclient
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.more_events
parent
3550da73e6
commit
cb0bd3d194
|
@ -335,6 +335,7 @@ class OgLiveOperations:
|
|||
raise ValueError('Target partition has no filesystem present')
|
||||
|
||||
cambiar_acceso(user=self._smb_user, pwd=self._smb_pass)
|
||||
ogCopyEfiBootloader(disk, partition)
|
||||
ogReduceFs(disk, partition)
|
||||
|
||||
cmd1 = shlex.split(f'partclone.{fstype} -I -C --clone -s {padev} -O -')
|
||||
|
|
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue