Jump to content

Recommended Posts

Samba is for mounting windows shares from another computer.

 

Im not sure if this is what you are looking for.

If your running linux and windows on the same computer (dual boot etc.), then its a bit trickier.

 

Typically it "just works" with the latest ubuntu/fedora. I'd suggest grabbing one of their latest livecds. They will automatically pick up and mount your windows partitions. Otherwise your going to have to look at something like http://mount-ntfs.sourceforge.net/ http://www.howtoforge.com/ubuntu_edgy_eft_ntfs_ntfs_3g

 

 

-steve

 

 

Link to comment
https://forums.phpfreaks.com/topic/135938-mount-windows-drive/#findComment-708905
Share on other sites

  • 3 weeks later...

I use ntfsmount from ntfsprogs on debian. I am pretty sure that there is an RPM for RedHat as well. Here is a simple bash script that I wrote to make the process a bit easier:

 

#!/usr/bin/env bash
#@author:             tomfmason@gmail.com
#@app:                  microShaft
#@description:      This is a simple script that makes mounting microShaft ntfs partitions a bit easier.
#                            At some point I plan on adding more useful features to this script for doing various 
#                            things with windows and NTFS partions. Enjoy!
OPTIONS="Mount Unmount Quit"
#options
function options {
echo "Options:"
echo "       -h,--help                          displays this message"
echo "       -i                                 interactive mode" 
echo "       mount (device) (location)          mount the given device at the given location"
echo "       unmount (location)                 unmount the given location"	
}
#bad option	
function bad_option {
echo bad option
}
#mount the windows partion
function mount_windows {
ntfsmount  $1 $2  -o allow_other,show_sys_files,uid=1000
}
#unmount the windows partion
function unmount {
fusermount -u $1
}
#display the interactive menu
function interactive {
select opt in $OPTIONS; do
	if [ "$opt" = "Quit" ]; then
		echo done
		exit
	elif [ "$opt" = "Mount" ]; then
		echo Device to mount
		echo Allow input: device and list
		read DEVICE
		if [ "$DEVICE" = "list" ]; then
			fdisk -l
			echo Device to mount
			read DEVICE
		fi
		echo Directory to mount it to
		read LOCATION
		mount_windows $DEVICE $LOCATION
	elif [ "$opt" = "Unmount" ]; then
		echo Location to unmount
		read LOCATION
		unmount $LOCATION
	else
		clear
		bad_option
	fi
done
}

if [ "$1" = "-i" ]; then
interactive
elif [ "$1" = "-h" ]; then
options
elif [ "$1" = "--help" ]; then
options
elif [ "$1" = "mount" ]; then
mount_windows $2 $3
elif [ "$1" = "unmount" ]; then
unmount $2
else
options
fi

 

You will need to edit your uid in the mount_windows function.

Link to comment
https://forums.phpfreaks.com/topic/135938-mount-windows-drive/#findComment-723296
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.