summaryrefslogtreecommitdiffstats
path: root/src/utils/boot.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/boot.py')
-rw-r--r--src/utils/boot.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/utils/boot.py b/src/utils/boot.py
index 724fc06..a5ff04b 100644
--- a/src/utils/boot.py
+++ b/src/utils/boot.py
@@ -19,9 +19,6 @@ from src.utils.uefi import *
from src.utils.fs import *
-def _boot_bios_legacy(disk, part, mountpoint):
- raise NotImplementedError
-
def _boot_bios_linux(disk, part, mountpoint):
logging.info(f'Booting Linux system')
@@ -47,7 +44,16 @@ def _boot_bios_linux(disk, part, mountpoint):
def _boot_bios_windows(disk, part, mountpoint):
logging.info(f'Booting Windows system')
- _boot_bios_legacy(disk, part, mountpoint)
+ try:
+ with open(f'{mountpoint}/ogboot.me', 'w') as f:
+ f.write('\0' * (3072))
+ with open(f'{mountpoint}/ogboot.firstboot', 'w') as f:
+ f.write('iniciado')
+ f.write('\0' * (3072 - 8))
+ with open(f'{mountpoint}/ogboot.secondboot', 'w') as f:
+ f.write('\0' * (3072))
+ except OSError as e:
+ raise RuntimeError(f'Could not create ogboot files in Windows partition: {e}')
def _boot_uefi_windows(disk, part, mountpoint):
logging.info(f'Booting windows system')