summaryrefslogtreecommitdiffstats
path: root/client/engine/Boot.lib
diff options
context:
space:
mode:
authorIrina Gómez <irinagomez@us.es>2019-02-04 11:34:26 +0100
committerIrina Gómez <irinagomez@us.es>2019-02-04 11:34:26 +0100
commite9601e1f70519e9e380e6198e29df2f695ffbd94 (patch)
treea6dec5245cad8aa129baca5e42742498ca2c262e /client/engine/Boot.lib
parent20e5aa9e4558004d6d46fddd033f04d59afe61a0 (diff)
#802 #889 #890 ogGrubInstallPartitions, ogGrubInstallMbr y ogRestoreEfiBootLoader: Format EFI partition if it is not. ogGetEsp: Detecting the EFI partition does not require VFAT filesystem.
Diffstat (limited to 'client/engine/Boot.lib')
-rwxr-xr-xclient/engine/Boot.lib12
1 files changed, 10 insertions, 2 deletions
diff --git a/client/engine/Boot.lib b/client/engine/Boot.lib
index 09337657..9c6d9990 100755
--- a/client/engine/Boot.lib
+++ b/client/engine/Boot.lib
@@ -821,7 +821,11 @@ PREFIXSECONDSTAGE="/boot/grubMBR"
if ogIsEfiActive; then
read EFIDISK EFIPART <<< $(ogGetEsp)
# Comprobamos que exista ESP y el directorio para ubuntu
- EFISECONDSTAGE=$(ogMount $EFIDISK $EFIPART) || ogRaiseError $OG_ERR_PARTITION "ESP" || return $?
+ EFISECONDSTAGE=$(ogMount $EFIDISK $EFIPART)
+ if [ $? -ne 0 ]; then
+ ogFormat $EFIDISK $EFIPART FAT32
+ EFISECONDSTAGE=$(ogMount $EFIDISK $EFIPART) || ogRaiseError $OG_ERR_PARTITION "ESP" || return $?
+ fi
EFISUBDIR=$(printf "Part-%02d-%02d" $DISK $PART)
[ -d ${EFISECONDSTAGE}/EFI/$EFISUBDIR ] || mkdir -p ${EFISECONDSTAGE}/EFI/$EFISUBDIR
EFIOPTGRUB=" --target x86_64-efi --efi-directory=${EFISECONDSTAGE}/EFI/$EFISUBDIR "
@@ -943,7 +947,11 @@ PREFIXSECONDSTAGE="/boot/grubPARTITION"
if ogIsEfiActive; then
read EFIDISK EFIPART <<< $(ogGetEsp)
# Comprobamos que exista ESP y el directorio para ubuntu
- EFISECONDSTAGE=$(ogMount $EFIDISK $EFIPART) || ogRaiseError $OG_ERR_PARTITION "ESP" || return $?
+ EFISECONDSTAGE=$(ogMount $EFIDISK $EFIPART)
+ if [ $? -ne 0 ]; then
+ ogFormat $EFIDISK $EFIPART FAT32
+ EFISECONDSTAGE=$(ogMount $EFIDISK $EFIPART) || ogRaiseError $OG_ERR_PARTITION "ESP" || return $?
+ fi
EFISUBDIR=$(printf "Part-%02d-%02d" $DISK $PART)
[ -d ${EFISECONDSTAGE}/EFI/$EFISUBDIR ] || mkdir -p ${EFISECONDSTAGE}/EFI/$EFISUBDIR
EFIOPTGRUB=" --target x86_64-efi --efi-directory=${EFISECONDSTAGE}/EFI/$EFISUBDIR "