diff options
author | Irina Gómez <irinagomez@us.es> | 2019-02-25 12:54:50 +0100 |
---|---|---|
committer | Irina Gómez <irinagomez@us.es> | 2019-02-25 12:54:50 +0100 |
commit | 40bd9f5d30a2de8ac5293616f786a8dbdcc7ed34 (patch) | |
tree | 173f5805840e6a3ea93df0d3ecfe8458603a25ba /client | |
parent | e4324788f294ab6db30ec57631d2f08865db3a61 (diff) |
#802 #888 ogGrubInstall and ogRestoreEfiBootLoader: A generic name is used for the boot loader. This allows you to use PXE templates for a partition.
Diffstat (limited to 'client')
-rwxr-xr-x | client/engine/Boot.lib | 30 | ||||
-rw-r--r-- | client/engine/UEFI.lib | 2 |
2 files changed, 22 insertions, 10 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 } |