My solution was to call a mntwindows
script in /etc/rc.local
. This script would check for hibernation and if hibernated mount as read only. In order to make sure the script may always be called I placed it in /bin
and marked it as executable. The contents of the script are as follows
sudo mount /dev/sda*sda[Partition Number] /media/[Any existing folder name]
#Mounts Windows
if [ $? -eq 14 ]
then
echo "Windows is sleeping, I'm mounting as read-only"
sudo mount -o ro /dev/sda[Partition Number] /media/[Any existing folder name]
fi