summaryrefslogtreecommitdiffstats
path: root/server/tftpboot
diff options
context:
space:
mode:
Diffstat (limited to 'server/tftpboot')
-rw-r--r--server/tftpboot/grub/default65
-rw-r--r--server/tftpboot/grub/grub.cfg9
-rw-r--r--server/tftpboot/grub/templates/00unknown30
-rw-r--r--server/tftpboot/grub/templates/106
-rw-r--r--server/tftpboot/grub/templates/114
-rw-r--r--server/tftpboot/grub/templates/124
-rw-r--r--server/tftpboot/grub/templates/19pxeADMIN22
-rw-r--r--server/tftpboot/grub/templates/21UEFIpxe7
-rw-r--r--server/tftpboot/grub/templates/pxe37
-rw-r--r--server/tftpboot/menu.lst/templates/10 (renamed from server/tftpboot/menu.lst/templates/01)2
-rw-r--r--server/tftpboot/menu.lst/templates/114
-rw-r--r--server/tftpboot/menu.lst/templates/124
12 files changed, 181 insertions, 13 deletions
diff --git a/server/tftpboot/grub/default b/server/tftpboot/grub/default
new file mode 100644
index 00000000..6c505de6
--- /dev/null
+++ b/server/tftpboot/grub/default
@@ -0,0 +1,65 @@
+# Busca cargadores existentes por orden de prioridad e
+# inicia el primero que encuentra.
+# Si no existe ningún cargador de arranque muestre mensaje de error.
+set timeout=5
+
+set detectado='no'
+# Compruebo si existen distintos cargadores.
+echo "Searching rEFInd"
+search --file --set rootRefind /EFI/refind/shimx64.efi.signed
+if [ "$rootRefind" != "" ]; then
+ set detectado='si'
+ 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 sistam 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/grub.cfg b/server/tftpboot/grub/grub.cfg
index 53db4d84..56f19639 100644
--- a/server/tftpboot/grub/grub.cfg
+++ b/server/tftpboot/grub/grub.cfg
@@ -1,2 +1,9 @@
-source "$prefix/$net_default_mac"
+# Cargo configuración PC
+configfile=$prefix/01-$net_default_mac
+source "$configfile"
+# Si no existe anterior cargo configuracion por defecto
+# Lo compruebo buscando variables más usuales
+if [ "$timeout" == "" -a "$default" == "" ]; then
+ source "$prefix/default"
+fi
diff --git a/server/tftpboot/grub/templates/00unknown b/server/tftpboot/grub/templates/00unknown
new file mode 100644
index 00000000..3352a965
--- /dev/null
+++ b/server/tftpboot/grub/templates/00unknown
@@ -0,0 +1,30 @@
+##NO-TOCAR-ESTA-LINEA Sin-designar
+set default="0"
+set timeout="30"
+
+menuentry 'ogLive' {
+set ISODIR=ogLive
+linux (tftp)/$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)/$ISODIR/oginitrd.img
+boot
+}
+menuentry 'ReFind' {
+ root='hd0,gpt1'
+ chainloader /EFI/refind/shimx64.efi
+ boot
+}
+menuentry 'Part-01-02' {
+ root='hd0,gpt1'
+ chainloader /EFI/Part-01-02/Boot/ogloader.efi
+ boot
+}
+menuentry 'Windows' {
+ root='hd0,gpt1'
+ chainloader /EFI/Microsoft/Boot/bootmgfw.efi
+ boot
+}
+menuentry 'Ubuntu' {
+ root='hd0,gpt1'
+ chainloader /EFI/ubuntu/grubx64.efi
+ boot
+}
diff --git a/server/tftpboot/grub/templates/10 b/server/tftpboot/grub/templates/10
new file mode 100644
index 00000000..82c44464
--- /dev/null
+++ b/server/tftpboot/grub/templates/10
@@ -0,0 +1,6 @@
+##NO-TOCAR-ESTA-LINEA 1hd
+echo "rEFInd"
+
+root='hd0,gpt1'
+chainloader /EFI/refind/shimx64.efi.signed
+boot
diff --git a/server/tftpboot/grub/templates/11 b/server/tftpboot/grub/templates/11
new file mode 100644
index 00000000..06b34088
--- /dev/null
+++ b/server/tftpboot/grub/templates/11
@@ -0,0 +1,4 @@
+##NO-TOCAR-ESTA-LINEA 1hd-1os
+root='hd0,gpt1'
+chainloader /EFI/Part-01-02/Boot/ogloader.efi
+boot
diff --git a/server/tftpboot/grub/templates/12 b/server/tftpboot/grub/templates/12
new file mode 100644
index 00000000..6f22fc30
--- /dev/null
+++ b/server/tftpboot/grub/templates/12
@@ -0,0 +1,4 @@
+##NO-TOCAR-ESTA-LINEA 1hd-2os
+root='hd0,gpt1'
+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/21UEFIpxe b/server/tftpboot/grub/templates/21UEFIpxe
deleted file mode 100644
index 7892a495..00000000
--- a/server/tftpboot/grub/templates/21UEFIpxe
+++ /dev/null
@@ -1,7 +0,0 @@
-##NO-TOCAR-ESTA-LINEA UEFI-pxe
-set ISODIR=ogLive
-linux (tftp)/$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)/$OGLIVE/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/menu.lst/templates/01 b/server/tftpboot/menu.lst/templates/10
index db7a3ee7..96d0f500 100644
--- a/server/tftpboot/menu.lst/templates/01
+++ b/server/tftpboot/menu.lst/templates/10
@@ -1,4 +1,4 @@
-##NO-TOCAR-ESTA-LINEA MBR
+##NO-TOCAR-ESTA-LINEA 1hd
timeout 1
title MBR
chainloader (hd0)+1
diff --git a/server/tftpboot/menu.lst/templates/11 b/server/tftpboot/menu.lst/templates/11
index 6ff6b10b..c1492b57 100644
--- a/server/tftpboot/menu.lst/templates/11
+++ b/server/tftpboot/menu.lst/templates/11
@@ -1,6 +1,6 @@
-##NO-TOCAR-ESTA-LINEA 1hd-1partition
+##NO-TOCAR-ESTA-LINEA 1hd-1os
timeout 1
-title FirstHardDisk-FirstPartition
+title FirstDisk-FirstOperatingSystem
root (hd0,0)
chainloader (hd0,0)+1
boot
diff --git a/server/tftpboot/menu.lst/templates/12 b/server/tftpboot/menu.lst/templates/12
index 0843c3b1..0db966b7 100644
--- a/server/tftpboot/menu.lst/templates/12
+++ b/server/tftpboot/menu.lst/templates/12
@@ -1,6 +1,6 @@
-##NO-TOCAR-ESTA-LINEA 1hd-2partition
+##NO-TOCAR-ESTA-LINEA 1hd-2os
timeout 1
-title FirstHardDisk-SecondPartition
+title FirstHardDisk-SecondOperatingSystem
root (hd0,1)
chainloader (hd0,1)+1
boot