88 lines
2.1 KiB
Plaintext
88 lines
2.1 KiB
Plaintext
set timeout=30
|
|
|
|
set detectado='no'
|
|
# Compruebo si existen distintos cargadores.
|
|
echo "Searching Grub"
|
|
set ISODIR=__OGLIVE__
|
|
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
|
|
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
|
|
set detectado='si'
|
|
menuentry "Part-01-02" {
|
|
root="$rootP2"
|
|
chainloader /EFI/Part-01-02/Boot/ogloader.efi
|
|
}
|
|
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
|
|
}
|
|
fi
|
|
|
|
echo "Searching Windows"
|
|
search --file --set rootMS /EFI/Microsoft/Boot/bootmgfw.efi
|
|
if [ "$rootMS" != "" ]; then
|
|
set detectado='si'
|
|
menuentry "Windows" {
|
|
root="$rootMS"
|
|
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
|
|
}
|
|
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
|
|
|
|
|
|
echo "Buscando ogvmlinuz en particiones locales..."
|
|
search --file --set=rootOgCache /boot/$ISODIR/ogvmlinuz
|
|
if [ "$rootOgCache" != "" ]; then
|
|
set detectado='si'
|
|
menuentry "Oglive Cache"{
|
|
root="$rootOgCache"
|
|
linux /boot/$ISODIR/ogvmlinuz __INFOHOST__
|
|
initrd /boot/$ISODIR/oginitrd.img
|
|
}
|
|
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
|