summaryrefslogtreecommitdiffstats
path: root/client/shared
diff options
context:
space:
mode:
authorIrina Gómez <irinagomez@us.es>2020-12-09 14:24:42 +0100
committerIrina Gómez <irinagomez@us.es>2020-12-09 14:24:42 +0100
commit8ceb1f32ddb0382fba8bf428d70a1afbaef863b9 (patch)
treeeeb0fe75fe96137a726931d96d1ece86f2a25396 /client/shared
parentfb25c368a36c25132cacfb97ab78cea1eab2100d (diff)
#1011 Fix the error when Windows is hibernated. "Error code 6" was displayed in the boot menu.
Diffstat (limited to 'client/shared')
-rwxr-xr-xclient/shared/scripts/bootOs19
1 files changed, 18 insertions, 1 deletions
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 $@