918-git-images-111dconfigure-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 23e53a5 was
f6ab049,
checked in by Irina Gómez <irinagomez@…>, 5 years ago
|
#802 #888 PXE default template for UEFI shows a menu with operating system loaders. Searchs grub, rEFInd, operating system restored with OpenGnsys, windows and Ubuntu.
|
-
Property mode set to
100644
|
File size:
1.9 KB
|
Rev | Line | |
---|
[7e4b9e0] | 1 | # Busca cargadores existentes por orden de prioridad y |
---|
| 2 | # muestra menú con las opciones. |
---|
[528ff4c] | 3 | # Si no existe ningún cargador de arranque muestre mensaje de error. |
---|
[a445889] | 4 | set timeout=30 |
---|
[528ff4c] | 5 | |
---|
[137ceb4] | 6 | set detectado='no' |
---|
[528ff4c] | 7 | # Compruebo si existen distintos cargadores. |
---|
[a445889] | 8 | echo "Searching Grub" |
---|
| 9 | search --file --set rootGrub /EFI/grub/Boot/grubx64.efi |
---|
| 10 | if [ "$rootGrub" != "" ]; then |
---|
[137ceb4] | 11 | set detectado='si' |
---|
[a445889] | 12 | menuentry "Grub" { |
---|
| 13 | root="$rootGrub" |
---|
| 14 | chainloader /EFI/grub/Boot/grubx64.efi |
---|
[137ceb4] | 15 | } |
---|
[528ff4c] | 16 | fi |
---|
[b845aab] | 17 | |
---|
[f6ab049] | 18 | echo "Searching rEFInd" |
---|
| 19 | search --file --set rootRefind /EFI/refind/shimx64.efi.signed |
---|
| 20 | if [ "$rootRefind" != "" ]; then |
---|
| 21 | menuentry "rEFInd" { |
---|
| 22 | root="$rootRefind" |
---|
| 23 | chainloader /EFI/refind/shimx64.efi.signed |
---|
| 24 | } |
---|
| 25 | fi |
---|
| 26 | |
---|
[137ceb4] | 27 | echo "Searching Part-01-02" |
---|
| 28 | search --file --set rootP2 /EFI/Part-01-02/Boot/ogloader.efi |
---|
| 29 | if [ "$rootP2" != "" ]; then |
---|
| 30 | set detectado='si' |
---|
| 31 | menuentry "Part-01-02" { |
---|
| 32 | root="$rootP2" |
---|
| 33 | chainloader /EFI/Part-01-02/Boot/ogloader.efi |
---|
| 34 | } |
---|
[528ff4c] | 35 | fi |
---|
| 36 | |
---|
[137ceb4] | 37 | echo "Searching Part-01-03" |
---|
| 38 | search --file --set rootP3 /EFI/Part-01-03/Boot/ogloader.efi |
---|
| 39 | if [ "$rootP3" != "" ]; then |
---|
| 40 | set detectado='si' |
---|
| 41 | menuentry "Part-01-03" { |
---|
| 42 | root="$rootP3" |
---|
| 43 | chainloader /EFI/Part-01-03/Boot/ogloader.efi |
---|
| 44 | } |
---|
[528ff4c] | 45 | fi |
---|
| 46 | |
---|
[137ceb4] | 47 | echo "Searching Microsoft" |
---|
| 48 | search --file --set rootMS /EFI/Microsoft/Boot/bootmgfw.efi |
---|
| 49 | if [ "$rootMS" != "" ]; then |
---|
| 50 | set detectado='si' |
---|
| 51 | menuentry "Microsoft" { |
---|
| 52 | root="$rootMS" |
---|
| 53 | chainloader /EFI/Microsoft/Boot/bootmgfw.efi |
---|
| 54 | } |
---|
[528ff4c] | 55 | fi |
---|
| 56 | |
---|
[137ceb4] | 57 | echo "Searching Ubuntu" |
---|
| 58 | search --file --set rootUb /EFI/ubuntu/grubx64.efi |
---|
| 59 | if [ "$rootUb" != "" ]; then |
---|
| 60 | set detectado='si' |
---|
| 61 | menuentry "Ubuntu" |
---|
| 62 | root="$rootUb" |
---|
| 63 | chainloader /EFI/ubuntu/grubx64.efi |
---|
| 64 | } |
---|
[528ff4c] | 65 | fi |
---|
| 66 | |
---|
| 67 | |
---|
[7e4b9e0] | 68 | # Si no hay ningún sistema operativo muestro mensaje. |
---|
[137ceb4] | 69 | if [ $detectado == 'no' ]; then |
---|
| 70 | menuentry "OpenGnsys no ha detectado ningún sistema operativo" { |
---|
| 71 | # para evitar mensajes de error. |
---|
| 72 | set root="(hd0,gpt1)" |
---|
| 73 | } |
---|
| 74 | fi |
---|
Note: See
TracBrowser
for help on using the repository browser.