diff options
author | Irina Gómez <irinagomez@us.es> | 2019-04-25 14:13:04 +0200 |
---|---|---|
committer | Irina Gómez <irinagomez@us.es> | 2019-04-25 14:13:04 +0200 |
commit | b845aabe00bd8f91093c654aacee96407897d26c (patch) | |
tree | d990863224d2aa05af907e14e66a80abea0768b8 /server/tftpboot | |
parent | b485805baf9244427377f33747f2af72df0804b9 (diff) |
#802 #888 PXE UEFI: In grub.cfg if computer config file doesn't exist load default config. 1hd template replaces rEFInd template.
Diffstat (limited to 'server/tftpboot')
-rw-r--r-- | server/tftpboot/grub/default | 36 | ||||
-rw-r--r-- | server/tftpboot/grub/grub.cfg | 7 | ||||
-rw-r--r-- | server/tftpboot/grub/templates/refind | 4 |
3 files changed, 24 insertions, 23 deletions
diff --git a/server/tftpboot/grub/default b/server/tftpboot/grub/default index f71ae553..85342b49 100644 --- a/server/tftpboot/grub/default +++ b/server/tftpboot/grub/default @@ -15,46 +15,44 @@ if [ "$root" != "" ]; then set label="rEFInd" set chain="chainloader /EFI/refind/grubx64.efi" fi - + if [ "$root" == "" ]; then - echo "Searching Microsoft" - search --file --set root /EFI/Microsoft/Boot/bootmgfw.efi + echo "Searching Part-01-02" + search --file --set root /EFI/Part-01-02/Boot/ogloader.efi if [ "$root" != "" ]; then - set label="Microsoft" - set chain="chainloader /EFI/Microsoft/Boot/bootmgfw.efi" + set label="Part-01-02" + set chain="chainloader /EFI/Part-01-02/Boot/ogloader.efi" fi fi if [ "$root" == "" ]; then - echo "Searching Ubuntu" - search --file --set root /EFI/ubuntu/grubx64.efi + echo "Searching Part-01-03" + search --file --set root /EFI/Part-01-03/Boot/ogloader.efi if [ "$root" != "" ]; then - set label="Ubuntu" - set chain="chainloader /EFI/ubuntu/grubx64.efi" + set label="Part-01-03" + set chain="chainloader /EFI/Part-01-03/Boot/ogloader.efi" fi fi if [ "$root" == "" ]; then - echo "Searching Part-01-02" - search --file --set root /EFI/Part-01-02/Boot/ogloader.efi + echo "Searching Microsoft" + search --file --set root /EFI/Microsoft/Boot/bootmgfw.efi if [ "$root" != "" ]; then - set label="Part-01-02" - set chain="chainloader /EFI/Part-01-02/Boot/ogloader.efi" + set label="Microsoft" + set chain="chainloader /EFI/Microsoft/Boot/bootmgfw.efi" fi fi if [ "$root" == "" ]; then - echo "Searching Part-01-03" - search --file --set root /EFI/Part-01-03/Boot/ogloader.efi + echo "Searching Ubuntu" + search --file --set root /EFI/ubuntu/grubx64.efi if [ "$root" != "" ]; then - set label="Part-01-03" - set chain="chainloader /EFI/Part-01-03/Boot/ogloader.efi" + set label="Ubuntu" + set chain="chainloader /EFI/ubuntu/grubx64.efi" fi fi -# Timeout if [ "$root" != "" ]; then - set timeout=5 set label="OpenGnsys ha detectado: $label" else # para evitar mensajes de error. diff --git a/server/tftpboot/grub/grub.cfg b/server/tftpboot/grub/grub.cfg index f1b53cb8..10340de6 100644 --- a/server/tftpboot/grub/grub.cfg +++ b/server/tftpboot/grub/grub.cfg @@ -1,6 +1,13 @@ insmod tr tr -s mac : - $net_default_mac tr -U -s MAC $mac + +# Cargo configuración PC configfile=$prefix/01-$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/refind b/server/tftpboot/grub/templates/refind deleted file mode 100644 index e37d0ac1..00000000 --- a/server/tftpboot/grub/templates/refind +++ /dev/null @@ -1,4 +0,0 @@ -##NO-TOCAR-ESTA-LINEA refind -root='hd0,gpt1' -chainloader /EFI/refind/grubx64.efi -boot |