Get ntfs-3g working with windows hibernate
Posted in Linux, Open Source by sandaruwan on March 18th, 2007Several weeks ago, I installed ntfs-3g and it was working fine. However, It doesn’t mount the drive if windows is hibernated. I usually hibernate windows in my laptop, so I wasn’t having ntfs-3g in fstab, I just remount it when I need it. I was sick of this and came up with a very simple script which allows me to mount it in ntfs-3g if possible, and to use ntfs otherwise.
This is how to do it.
- Install ntfs-3g
- Edit your fstab
- Open
/etc/init.d/mount-bak.sh - Change the run level
Just type sudo apt-get install ntfs-3g
Open /etc/fstab and change the mount type from “ntfs” to “ntfs-3g”
Here is my script. Change your device and get options from the fstab. The device should be changed on both 2nd and 4th lines.
#!/bin/bash
mounted=`mount | grep sda1`;
if [ "$mounted" = "" ]; then
mount /dev/sda1 /media/sda1 -o ‘defaults,nls=utf8,umask=007,gid=46′
fi
Change the permission of the script by running sudo chmod a+x /etc/init.d/mount-bak.sh
sudo ln -s /etc/init.d/mount-bak.sh /etc/rcS.d/47mount-bak.sh


