source: server/tftpboot/grub/default @ 72d19da

918-git-images-111dconfigfileconfigure-oglivegit-imageslgromero-new-oglivemainmaint-cronmount-efivarfsmultivmmultivm-ogboot-installerogClonningEngineogboot-installer-jenkinsoglive-ipv6test-python-scriptsticket-301ticket-50ticket-50-oldticket-577ticket-585ticket-611ticket-612ticket-693ticket-700ubu24tplunification2use-local-agent-oglivevarios-instalacion
Last change on this file since 72d19da was b845aab, checked in by Irina Gómez <irinagomez@…>, 6 years ago

#802 #888 PXE UEFI: In grub.cfg if computer config file doesn't exist load default config. 1hd template replaces rEFInd template.

  • Property mode set to 100644
File size: 1.6 KB
Line 
1# Busca cargadores existentes por orden de prioridad e
2#    inicia el primero que encuentra.
3# Si no existe ningún cargador de arranque muestre mensaje de error.
4set timeout=0
5
6# Valor si no detecto ningún sistema
7set label="OpenGnsys: Ningún cargador de arranque detectado."
8set chain=""
9
10# Compruebo si existen distintos cargadores.
11set root=''
12echo "Searching rEFInd"
13search --file --set root /EFI/refind/grubx64.efi
14if [ "$root" != "" ]; then
15    set label="rEFInd"
16    set chain="chainloader /EFI/refind/grubx64.efi"
17fi
18
19if [ "$root" == "" ]; then
20    echo "Searching Part-01-02"
21    search --file --set root /EFI/Part-01-02/Boot/ogloader.efi
22    if [ "$root" != "" ]; then
23        set label="Part-01-02"
24        set chain="chainloader /EFI/Part-01-02/Boot/ogloader.efi"
25    fi
26fi
27
28if [ "$root" == "" ]; then
29    echo "Searching Part-01-03"
30    search --file --set root /EFI/Part-01-03/Boot/ogloader.efi
31    if [ "$root" != "" ]; then
32        set label="Part-01-03"
33        set chain="chainloader /EFI/Part-01-03/Boot/ogloader.efi"
34    fi
35fi
36
37if [ "$root" == "" ]; then
38    echo "Searching Microsoft"
39    search --file --set root /EFI/Microsoft/Boot/bootmgfw.efi
40    if [ "$root" != "" ]; then
41        set label="Microsoft"
42        set chain="chainloader /EFI/Microsoft/Boot/bootmgfw.efi"
43    fi
44fi
45
46if [ "$root" == "" ]; then
47    echo "Searching Ubuntu"
48    search --file --set root /EFI/ubuntu/grubx64.efi
49    if [ "$root" != "" ]; then
50        set label="Ubuntu"
51        set chain="chainloader /EFI/ubuntu/grubx64.efi"
52    fi
53fi
54
55if [ "$root" != "" ]; then
56    set label="OpenGnsys ha detectado: $label"
57else
58    # para evitar mensajes de error.
59    set root="(hd0,gpt1)"
60fi
61
62menuentry "$label" {
63    eval "$chain"
64}
Note: See TracBrowser for help on using the repository browser.