From 8ceb1f32ddb0382fba8bf428d70a1afbaef863b9 Mon Sep 17 00:00:00 2001 From: Irina Gómez Date: Wed, 9 Dec 2020 14:24:42 +0100 Subject: #1011 Fix the error when Windows is hibernated. "Error code 6" was displayed in the boot menu. --- client/shared/scripts/bootOs | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/client/shared/scripts/bootOs b/client/shared/scripts/bootOs index c976a5d0..3b569b35 100755 --- a/client/shared/scripts/bootOs +++ b/client/shared/scripts/bootOs @@ -10,10 +10,27 @@ fi # Comprobar errores. PART=$(ogDiskToDev "$1" "$2") || exit $? -ogMount $1 $2 &>/dev/null || exit $? +MNTDIR=$(ogMount $1 $2) || exit $? echo "[0] Inicio del proceso de arranque." +# Si el equipo está hibernado chequeamos el f.s. y borramos el hiberfile (error cod.6) +mount |grep -q "$MNTDIR.*(rw" +if [ $? -ne 0 ]; then + ogEcho log session "${MSG_WARNING}: $MSG_MOUNTREADONLY" + ogUnmount $1 $2 + ogCheckFs $1 $2 + + PART=$(ogDiskToDev "$1" "$2") + mkdir -p $MNTDIR + ntfs-3g -o remove_hiberfile $PART $MNTDIR + ogEcho log session "Particion desbloqueada" + + ogUnmount $1 $2 + ogMount $1 $2 +fi + + if which bootOsCustom &>/dev/null; then echo "[10] Configuración personalizada del inicio." bootOsCustom $@ -- cgit v1.2.3-18-g5258