summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xclient/engine/Boot.lib30
-rw-r--r--client/engine/UEFI.lib2
-rw-r--r--server/tftpboot/grub/templates/124
-rw-r--r--server/tftpboot/grub/templates/134
-rw-r--r--server/tftpboot/grub/templates/pxe (renamed from server/tftpboot/grub/templates/21UEFIpxe)4
5 files changed, 32 insertions, 12 deletions
diff --git a/client/engine/Boot.lib b/client/engine/Boot.lib
index 9c6d9990..47502d19 100755
--- a/client/engine/Boot.lib
+++ b/client/engine/Boot.lib
@@ -84,14 +84,6 @@ case "$TYPE" in
ogRaiseError $OG_ERR_NOTOS "$1 $2 ($TYPE, EFI)"
return $?
fi
- ### Se realiza en la postconfiguracion ¿lo volvemos a hacer aquí?
- ## Configuramos el grub.cfg de la partición EFI
- ## Directorio del grub en la partición de sistema
- #for f in $MNTDIR/{,boot/}{{grubMBR,grubPARTITION}/boot/,}{grub{,2},{,efi/}EFI/*}/{menu.lst,grub.cfg}; do
- # [ -r $f ] && DIRGRUB=$(dirname $f)
- #done
- #DIRGRUB=${DIRGRUB#$MNTDIR/}
- #ogGrubUefiConf $1 $2 $DIRGRUB || return $?
# Borrar cargador guardado con la misma etiqueta.
BOOTLABEL=$(printf "Part-%02d-%02d" $1 $2)
@@ -844,12 +836,17 @@ then
[ -d ${SECONDSTAGE}${PREFIXSECONDSTAGE} ] && rm -fr ${SECONDSTAGE}${PREFIXSECONDSTAGE}
# Reactivamos el grub con el grub.cfg original.
grub-install --force ${EFIOPTGRUB} --root-directory=${SECONDSTAGE} $FIRSTSTAGE
+ EVAL=$?
# Movemos el grubx64.efi
if ogIsEfiActive; then
+ # Nombre genérico para cargador
+ mkdir ${EFISECONDSTAGE}/EFI/$EFISUBDIR/Boot
+ cp ${EFISECONDSTAGE}/EFI/$EFISUBDIR/EFI/ubuntu/grubx64.efi ${EFISECONDSTAGE}/EFI/$EFISUBDIR/Boot/ogloader.efi
+
mv ${EFISECONDSTAGE}/EFI/$EFISUBDIR/EFI/ubuntu/grubx64.efi ${EFISECONDSTAGE}/EFI/$EFISUBDIR
rm -rf ${EFISECONDSTAGE}/EFI/$EFISUBDIR/EFI
fi
- return $?
+ return $EVAL
fi
fi
@@ -878,6 +875,10 @@ grub-install --force ${EFIOPTGRUB} --root-directory=${SECONDSTAGE}${PREFIXSECOND
# Movemos el grubx64.efi
if ogIsEfiActive; then
+ # Nombre genérico para cargador
+ mkdir ${EFISECONDSTAGE}/EFI/$EFISUBDIR/Boot
+ cp ${EFISECONDSTAGE}/EFI/$EFISUBDIR/EFI/ubuntu/grubx64.efi ${EFISECONDSTAGE}/EFI/$EFISUBDIR/Boot/ogloader.efi
+
mv ${EFISECONDSTAGE}/EFI/$EFISUBDIR/EFI/ubuntu/grubx64.efi ${EFISECONDSTAGE}/EFI/$EFISUBDIR
rm -rf ${EFISECONDSTAGE}/EFI/$EFISUBDIR/EFI
fi
@@ -970,12 +971,17 @@ then
[ -d ${SECONDSTAGE}${PREFIXSECONDSTAGE} ] && rm -fr ${SECONDSTAGE}${PREFIXSECONDSTAGE}
# Reactivamos el grub con el grub.cfg original.
grub-install --force ${EFIOPTGRUB} --root-directory=${SECONDSTAGE} $FIRSTSTAGE
+ EVAL=$?
# Movemos el grubx64.efi
if ogIsEfiActive; then
+ # Nombre genérico para cargador
+ mkdir ${EFISECONDSTAGE}/EFI/$EFISUBDIR/Boot
+ cp ${EFISECONDSTAGE}/EFI/$EFISUBDIR/EFI/ubuntu/grubx64.efi ${EFISECONDSTAGE}/EFI/$EFISUBDIR/Boot/ogloader.efi
+
mv ${EFISECONDSTAGE}/EFI/$EFISUBDIR/EFI/ubuntu/grubx64.efi ${EFISECONDSTAGE}/EFI/$EFISUBDIR
rm -rf ${EFISECONDSTAGE}/EFI/$EFISUBDIR/EFI
fi
- return $?
+ return $EVAL
fi
fi
@@ -1000,6 +1006,10 @@ grub-install --force ${EFIOPTGRUB} --root-directory=${SECONDSTAGE}${PREFIXSECOND
# Movemos el grubx64.efi
if ogIsEfiActive; then
+ # Nombre genérico para cargador
+ mkdir ${EFISECONDSTAGE}/EFI/$EFISUBDIR/Boot
+ cp ${EFISECONDSTAGE}/EFI/$EFISUBDIR/EFI/ubuntu/grubx64.efi ${EFISECONDSTAGE}/EFI/$EFISUBDIR/Boot/ogloader.efi
+
mv ${EFISECONDSTAGE}/EFI/$EFISUBDIR/EFI/ubuntu/grubx64.efi ${EFISECONDSTAGE}/EFI/$EFISUBDIR
rm -rf ${EFISECONDSTAGE}/EFI/$EFISUBDIR/EFI
fi
diff --git a/client/engine/UEFI.lib b/client/engine/UEFI.lib
index 84cfb65a..c467523b 100644
--- a/client/engine/UEFI.lib
+++ b/client/engine/UEFI.lib
@@ -176,6 +176,8 @@ case $OSVERSION in
[ -r $EFIDIR/$BOOTLABEL ] && rm -rf $EFIDIR/$BOOTLABEL
mkdir -p $EFIDIR/EFI/$BOOTLABEL
cp -r "${LOADER%/*}" $EFIDIR/EFI/$BOOTLABEL
+ # Nombre genérico para cargador
+ cp $LOADER $EFIDIR/EFI/$BOOTLABEL/Boot/ogloader.efi
;;
esac
}
diff --git a/server/tftpboot/grub/templates/12 b/server/tftpboot/grub/templates/12
new file mode 100644
index 00000000..dea74d35
--- /dev/null
+++ b/server/tftpboot/grub/templates/12
@@ -0,0 +1,4 @@
+##NO-TOCAR-ESTA-LINEA 1hd-2partition
+root='hd0,gpt1'
+chainloader /EFI/Part-01-02/Boot/ogloader.efi
+boot
diff --git a/server/tftpboot/grub/templates/13 b/server/tftpboot/grub/templates/13
new file mode 100644
index 00000000..2924d05c
--- /dev/null
+++ b/server/tftpboot/grub/templates/13
@@ -0,0 +1,4 @@
+##NO-TOCAR-ESTA-LINEA 1hd-3partition
+root='hd0,gpt1'
+chainloader /EFI/Part-01-03/Boot/ogloader.efi
+boot
diff --git a/server/tftpboot/grub/templates/21UEFIpxe b/server/tftpboot/grub/templates/pxe
index 7892a495..db695291 100644
--- a/server/tftpboot/grub/templates/21UEFIpxe
+++ b/server/tftpboot/grub/templates/pxe
@@ -1,7 +1,7 @@
-##NO-TOCAR-ESTA-LINEA UEFI-pxe
+##NO-TOCAR-ESTA-LINEA 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)/$OGLIVE/oginitrd.img
+initrd (tftp)/$ISODIR/oginitrd.img
boot