adds ogliveBios and menu
parent
b5f76c61f3
commit
c2749e76c3
|
@ -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...
|
||||
|
|
|
@ -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
|
Loading…
Reference in New Issue