From 9c9de82204580983df307267de08d26b82b8440d Mon Sep 17 00:00:00 2001 From: Javier Sánchez Parra Date: Tue, 14 Jun 2022 10:11:54 +0200 Subject: Revert "#1075 Rename boot templates" This reverts commit 127248e3454e84ba073e5413075e1e7aafef7c0d. Web Console expects boot templates to have certain names, otherwise it behaves incorrectly. The reverted commit changes this names to ones that the Web Console do not recognize. --- server/tftpboot/grub/templates/00unknown | 77 +++++++++++++++++++++++++++++ server/tftpboot/grub/templates/10 | 4 ++ server/tftpboot/grub/templates/11 | 4 ++ server/tftpboot/grub/templates/12 | 4 ++ server/tftpboot/grub/templates/13 | 4 ++ server/tftpboot/grub/templates/19pxeADMIN | 22 +++++++++ server/tftpboot/grub/templates/disk1 | 4 -- server/tftpboot/grub/templates/disk1-part1 | 4 -- server/tftpboot/grub/templates/disk1-part2 | 4 -- server/tftpboot/grub/templates/disk1-part3 | 4 -- server/tftpboot/grub/templates/oglive | 37 -------------- server/tftpboot/grub/templates/oglive-admin | 22 --------- server/tftpboot/grub/templates/pxe | 37 ++++++++++++++ server/tftpboot/grub/templates/unknown | 77 ----------------------------- 14 files changed, 152 insertions(+), 152 deletions(-) create mode 100644 server/tftpboot/grub/templates/00unknown create mode 100644 server/tftpboot/grub/templates/10 create mode 100644 server/tftpboot/grub/templates/11 create mode 100644 server/tftpboot/grub/templates/12 create mode 100644 server/tftpboot/grub/templates/13 create mode 100644 server/tftpboot/grub/templates/19pxeADMIN delete mode 100644 server/tftpboot/grub/templates/disk1 delete mode 100644 server/tftpboot/grub/templates/disk1-part1 delete mode 100644 server/tftpboot/grub/templates/disk1-part2 delete mode 100644 server/tftpboot/grub/templates/disk1-part3 delete mode 100644 server/tftpboot/grub/templates/oglive delete mode 100644 server/tftpboot/grub/templates/oglive-admin create mode 100644 server/tftpboot/grub/templates/pxe delete mode 100644 server/tftpboot/grub/templates/unknown (limited to 'server/tftpboot/grub') diff --git a/server/tftpboot/grub/templates/00unknown b/server/tftpboot/grub/templates/00unknown new file mode 100644 index 00000000..efd70778 --- /dev/null +++ b/server/tftpboot/grub/templates/00unknown @@ -0,0 +1,77 @@ +##NO-TOCAR-ESTA-LINEA Sin-designar +# +# Arranque por defecto en OpenGnsys +# Busca cargadores existentes por orden de prioridad y +# muestra menú con las opciones +# Si no existe ningún cargador de arranque muestra mensaje de error. +set timeout=30 + +set detectado='no' +# Compruebo si existen distintos cargadores. +echo "Searching Grub" +search --file --set rootGrub /EFI/grub/Boot/grubx64.efi +if [ "$rootGrub" != "" ]; then + set detectado='si' + menuentry "Grub" { + root="$rootGrub" + chainloader /EFI/grub/Boot/grubx64.efi +} +fi + +echo "Searching rEFInd" +search --file --set rootRefind /EFI/refind/shimx64.efi.signed +if [ "$rootRefind" != "" ]; then + menuentry "rEFInd" { + root="$rootRefind" + chainloader /EFI/refind/shimx64.efi.signed +} +fi + +echo "Searching Part-01-02" +search --file --set rootP2 /EFI/Part-01-02/Boot/ogloader.efi +if [ "$rootP2" != "" ]; then + set detectado='si' + menuentry "Part-01-02" { + root="$rootP2" + chainloader /EFI/Part-01-02/Boot/ogloader.efi + } +fi + +echo "Searching Part-01-03" +search --file --set rootP3 /EFI/Part-01-03/Boot/ogloader.efi +if [ "$rootP3" != "" ]; then + set detectado='si' + menuentry "Part-01-03" { + root="$rootP3" + chainloader /EFI/Part-01-03/Boot/ogloader.efi + } +fi + +echo "Searching Microsoft" +search --file --set rootMS /EFI/Microsoft/Boot/bootmgfw.efi +if [ "$rootMS" != "" ]; then + set detectado='si' + menuentry "Microsoft" { + root="$rootMS" + chainloader /EFI/Microsoft/Boot/bootmgfw.efi + } +fi + +echo "Searching Ubuntu" +search --file --set rootUb /EFI/ubuntu/grubx64.efi +if [ "$rootUb" != "" ]; then + set detectado='si' + menuentry "Ubuntu" + root="$rootUb" + chainloader /EFI/ubuntu/grubx64.efi + } +fi + + +# Si no hay ningún sistema operativo muestro mensaje. +if [ $detectado == 'no' ]; then + menuentry "OpenGnsys no ha detectado ningún sistema operativo" { + # para evitar mensajes de error. + set root="(hd0,gpt1)" + } +fi diff --git a/server/tftpboot/grub/templates/10 b/server/tftpboot/grub/templates/10 new file mode 100644 index 00000000..22e57bfe --- /dev/null +++ b/server/tftpboot/grub/templates/10 @@ -0,0 +1,4 @@ +##NO-TOCAR-ESTA-LINEA 1hd +search --file --set root /EFI/grub/Boot/grubx64.efi +chainloader /EFI/grub/Boot/grubx64.efi +boot diff --git a/server/tftpboot/grub/templates/11 b/server/tftpboot/grub/templates/11 new file mode 100644 index 00000000..e17d387b --- /dev/null +++ b/server/tftpboot/grub/templates/11 @@ -0,0 +1,4 @@ +##NO-TOCAR-ESTA-LINEA 1hd-1partition +search --file --set root /EFI/Part-01-01/Boot/ogloader.efi +chainloader /EFI/Part-01-01/Boot/ogloader.efi +boot diff --git a/server/tftpboot/grub/templates/12 b/server/tftpboot/grub/templates/12 new file mode 100644 index 00000000..2bcf108d --- /dev/null +++ b/server/tftpboot/grub/templates/12 @@ -0,0 +1,4 @@ +##NO-TOCAR-ESTA-LINEA 1hd-2partition +search --file --set root /EFI/Part-01-02/Boot/ogloader.efi +chainloader /EFI/Part-01-02/Boot/ogloader.efi +boot diff --git a/server/tftpboot/grub/templates/13 b/server/tftpboot/grub/templates/13 new file mode 100644 index 00000000..4c9d26a0 --- /dev/null +++ b/server/tftpboot/grub/templates/13 @@ -0,0 +1,4 @@ +##NO-TOCAR-ESTA-LINEA 1hd-3partition +search --file --set root /EFI/Part-01-03/Boot/ogloader.efi +chainloader /EFI/Part-01-03/Boot/ogloader.efi +boot diff --git a/server/tftpboot/grub/templates/19pxeADMIN b/server/tftpboot/grub/templates/19pxeADMIN new file mode 100644 index 00000000..211a543b --- /dev/null +++ b/server/tftpboot/grub/templates/19pxeADMIN @@ -0,0 +1,22 @@ +##NO-TOCAR-ESTA-LINEA ogLiveAdmin +set timeout=0 +set timeout_style=hidden + +set ISODIR=ogLive +set default=0; + +echo "OgLive $ISODIR" +menuentry "OgLive $ISODIR" { + # Si no existe el ogLive de ISODIR en la red, inicio ogLive por defecto + for DIR in $ISODIR ogLive; do + if linux (tftp)/$DIR/ogvmlinuz ro boot=oginit quiet splash vga=788 irqpoll acpi=on og2nd=sqfs ogprotocol=smb ogactiveadmin=true ogdebug=true ogtmpfs=15 oglivedir=$ISODIR INFOHOST ; then + set DIR=$DIR + break + else + echo "OgLive default" + fi + done + + initrd (tftp)/$DIR/oginitrd.img + boot +} diff --git a/server/tftpboot/grub/templates/disk1 b/server/tftpboot/grub/templates/disk1 deleted file mode 100644 index 22e57bfe..00000000 --- a/server/tftpboot/grub/templates/disk1 +++ /dev/null @@ -1,4 +0,0 @@ -##NO-TOCAR-ESTA-LINEA 1hd -search --file --set root /EFI/grub/Boot/grubx64.efi -chainloader /EFI/grub/Boot/grubx64.efi -boot diff --git a/server/tftpboot/grub/templates/disk1-part1 b/server/tftpboot/grub/templates/disk1-part1 deleted file mode 100644 index e17d387b..00000000 --- a/server/tftpboot/grub/templates/disk1-part1 +++ /dev/null @@ -1,4 +0,0 @@ -##NO-TOCAR-ESTA-LINEA 1hd-1partition -search --file --set root /EFI/Part-01-01/Boot/ogloader.efi -chainloader /EFI/Part-01-01/Boot/ogloader.efi -boot diff --git a/server/tftpboot/grub/templates/disk1-part2 b/server/tftpboot/grub/templates/disk1-part2 deleted file mode 100644 index 2bcf108d..00000000 --- a/server/tftpboot/grub/templates/disk1-part2 +++ /dev/null @@ -1,4 +0,0 @@ -##NO-TOCAR-ESTA-LINEA 1hd-2partition -search --file --set root /EFI/Part-01-02/Boot/ogloader.efi -chainloader /EFI/Part-01-02/Boot/ogloader.efi -boot diff --git a/server/tftpboot/grub/templates/disk1-part3 b/server/tftpboot/grub/templates/disk1-part3 deleted file mode 100644 index 4c9d26a0..00000000 --- a/server/tftpboot/grub/templates/disk1-part3 +++ /dev/null @@ -1,4 +0,0 @@ -##NO-TOCAR-ESTA-LINEA 1hd-3partition -search --file --set root /EFI/Part-01-03/Boot/ogloader.efi -chainloader /EFI/Part-01-03/Boot/ogloader.efi -boot diff --git a/server/tftpboot/grub/templates/oglive b/server/tftpboot/grub/templates/oglive deleted file mode 100644 index 1a67fc25..00000000 --- a/server/tftpboot/grub/templates/oglive +++ /dev/null @@ -1,37 +0,0 @@ -##NO-TOCAR-ESTA-LINEA ogLive -set timeout=0 -set timeout_style=hidden - -set ISODIR=ogLive - -# Si existe ogLive en CACHE lo inicio, si no el de la red -set root='' -echo "OgLive CACHE" -search --file --set root /boot/$ISODIR/ogvmlinuz -if [ "$root" == "" ]; then - echo "OgLive $ISODIR" - set default=1; -else - set default=0; -fi - -menuentry "OgLive CACHE" { - linux /boot/$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 /boot/$ISODIR/oginitrd.img - boot -} - -menuentry "OgLive $ISODIR" { - # Si no existe el ogLive de ISODIR en la red, inicio ogLive por defecto - for DIR in $ISODIR ogLive; do - if linux (tftp)/$DIR/ogvmlinuz ro boot=oginit quiet splash vga=788 irqpoll acpi=on og2nd=sqfs ogprotocol=smb ogactiveadmin=false ogdebug=false ogtmpfs=15 oglivedir=$ISODIR INFOHOST ; then - set DIR=$DIR - break - else - echo "OgLive default" - fi - done - - initrd (tftp)/$DIR/oginitrd.img - boot -} diff --git a/server/tftpboot/grub/templates/oglive-admin b/server/tftpboot/grub/templates/oglive-admin deleted file mode 100644 index 211a543b..00000000 --- a/server/tftpboot/grub/templates/oglive-admin +++ /dev/null @@ -1,22 +0,0 @@ -##NO-TOCAR-ESTA-LINEA ogLiveAdmin -set timeout=0 -set timeout_style=hidden - -set ISODIR=ogLive -set default=0; - -echo "OgLive $ISODIR" -menuentry "OgLive $ISODIR" { - # Si no existe el ogLive de ISODIR en la red, inicio ogLive por defecto - for DIR in $ISODIR ogLive; do - if linux (tftp)/$DIR/ogvmlinuz ro boot=oginit quiet splash vga=788 irqpoll acpi=on og2nd=sqfs ogprotocol=smb ogactiveadmin=true ogdebug=true ogtmpfs=15 oglivedir=$ISODIR INFOHOST ; then - set DIR=$DIR - break - else - echo "OgLive default" - fi - done - - initrd (tftp)/$DIR/oginitrd.img - boot -} diff --git a/server/tftpboot/grub/templates/pxe b/server/tftpboot/grub/templates/pxe new file mode 100644 index 00000000..1a67fc25 --- /dev/null +++ b/server/tftpboot/grub/templates/pxe @@ -0,0 +1,37 @@ +##NO-TOCAR-ESTA-LINEA ogLive +set timeout=0 +set timeout_style=hidden + +set ISODIR=ogLive + +# Si existe ogLive en CACHE lo inicio, si no el de la red +set root='' +echo "OgLive CACHE" +search --file --set root /boot/$ISODIR/ogvmlinuz +if [ "$root" == "" ]; then + echo "OgLive $ISODIR" + set default=1; +else + set default=0; +fi + +menuentry "OgLive CACHE" { + linux /boot/$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 /boot/$ISODIR/oginitrd.img + boot +} + +menuentry "OgLive $ISODIR" { + # Si no existe el ogLive de ISODIR en la red, inicio ogLive por defecto + for DIR in $ISODIR ogLive; do + if linux (tftp)/$DIR/ogvmlinuz ro boot=oginit quiet splash vga=788 irqpoll acpi=on og2nd=sqfs ogprotocol=smb ogactiveadmin=false ogdebug=false ogtmpfs=15 oglivedir=$ISODIR INFOHOST ; then + set DIR=$DIR + break + else + echo "OgLive default" + fi + done + + initrd (tftp)/$DIR/oginitrd.img + boot +} diff --git a/server/tftpboot/grub/templates/unknown b/server/tftpboot/grub/templates/unknown deleted file mode 100644 index efd70778..00000000 --- a/server/tftpboot/grub/templates/unknown +++ /dev/null @@ -1,77 +0,0 @@ -##NO-TOCAR-ESTA-LINEA Sin-designar -# -# Arranque por defecto en OpenGnsys -# Busca cargadores existentes por orden de prioridad y -# muestra menú con las opciones -# Si no existe ningún cargador de arranque muestra mensaje de error. -set timeout=30 - -set detectado='no' -# Compruebo si existen distintos cargadores. -echo "Searching Grub" -search --file --set rootGrub /EFI/grub/Boot/grubx64.efi -if [ "$rootGrub" != "" ]; then - set detectado='si' - menuentry "Grub" { - root="$rootGrub" - chainloader /EFI/grub/Boot/grubx64.efi -} -fi - -echo "Searching rEFInd" -search --file --set rootRefind /EFI/refind/shimx64.efi.signed -if [ "$rootRefind" != "" ]; then - menuentry "rEFInd" { - root="$rootRefind" - chainloader /EFI/refind/shimx64.efi.signed -} -fi - -echo "Searching Part-01-02" -search --file --set rootP2 /EFI/Part-01-02/Boot/ogloader.efi -if [ "$rootP2" != "" ]; then - set detectado='si' - menuentry "Part-01-02" { - root="$rootP2" - chainloader /EFI/Part-01-02/Boot/ogloader.efi - } -fi - -echo "Searching Part-01-03" -search --file --set rootP3 /EFI/Part-01-03/Boot/ogloader.efi -if [ "$rootP3" != "" ]; then - set detectado='si' - menuentry "Part-01-03" { - root="$rootP3" - chainloader /EFI/Part-01-03/Boot/ogloader.efi - } -fi - -echo "Searching Microsoft" -search --file --set rootMS /EFI/Microsoft/Boot/bootmgfw.efi -if [ "$rootMS" != "" ]; then - set detectado='si' - menuentry "Microsoft" { - root="$rootMS" - chainloader /EFI/Microsoft/Boot/bootmgfw.efi - } -fi - -echo "Searching Ubuntu" -search --file --set rootUb /EFI/ubuntu/grubx64.efi -if [ "$rootUb" != "" ]; then - set detectado='si' - menuentry "Ubuntu" - root="$rootUb" - chainloader /EFI/ubuntu/grubx64.efi - } -fi - - -# Si no hay ningún sistema operativo muestro mensaje. -if [ $detectado == 'no' ]; then - menuentry "OpenGnsys no ha detectado ningún sistema operativo" { - # para evitar mensajes de error. - set root="(hd0,gpt1)" - } -fi -- cgit v1.2.3-18-g5258