From c2749e76c35283b25f802b3bc16338b7a870168d Mon Sep 17 00:00:00 2001 From: lgromero Date: Mon, 4 Aug 2025 11:51:26 +0200 Subject: [PATCH 1/2] adds ogliveBios and menu --- tftpboot/ipxe_scripts/templates/menu | 8 +--- tftpboot/ipxe_scripts/templates/ogliveBios | 53 ++++++++++++++++++++++ 2 files changed, 54 insertions(+), 7 deletions(-) create mode 100644 tftpboot/ipxe_scripts/templates/ogliveBios diff --git a/tftpboot/ipxe_scripts/templates/menu b/tftpboot/ipxe_scripts/templates/menu index 8d2963f..f2f1107 100644 --- a/tftpboot/ipxe_scripts/templates/menu +++ b/tftpboot/ipxe_scripts/templates/menu @@ -17,7 +17,6 @@ set kernelargs __INFOHOST__ :main_menu clear menu menu ${bold}${fg_cya}OpenGnsys iPXE Disk Boot Menu${boldoff} -item mbr Boot MBR (entire disk) item part1 FirstDisk-FirstPartition item part2 FirstHardDisk-SecondPartition item part3 FirstDisk-ThirdPartition @@ -25,12 +24,7 @@ item ogcache OpenGnsys CACHE item ognet OpenGnsys NET item ognetdef OpenGnsys NET Default item shell iPXE Shell -choose --timeout ${timeout} --default mbr target && goto ${target} - -:mbr -echo Booting MBR... -chain http://__SERVERIP__/tftpboot/grub.exe --config-file="timeout 1; title MBR; chainloader (hd0)+1; rootnoverify (hd0); boot" || echo Failed to boot MBR -exit +choose --timeout ${timeout} --default ogcache target && goto ${target} :part1 echo Booting FirstDisk-FirstPartition... diff --git a/tftpboot/ipxe_scripts/templates/ogliveBios b/tftpboot/ipxe_scripts/templates/ogliveBios new file mode 100644 index 0000000..8d750d3 --- /dev/null +++ b/tftpboot/ipxe_scripts/templates/ogliveBios @@ -0,0 +1,53 @@ +#!ipxe + +#Template: ogliveBios + +# Detectar si se está ejecutando en modo UEFI o BIOS +iseq ${platform} efi && goto uefi_boot || goto bios_boot + +:uefi_boot +set timeout 0 +set timeout-style hidden + +set ISODIR __OGLIVE__ +set default 0 +set kernelargs ogactiveadmin=true ogdebug=true __INFOHOST__ +# Menú de entrada para seleccionar OgLive +:try_iso +kernel http://__SERVERIP__/tftpboot/${ISODIR}/ogvmlinuz ${kernelargs} || goto fallback +initrd http://__SERVERIP__/tftpboot/${ISODIR}/oginitrd.img +boot + +:fallback +echo "OgLive default" +set ISODIR ogLive +kernel http://__SERVERIP__/tftpboot/${ISODIR}/ogvmlinuz ${kernelargs} +initrd http://__SERVERIP__/tftpboot/${ISODIR}/oginitrd.img +boot + + +:bios_boot +set PIPE | +set SERVERIP __SERVERIP__ +set ISODIR __OGLIVE__ +set kernelargs ogactiveadmin=true ogdebug=true __INFOHOST__ + +set CFG_PREFIX default saved; timeout 1; hiddenmenu; fallback 1 2 3 4; set ISODIR=${ISODIR}; +set CFG_FIRSTBOOT title firsboot; find --set-root --ignore-floppies --ignore-cd /ogboot.me checkrange 0x07 parttype > nul; cmp /ogboot.me /ogboot.firstboot ${PIPE}${PIPE} ls FALLBACK; write /ogboot.firstboot iniciado; chainloader +1; boot; +set CFG_SECONDBOOT title secondboot; find --set-root --ignore-floppies --ignore-cd /ogboot.me checkrange 0x07 parttype > nul; cmp /ogboot.me /ogboot.secondboot; write /ogboot.secondboot iniciado; chainloader +1; boot; +set CFG_OGCACHE title OpenGnsys-CACHE; find --set-root --ignore-floppies --ignore-cd /boot/%ISODIR%/ogvmlinuz; kernel /boot/%ISODIR%/ogvmlinuz ogactiveadmin=false ogdebug=false ogupdateinitrd=true ${kernelargs}; initrd /boot/%ISODIR%/oginitrd.img; boot; +#set CFG_OGNET title OpenGnsys-NET; kernel (pd)/%ISODIR%/ogvmlinuz ${kernelargs}; initrd (pd)/%ISODIR%/oginitrd.img; boot; +#set CFG_OGNET_DEFAULT title OpenGnsys-NET default; kernel (pd)/ogLive/ogvmlinuz ${kernelargs}; initrd (pd)/ogLive/oginitrd.img; boot; + +set default 0 +# Menú de entrada para seleccionar OgLive +:try_iso +chain http://${SERVERIP}/tftpboot/grub.exe --config-file="${CFG_PREFIX} ${CFG_FIRSTBOOT} ${CFG_SECONDBOOT} ${CFG_OGCACHE}" +boot + +:fallback +echo "OgLive default" +set ISODIR ogLive +kernel http://${SERVERIP}/tftpboot/${ISODIR}/ogvmlinuz ogactiveadmin=true ogdebug=true ${kernelargs} +initrd http://${SERVERIP}/tftpboot/${ISODIR}/oginitrd.img +boot -- 2.40.1 From a90f06bec1882418ebd64a96237f9239b011e0b8 Mon Sep 17 00:00:00 2001 From: lgromero Date: Tue, 5 Aug 2025 10:00:30 +0200 Subject: [PATCH 2/2] updates changelog --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 464aa9b..8b26d0e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.8.10] - 2024-07-05 +### Changed +- Añade oglive BIOS para el arranque de Windows al arrancarlo desde el ogbrowser +- Elimina arranque MBR del menú de arranque + ## [0.8.9] - 2024-06-30 ### Changed - Borra directorio samba de etc y modifica postint para que copie el fichero de configuración de la plantilla de samba -- 2.40.1