54 lines
2.2 KiB
Plaintext
54 lines
2.2 KiB
Plaintext
#!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
|