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 aa7c8e4 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
|
Rev | Line | |
---|
[528ff4c] | 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. |
---|
| 4 | set timeout=0 |
---|
| 5 | |
---|
| 6 | # Valor si no detecto ningún sistema |
---|
| 7 | set label="OpenGnsys: Ningún cargador de arranque detectado." |
---|
| 8 | set chain="" |
---|
| 9 | |
---|
| 10 | # Compruebo si existen distintos cargadores. |
---|
| 11 | set root='' |
---|
[b485805] | 12 | echo "Searching rEFInd" |
---|
[528ff4c] | 13 | search --file --set root /EFI/refind/grubx64.efi |
---|
| 14 | if [ "$root" != "" ]; then |
---|
| 15 | set label="rEFInd" |
---|
| 16 | set chain="chainloader /EFI/refind/grubx64.efi" |
---|
| 17 | fi |
---|
[b845aab] | 18 | |
---|
[528ff4c] | 19 | if [ "$root" == "" ]; then |
---|
[b845aab] | 20 | echo "Searching Part-01-02" |
---|
| 21 | search --file --set root /EFI/Part-01-02/Boot/ogloader.efi |
---|
[528ff4c] | 22 | if [ "$root" != "" ]; then |
---|
[b845aab] | 23 | set label="Part-01-02" |
---|
| 24 | set chain="chainloader /EFI/Part-01-02/Boot/ogloader.efi" |
---|
[528ff4c] | 25 | fi |
---|
| 26 | fi |
---|
| 27 | |
---|
| 28 | if [ "$root" == "" ]; then |
---|
[b845aab] | 29 | echo "Searching Part-01-03" |
---|
| 30 | search --file --set root /EFI/Part-01-03/Boot/ogloader.efi |
---|
[528ff4c] | 31 | if [ "$root" != "" ]; then |
---|
[b845aab] | 32 | set label="Part-01-03" |
---|
| 33 | set chain="chainloader /EFI/Part-01-03/Boot/ogloader.efi" |
---|
[528ff4c] | 34 | fi |
---|
| 35 | fi |
---|
| 36 | |
---|
| 37 | if [ "$root" == "" ]; then |
---|
[b845aab] | 38 | echo "Searching Microsoft" |
---|
| 39 | search --file --set root /EFI/Microsoft/Boot/bootmgfw.efi |
---|
[528ff4c] | 40 | if [ "$root" != "" ]; then |
---|
[b845aab] | 41 | set label="Microsoft" |
---|
| 42 | set chain="chainloader /EFI/Microsoft/Boot/bootmgfw.efi" |
---|
[528ff4c] | 43 | fi |
---|
| 44 | fi |
---|
| 45 | |
---|
| 46 | if [ "$root" == "" ]; then |
---|
[b845aab] | 47 | echo "Searching Ubuntu" |
---|
| 48 | search --file --set root /EFI/ubuntu/grubx64.efi |
---|
[528ff4c] | 49 | if [ "$root" != "" ]; then |
---|
[b845aab] | 50 | set label="Ubuntu" |
---|
| 51 | set chain="chainloader /EFI/ubuntu/grubx64.efi" |
---|
[528ff4c] | 52 | fi |
---|
| 53 | fi |
---|
| 54 | |
---|
| 55 | if [ "$root" != "" ]; then |
---|
| 56 | set label="OpenGnsys ha detectado: $label" |
---|
| 57 | else |
---|
| 58 | # para evitar mensajes de error. |
---|
| 59 | set root="(hd0,gpt1)" |
---|
| 60 | fi |
---|
| 61 | |
---|
| 62 | menuentry "$label" { |
---|
| 63 | eval "$chain" |
---|
| 64 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.