LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 12-07-2003, 01:45 PM   #1
Forezt
Member
 
Registered: Jun 2003
Location: Aero-nomadic
Distribution: Debian (etch, PPC)
Posts: 80

Rep: Reputation: 15
Mounting and reading NTFS and FAT32 patitions


This is my second day using Fedora, and I was wondering how I could get to my windows partitions so I can acess my music and files.

I searched these forums, and I found this utility that adds NTFS support: http://linux-ntfs.sourceforge.net/index.html. I downloaded and installed the rpm. Now this is where I'm stumped: how do I actually access the partition? Do I have to use the terminal, or what. On the website with the NTFS project, it said that I had to use a mounting point, and I have no idea what this is. I know that my NTFS partition I want to get to is located at (hd0,2), and the fat32 patition is (hd0,8).

 
Old 12-07-2003, 02:03 PM   #2
linux_pioneer
Member
 
Registered: May 2003
Distribution: Solaris 10, Solaris 8.0, Fedora Core 3
Posts: 203

Rep: Reputation: 30
you need to find out what the partition is named, create a directory to mount it on, and mount it.

mount /partition/name /mnt/ntfs-partition/directory
 
Old 12-07-2003, 02:05 PM   #3
hw-tph
Senior Member
 
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 57
Edit the file /etc/fstab. You will see entries (lines) like these ones:
Code:
/dev/hda2       /               ext3    errors=remount-ro       0       1
/dev/hda1       none            swap    sw                      0       0
.
.
.
(...etc)
Add a line for the partition you want to mount, like this (if /dev/hdb1 is a FAT32 partition):
Code:
/dev/hdb1       /mnt/win_c      vfat    user      0       0
The vfat option indicates that the partition uses the VFAT, FAT32 or FAT32X file systems. /mnt/win_c is the mountpoint, which has to be a directory. Create a mountpoint (traditionally in /mnt/) by using the mkdir command, or use a graphical file manager.

Adding an NTFS partition is similarily easy:
Code:
/dev/hdd1       /mnt/win_e     ntfs    noauto,ro,user          0       0
The "noato,ro,user" part means that it is not supposed to be mounted automatically at boot, it's readonly (you can't write to it) and users can mount the partition.

Then just use the mount command - you can mount partitions defined in /etc/fstab by just typing mount <partition> or mount <mountpoint>, like this:
mount /dev/hdb1
or...
mount /mnt/win_c
The above two commands do the exact same thing.

Håkan

Last edited by hw-tph; 12-07-2003 at 02:07 PM.
 
Old 12-07-2003, 10:38 PM   #4
ac1980
Member
 
Registered: Aug 2003
Location: Trento, Italy
Distribution: Debian testing
Posts: 394

Rep: Reputation: 30
what you actually have to use is:
/dev/hda3 for ntfs
/dev/hda9 for vfat

for vfat, add the umask=0 option to allow any user to write to it
 
Old 02-23-2004, 04:48 PM   #5
Forezt
Member
 
Registered: Jun 2003
Location: Aero-nomadic
Distribution: Debian (etch, PPC)
Posts: 80

Original Poster
Rep: Reputation: 15
ok, I got the partition mounted just fine, but I still can't get it so I can write the the drive as a regular user. Here's my etc/fstab


Code:
LABEL=/                 /                       ext3    defaults        1 1
LABEL=/boot             /boot                   ext3    defaults        1 2
none                    /dev/pts                devpts  gid=5,mode=620  0 0
none                    /proc                   proc    defaults        0 0
none                    /dev/shm                tmpfs   defaults        0 0
/dev/hda5               swap                    swap    defaults        0 0
/dev/cdrom              /mnt/cdrom              udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/hda7               /mnt/stuff              vfat    defaults,user,umask=0            0 0
 
Old 02-23-2004, 05:03 PM   #6
JROCK1980
Member
 
Registered: Aug 2003
Distribution: FreeBSD
Posts: 490

Rep: Reputation: 30
Ther reason is, it is not safe to write to ntfs from Linux. But if you wish then you have to have it loaded in the kernel. This is an option that is not by default selected. You would have to build a new kernel and add that option. Then you could write to it. But be WARNED!!!!!! you can lose your ntfs drive so make sure you are backed up because a lot of crying would be involved ( At least my 200 gigs of data). But that is how you need to do it.
 
Old 02-24-2004, 07:36 AM   #7
ac1980
Member
 
Registered: Aug 2003
Location: Trento, Italy
Distribution: Debian testing
Posts: 394

Rep: Reputation: 30
I think none of partiotions seen by grub as (hd0,2) and (hd0,8) are shown in fstab... maybe you have an automount daemon installed?
 
Old 02-24-2004, 09:09 AM   #8
chem1
Member
 
Registered: Jun 2002
Location: White House, Washignton DC
Distribution: Red Hat 9
Posts: 270

Rep: Reputation: 30
DO NOT try to write to NTFS partitions. Mandrake duped me into doing this (they said its safe :-D ) and I lost my C: drive

Hope this helps...
 
Old 02-24-2004, 10:34 AM   #9
davidbalt
Member
 
Registered: Feb 2004
Distribution: Gentoo -- always from stage1
Posts: 85

Rep: Reputation: 15
His fstab says vfat

His fstab says vfat - not ntfs. I mount a vfat drive - heres the pertinent line from fstab:

/dev/hdb1 /mnt/collosus vfat defaults,mode=777

the "mode" parameter gives it full access permissions. Probably the reason you can't write to it is because it is mounted with insufficient permissions. This seems to happen a lot.

Frustratingly, I'm not sure you can rely on the permissions actually set on the files and directories on the drive if the mount permissions are not set to 777.

And a heads up for later on - you can't use all the permissions on vfat that you can use on ext. I found this out the hard way when trying to set some directories to drwx------. For instance, that particular permission can not be set (in my experience) on vfat.
 
Old 02-24-2004, 03:54 PM   #10
jago25_98
Member
 
Registered: Jun 2001
Posts: 278

Rep: Reputation: 30
fdisk /dev/hd?? > "p"

mount /dev/hd?? /mnt/foo

you probably won't need -t ntfs
 
Old 02-25-2004, 01:19 PM   #11
ac1980
Member
 
Registered: Aug 2003
Location: Trento, Italy
Distribution: Debian testing
Posts: 394

Rep: Reputation: 30
Quote:
I'm not sure you can rely on the permissions actually set on the files and directories on the drive
vfat has no "ownership" concept. Files have 4 attribs: system, hidden, archive, read-only. Only RO actually has an effect, so resulting possible permissions, given umask=0, are rwxrwxrwx or r-xr-xr-x
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
seeing/reading ntfs/fat32 partitions from linuxFC4 teto Linux - Newbie 12 11-27-2005 11:29 AM
NTFS -> FAT32 mounting help adds2one Slackware 5 09-20-2005 02:07 PM
mounting ntfs format patitions from fedora core person#6661067 Linux - Newbie 2 11-08-2004 08:03 PM
Writing to FAT32 and reading from NTFS in FC2 dysfunction Linux - Hardware 5 11-04-2004 03:26 PM
mounting/reading from mp3/fat32 drive bandofmercy Linux - Hardware 2 04-23-2003 04:20 PM


All times are GMT -5. The time now is 09:26 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration