#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.
parent
541ddee383
commit
f6ab0497b3
|
@ -15,6 +15,15 @@ if [ "$rootGrub" != "" ]; then
|
|||
}
|
||||
fi
|
||||
|
||||
echo "Searching rEFInd"
|
||||
search --file --set rootRefind /EFI/refind/shimx64.efi.signed
|
||||
if [ "$rootRefind" != "" ]; then
|
||||
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
|
||||
|
|
|
@ -3,16 +3,21 @@
|
|||
# Arranque por defecto en OpenGnsys
|
||||
# Busca cargadores existentes por orden de prioridad y
|
||||
# muestra menú con las opciones
|
||||
set default=0
|
||||
|
||||
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
|
||||
}
|
||||
# Si no existe ningún cargador de arranque muestra mensaje de error.
|
||||
set timeout=30
|
||||
|
||||
set detectado='no'
|
||||
# Compruebo si existen distintos cargadores.
|
||||
echo "Searching Grub"
|
||||
search --file --set rootGrub /EFI/grub/Boot/grubx64.efi
|
||||
if [ "$rootGrub" != "" ]; then
|
||||
set detectado='si'
|
||||
menuentry "Grub" {
|
||||
root="$rootGrub"
|
||||
chainloader /EFI/grub/Boot/grubx64.efi
|
||||
}
|
||||
fi
|
||||
|
||||
echo "Searching rEFInd"
|
||||
search --file --set rootRefind /EFI/refind/shimx64.efi.signed
|
||||
if [ "$rootRefind" != "" ]; then
|
||||
|
@ -25,6 +30,7 @@ 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
|
||||
|
@ -34,6 +40,7 @@ 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
|
||||
|
@ -43,6 +50,7 @@ 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
|
||||
|
@ -52,8 +60,18 @@ 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 sistema 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
|
||||
|
|
Loading…
Reference in New Issue