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 ++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 server/tftpboot/grub/templates/00unknown (limited to 'server/tftpboot/grub/templates/00unknown') 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 -- cgit v1.2.3-18-g5258