Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- if [ -n "$1" ]
- then
- DEV=$1
- echo "$DEV"
- else
- DEV='/dev/sda5'
- echo "$DEV"
- fi
- ###################################
- #try
- #sudo mount -t ntfs-3g -o remove_hiberfile /dev/sda2 /mnt
- #to mount Windows hibernated partition
- ###################################
- if grep -qs $DEV /proc/mounts; then
- echo "It's mounted."
- echo "try umount $DEV"
- sudo umount $DEV
- echo "try re-run script ;)"
- else
- echo "It's not mounted."
- sudo ntfsfix -d $DEV
- echo "now try reboot system or re-mount $DEV ;)"
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement