diff --git a/CHANGELOG.md b/CHANGELOG.md index 747d17b..f5a5872 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). +## [0.22.5] - 2025-07-02 + +### Fixed + +- Fixed booting windows using winboot/kexec + ## [0.22.4] - 2025-07-01 ### Changed diff --git a/ogclient/lib/python3/BootLib.py b/ogclient/lib/python3/BootLib.py index cbc21e7..9596df1 100644 --- a/ogclient/lib/python3/BootLib.py +++ b/ogclient/lib/python3/BootLib.py @@ -189,12 +189,12 @@ def ogBoot (disk, par, nvramperm=False, params=''): winboot = os.environ.get ('winboot', '') if 'kexec' == winboot: # Modo de arranque en caliente (con kexec). - for f in glob.glob (f'{ogGlobals.OGLIB}/grub4dos/*'): - shutil.copy2 (f, mntdir) + cp_cmd = f'cp {ogGlobals.OGLIB}/grub4dos/* {mntdir}' + subprocess.run (cp_cmd, shell=True) disk0 = int(disk)-1 par0 = int(par)-1 - subprocess.run (['kexec', '-l', f'{mntdir}/grub.exe', '--append=--config-file=root (hd{disk0},{par0}); chainloader (hd{disk0},{par0})/{loader}; tpm --init']) - subprocess.Popen (['kexec', '-e']) + subprocess.run (['kexec', '--load', f'{mntdir}/grub.exe', '--append=--config-file=root (hd{disk0},{par0}); chainloader (hd{disk0},{par0})/{loader}; tpm --init']) + subprocess.Popen (['kexec', '--exec']) else: # Modo de arranque por reinicio (con reboot). subprocess.run (['dd', 'if=/dev/zero', f'of={mntdir}/ogboot.me', 'bs=1024', 'count=3'])