Skip to main content
fix. one wants to mount the specific partition. And if one uses *, the command fails if sda has 1 or more partitions.
Source Link

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

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* /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

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[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
correct vocabulary
Source Link
Volker Siegel
  • 13.2k
  • 5
  • 50
  • 67

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* /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

(I edit to correct the vocabulary, but the system requires me to have at least 6 characters. Please remove this for me. Thanks)

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* /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

(I edit to correct the vocabulary, but the system requires me to have at least 6 characters. Please remove this for me. Thanks)

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* /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

My solution was to call a mntwindows script in /etc/rc.local. This script would check for hibernation and if hibernated mount as readonlyread 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* /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

(I edit to correct the vocabulary, but the system requires me to have at least 6 characters. Please remove this for me. Thanks)

My solution was to call a mntwindows script in /etc/rc.local. This script would check for hibernation and if hibernated mount as readonly. 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* /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

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* /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

(I edit to correct the vocabulary, but the system requires me to have at least 6 characters. Please remove this for me. Thanks)

Added language code to code block, as it was not being auto-detected, and some extra formatting
Source Link
Loading
Source Link
Anon
  • 191
  • 1
  • 2
Loading