refs #2219 removes bootmark, updates grub.exe to support ext and updates menu template and oglivecache to use new grub.exe
parent
3cada29dcd
commit
abb8e1b7d5
Binary file not shown.
|
@ -1,84 +0,0 @@
|
|||
#!ipxe
|
||||
|
||||
# Configuración inicial
|
||||
set ISODIR ogLive
|
||||
|
||||
# Detectar si se está ejecutando en modo UEFI o BIOS
|
||||
iseq ${platform} efi && goto uefi_boot || goto bios_boot
|
||||
|
||||
# BIOS Boot Logic
|
||||
:bios_boot
|
||||
echo "Running in BIOS mode..."
|
||||
echo "Starting firstboot and secondboot flow using GRUB4DOS..."
|
||||
chain http://__SERVERIP__/tftpboot/grub.exe --config-file="
|
||||
timeout 0
|
||||
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;
|
||||
|
||||
# OpenGnsys-CACHE
|
||||
echo "Booting OpenGnsys-CACHE"
|
||||
kernel tftp://__SERVERIP__/${ISODIR}/ogvmlinuz ro boot=oginit quiet splash vga=788 irqpoll acpi=on og2nd=sqfs ogprotocol=smb ogactiveadmin=false ogdebug=false ogupdateinitrd=true ogtmpfs=15 oglivedir=${ISODIR} INFOHOST
|
||||
initrd tftp://__SERVERIP__/${ISODIR}/oginitrd.img
|
||||
boot || echo "Failed to boot OpenGnsys-CACHE"
|
||||
|
||||
# OpenGnsys-NET
|
||||
echo "Booting OpenGnsys-NET"
|
||||
kernel tftp://__SERVERIP__/${ISODIR}/ogvmlinuz ro boot=oginit quiet splash vga=788 irqpoll acpi=on og2nd=sqfs ogprotocol=smb ogactiveadmin=false ogdebug=false ogtmpfs=15 oglivedir=${ISODIR} INFOHOST
|
||||
initrd tftp://__SERVERIP__/${ISODIR}/oginitrd.img
|
||||
boot || echo "Failed to boot OpenGnsys-NET"
|
||||
|
||||
# OpenGnsys-NET Default
|
||||
echo "Booting OpenGnsys-NET Default"
|
||||
kernel tftp://__SERVERIP__/ogLive/ogvmlinuz ro boot=oginit quiet splash vga=788 irqpoll acpi=on og2nd=sqfs ogprotocol=smb ogactiveadmin=false ogdebug=false ogtmpfs=15 oglivedir=ogLive INFOHOST
|
||||
initrd tftp://__SERVERIP__/ogLive/oginitrd.img
|
||||
boot || echo "Failed to boot OpenGnsys-NET Default"
|
||||
exit
|
||||
|
||||
# UEFI Boot Logic
|
||||
:uefi_boot
|
||||
echo "Running in UEFI mode..."
|
||||
set timeout 30
|
||||
|
||||
# Verificar y buscar cargadores en orden de prioridad
|
||||
echo "Searching Grub loader..."
|
||||
sanboot --no-describe --drive 0 --filename \EFI\grub\Boot\grubx64.efi && exit || echo "Grub not found."
|
||||
|
||||
echo "Searching rEFInd loader..."
|
||||
sanboot --no-describe --drive 0 --filename \EFI\refind\shimx64.efi.signed && exit || echo "rEFInd not found."
|
||||
|
||||
echo "Searching Part-01-02 loader..."
|
||||
sanboot --no-describe --drive 0 --filename \EFI\Part-01-02\Boot\ogloader.efi && exit || echo "Part-01-02 not found."
|
||||
|
||||
echo "Searching Part-01-03 loader..."
|
||||
sanboot --no-describe --drive 0 --filename \EFI\Part-01-03\Boot\ogloader.efi && exit || echo "Part-01-03 not found."
|
||||
|
||||
echo "Searching Microsoft loader..."
|
||||
sanboot --no-describe --drive 0 --filename \EFI\Microsoft\Boot\bootmgfw.efi && exit || echo "Microsoft loader not found."
|
||||
|
||||
echo "Searching Ubuntu loader..."
|
||||
sanboot --no-describe --drive 0 --filename \EFI\ubuntu\grubx64.efi && exit || echo "Ubuntu loader not found."
|
||||
|
||||
# Fallback: Si no hay cargadores encontrados
|
||||
echo "No bootable operating system detected by OpenGnsys. Falling back..."
|
||||
exit
|
|
@ -4,10 +4,70 @@
|
|||
iseq ${platform} efi && goto uefi_boot || goto bios_boot
|
||||
|
||||
:bios_boot
|
||||
echo "Running in BIOS mode - Booting Menu WIP"
|
||||
chain http://__SERVERIP__/tftpboot/grub.exe --config-file="timeout 0; title menu WIP;root (hd0,0);chainloader (hd0,0)+1;boot" || echo "Failed to boot in BIOS mode"
|
||||
set timeout 3000
|
||||
set esc:hex 1b
|
||||
set bold ${esc:string}[1m
|
||||
set boldoff ${esc:string}[22m
|
||||
set fg_cya ${esc:string}[36m
|
||||
set fg_whi ${esc:string}[37m
|
||||
set ISODIR __OGLIVE__
|
||||
set default 0
|
||||
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
|
||||
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
|
||||
|
||||
:part1
|
||||
echo Booting FirstDisk-FirstPartition...
|
||||
chain http://__SERVERIP__/tftpboot/grub.exe --config-file="timeout 1; title FirstDisk-FirstPartition; root (hd0,0); chainloader (hd0,0)+1; boot" || echo Failed to boot part1
|
||||
exit
|
||||
|
||||
:part2
|
||||
echo Booting FirstHardDisk-SecondPartition...
|
||||
chain http://__SERVERIP__/tftpboot/grub.exe --config-file="timeout 1; title FirstHardDisk-SecondPartition; root (hd0,1); chainloader (hd0,1)+1; boot" || echo Failed to boot part2
|
||||
exit
|
||||
|
||||
:part3
|
||||
echo Booting FirstDisk-ThirdPartition...
|
||||
chain http://__SERVERIP__/tftpboot/grub.exe --config-file="timeout 1; title FirstDisk-ThirdPartition; root (hd0,2); chainloader (hd0,2)+1; boot" || echo Failed to boot part3
|
||||
exit
|
||||
|
||||
:ogcache
|
||||
echo Booting OpenGnsys-CACHE...
|
||||
chain http://__SERVERIP__/tftpboot/grub.exe --config-file="timeout 1; title OpenGnsys-CACHE; find --set-root /boot/__OGLIVE__/ogvmlinuz; kernel /boot/__OGLIVE__/ogvmlinuz ogactiveadmin=true ogdebug=true __INFOHOST__; initrd /boot/__OGLIVE__/oginitrd.img; boot"
|
||||
|
||||
:ognet
|
||||
echo Booting OpenGnsys-NET...
|
||||
kernel http://__SERVERIP__/tftpboot/${ISODIR}/ogvmlinuz ogactiveadmin=false ogdebug=false ${kernelargs} || goto fallback
|
||||
initrd http://__SERVERIP__/tftpboot/${ISODIR}/oginitrd.img
|
||||
boot
|
||||
|
||||
:ognetdef
|
||||
echo Booting OpenGnsys-NET Default...
|
||||
set ISODIR ogLive
|
||||
kernel http://__SERVERIP__/tftpboot/${ISODIR}/ogvmlinuz ogactiveadmin=false ogdebug=false ${kernelargs}
|
||||
initrd http://__SERVERIP__/tftpboot/${ISODIR}/oginitrd.img
|
||||
boot
|
||||
|
||||
:shell
|
||||
echo Launching iPXE shell...
|
||||
shell
|
||||
|
||||
:uefi_boot
|
||||
echo "Running in UEFI mode - Booting Menu"
|
||||
chain http://__SERVERIP__/tftpboot/grubx64.efi
|
||||
|
|
|
@ -6,7 +6,7 @@ iseq ${platform} efi && goto uefi_boot || goto bios_boot
|
|||
:bios_boot
|
||||
echo "Running in BIOS mode"
|
||||
# Si el cliente es BIOS, arranca el grub.pxe
|
||||
chain http://__SERVERIP__/tftpboot/grub.pxe
|
||||
chain http://__SERVERIP__/tftpboot/grub.exe --config-file="timeout 1; title OpenGnsys-CACHE; find --set-root /boot/__OGLIVE__/ogvmlinuz; kernel /boot/__OGLIVE__/ogvmlinuz ogactiveadmin=true ogdebug=true __INFOHOST__; initrd /boot/__OGLIVE__/oginitrd.img; boot"
|
||||
exit
|
||||
|
||||
:uefi_boot
|
||||
|
|
Loading…
Reference in New Issue