refs #2348 don't copy grub.cfg

dont-copy-grub-cfg
Natalia Serrano 2025-06-27 13:27:52 +02:00
parent aa5efb52a3
commit a142bb2729
2 changed files with 6 additions and 16 deletions

View File

@ -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.3] - 2025-06-27
### Changed
- Don't copy grub.cfg
## [0.22.2] - 2025-06-27
### Fixed

View File

@ -126,14 +126,6 @@ def ogBoot (disk, par, nvramperm=False, params=''):
SystemLib.ogRaiseError ([], ogGlobals.OG_ERR_NOTFOUND, f'{esp} Boot loader')
return None
esp_dev = DiskLib.ogDiskToDev (efidisk, efipart)
esp_mntdir = esp_dev.replace ('dev', 'mnt')
os.makedirs (f'{esp_mntdir}/boot/grub', exist_ok=True)
grub_cfg_src = f'{esp_mntdir}/EFI/{bootlabel}/Boot/grub.cfg'
if not os.path.exists (grub_cfg_src):
grub_cfg_src = f'{esp_mntdir}/boot/grubMBR/boot/grub/grub.cfg'
shutil.copy2 (grub_cfg_src, f'{esp_mntdir}/boot/grub/grub.cfg')
# Crear orden de arranque (con unos valores por defecto).
UEFILib.ogNvramAddEntry (bootlabel, f'/EFI/{bootlabel}/Boot/{bootloader}', nvramperm)
# Marcar próximo arranque y reiniciar.
@ -164,14 +156,6 @@ def ogBoot (disk, par, nvramperm=False, params=''):
SystemLib.ogRaiseError ([], ogGlobals.OG_ERR_NOTOS, f'{disk} {par} ({type}, EFI)')
return None
esp_dev = DiskLib.ogDiskToDev (efidisk, efipart)
esp_mntdir = esp_dev.replace ('dev', 'mnt')
os.makedirs (f'{esp_mntdir}/boot/grub', exist_ok=True)
grub_cfg_src = f'{esp_mntdir}/EFI/{bootlabel}/Boot/grub.cfg'
if not os.path.exists (grub_cfg_src):
grub_cfg_src = f'{esp_mntdir}/boot/grubMBR/boot/grub/grub.cfg'
shutil.copy2 (grub_cfg_src, f'{esp_mntdir}/boot/grub/grub.cfg')
# Crear orden de arranque (con unos valores por defecto).
l = re.sub ('^.*EFI(.*)$', r'\1', loader)
UEFILib.ogNvramAddEntry (bootlabel, '/EFI'+l, nvramperm)