diff --git a/tftpboot/ipxe_scripts/templates/bootmark b/tftpboot/ipxe_scripts/templates/bootmark new file mode 100644 index 0000000..2e6de50 --- /dev/null +++ b/tftpboot/ipxe_scripts/templates/bootmark @@ -0,0 +1,35 @@ +#!ipxe + +# Configuración inicial +set ISODIR ogLive + +:bios_boot_first_second +echo "Booting firstboot and secondboot flow using GRUB4DOS..." + +# Pasar control a GRUB4DOS para manejar firstboot y secondboot +chain tftp://__SERVERIP__/tftpboot/grub.exe --config-file=" + # Configurar ISODIR + set ISODIR=${ISODIR}; + + # Firstboot + find --set-root --ignore-floppies --ignore-cd /ogboot.me checkrange 0x07 parttype > nul; + cmp /ogboot.me /ogboot.firstboot || goto secondboot; + write /ogboot.firstboot iniciado; + pause Firstboot passed. File updated. Press any key to continue...; + chainloader +1; + boot; + + # Secondboot + :secondboot + find --set-root --ignore-floppies --ignore-cd /ogboot.me checkrange 0x07 parttype > nul; + cmp /ogboot.me /ogboot.secondboot || goto fallback; + write /ogboot.secondboot iniciado; + pause Secondboot passed. File updated. Press any key to continue...; + chainloader +1; + boot; + + # Fallback + :fallback + pause Firstboot and Secondboot failed. Press any key to continue...; + quit; +" || echo "Failed to execute GRUB fallback sequence." diff --git a/tftpboot/ipxe_scripts/templates/ogliveCache b/tftpboot/ipxe_scripts/templates/ogliveCache new file mode 100644 index 0000000..08fb3dd --- /dev/null +++ b/tftpboot/ipxe_scripts/templates/ogliveCache @@ -0,0 +1,16 @@ +#!ipxe + +# Configuración inicial +set ISODIR __OGLIVE__ +set default 0 +set kernelargs __INFOHOST__ +:bios_boot_cache +echo "Booting ogLive from cache..." + +chain tftp://__SERVERIP__/tftpboot/grub.exe --config-file=" + set ISODIR=${ISODIR}; + find --set-root --ignore-floppies --ignore-cd /boot/${ISODIR}/ogvmlinuz; + kernel /boot/${ISODIR}/ogvmlinuz ${kernelargs}; + initrd /boot/${ISODIR}/oginitrd.img; + boot; +" || echo "Failed to boot ogLive from cache."