Click to See Complete Forum and Search --> : connecting to an ntfs win2k directory from linux
possumpuss
03-01-2001, 08:36 PM
hi i followed the below advice by prince_kenshi to connect to my ntfs win2k partition (the first partition on my hd) from my linux partition
now how do i get to my damn mp3 directory?
Here's a program you could try: Linux. If you have a somewhat modern kernel, it should have NTFS support. I have 6 NTFS partitions
mounted right now. Just make a directory to mount them to, preferably something in /mnt. I'll assume it's /mnt/win. Then, supposed that your
Windows partition is the first thing on the first drive, you would do this:
mount /dev/hda1 -t ntfs /mnt/win
It's rather simply once you get used to it.
:eek:
FyberOptyx
03-01-2001, 10:33 PM
Once you have mounted the drive change to the directory
eg:
cd /mnt/winc (or whatever mount point you created) then browse your nt directory.
I think you can only read from NT partitions though you can't write anything to it. :)
thedexman
03-01-2001, 11:33 PM
A small note: By default, the files are owned by root and not readable by somebody else for NTFS paritions (from the mount(8) man page). When you mount it you should add the -o umask=value. Your call will look something like this:
mount -t ntfs -o umask=666 /dev/hda1 /mnt/win
possumpuss
03-02-2001, 12:21 AM
what is the umask value for? is that just an arbitrary number?
do i need to be logged in as root to do this? and if i do this as root will it show up when i'm logged in as a regular user?
how do i browse my ntfs directory from the newly mounted directory? will all my win2k files just show up? i just want my mp3 directory...
will i have to remount this every time i want to get in or does it stay mounted?
thanks
thedexman
03-02-2001, 12:46 AM
The umask value sets the default permissions for all the files. NTFS doesn't do the permissions the same way as Unicies do, so a restrictive default permission is used. the 666 sets up the partion so anyone can read and look in directories. This part is a little confusing, you might look at http://www.freeos.com/articles/3127/
To get to your ntfs directory, you would just:
cd /mnt/win/mp3_dir
replacing mp3_dir, with the actual path to the mp3's (/mnt/win at this point would be analagous to being at c:\ in windows). Remember that the file names will be case sensitive under Linux.
The partition says mounted until you reboot. To make it permanent you need to edit /etc/fstab and put in a like like:
/dev/hda1 /mnt/win ntfs umask=666 0 0
(look at 'man fstab')
Edit: And yes, you need to be root to make these changes or to mount/unmount drives.
Edit 2: I Just found this NHF: http://linuxnewbie.org/nhf/intel/filesys/fileperms.html
[ 02 March 2001: Message edited by: thedexman ]
[ 02 March 2001: Message edited by: thedexman ]
possumpuss
03-02-2001, 01:05 AM
thanks
that's great advice
possumpuss
03-02-2001, 01:20 AM
hi i just tried it
is there a space in
mount -t ntfs -o umask=666 /dev/hda1 /mnt/win
between /dev/hda1 and /mnt/win?
when i left a space in between it said ntfs fs type not supported by kernel
i'm running rh7 2.2.16 kernel btw...
when there's no space in between the two it says
mount [-lhV]
mount -a [nfrsvw] [-t vfstypes]
etc etc
i'm assuming the last one did the trick since it output something...
so when i cd to /mnt/win/my music
it says no file or directory
i try capitalizing the the first letters in my music same result...
thedexman
03-02-2001, 01:33 AM
No, the first way with the space between /dev/hda1 and /mnt/win is correct. The error message inidicates that your kernel just doesn't have support for NTFS. You'll just need to read the Kernel NHF (http://www.linuxnewbie.org/nhf/intel/compiling/kernelcomp.html), and be sure to add in NTFS support.
The second error message just indicates that you were using the mount program wrong ;-).
Once NTFS support is compiled in, you should be able to successfully mount and then cd into the directory.
One thing I forgot, cd will be confused with the spaces, so you would type
cd /mnt/win/my\ music
possumpuss
03-02-2001, 01:50 AM
thanks for all your help
i'll look into getting ntfs support come back to this...
possum