LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 11-21-2005, 05:37 PM   #1
dads454
LQ Newbie
 
Registered: Nov 2005
Location: KY
Distribution: FC3
Posts: 11

Rep: Reputation: 0
New Guy - How to Mount FAT32 Partition


I've made one other post and am TOTALLY new to Linux. But, I do have FC3 up and running and am online etc. Here are some system details: IDE1 has 3 partitions for XP Recovery, XP and FAT32 for data. IDE2 has 3 partions for FAT32 data, Linux swap, and Linux (ext2 or 3, not sure). How do I mount the FAT32 partition of IDE2? This would be convenient for sharing data with XP. Thanks for the help.
 
Old 11-21-2005, 06:26 PM   #2
musicman_ace
Senior Member
 
Registered: May 2001
Location: Indiana
Distribution: Gentoo, Debian, RHEL, Slack
Posts: 1,555

Rep: Reputation: 46
Since I don't understand your IDE numbering system, here is how linux will assign letters to hard drive devices.
Primary Master = hda
Primary Slave = hdb
Secondary Master = hdc
Secondary Slave = hdd
Each partition on each drive starts at 1.


I'm assuming that your drive is assigned in this manner.
/dev/hda1 = XP recovery
/dev/hda2 = XP
/dev/hda3 = Fat32
/dev/hdb1 = fat32
/dev/hdb2 = linux swap
/dev/hdb3 = linux


To mount the partitions, you'll have to create a mount point and them mount it.
Code:
mkdir /mnt/data
mount -t vfat /dev/hdb1 /mnt/data

Last edited by musicman_ace; 11-21-2005 at 06:27 PM.
 
Old 11-21-2005, 08:11 PM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
You will want to read through the "man mount" man pages to decide which options you want for the fat32 partitions. There is a section on global options, a section on fat options and a section on vfat (virtual fat) options.

Since these partitions are on a fixed hard drive, rather than on a removable usb drive, you may want to include an entry in your /etc/fstab.

For example:
/dev/hda3 /windows/data vfat rw,uid=dads454,gid=users,auto,noexec 0 0

This will mount the third partition on disk 1. The /windows/data directory needs to be created ahead of time. You may choose a different location to mount the partition. The uid= and gid= options determine the ownership and group-ownership of the mounted partition. You will also want to add the 'fmask=' and 'dmask=' options depending on which permissions you want to give the owner and the group. ( note: the dmask is separate because you need the "x" bit set to enter directories, however, you want the "x" bit cleared on files on a shared writable drive ) If you don't mind the "x" bit being set for files, you can use the "umask" option instead of the "fmask" and "dmask" options. The "noexec" option adds more protection against accidentally executing programs. I haven't included the "iocharset" and "codepage" options in this example. Perhaps the defaults are fine.

Something to keep in mind, is that the permissions on the partition are global for fat32 partitions. The chmod and chown commands will not work. Instead, these permissions need to be set by the mount command.

I'm not familiar with FC3. There may be a GUI partitioner program that you could use to mount the partition and change the /etc/fstab entry. Sometimes, such a program will catch needed options depending on partition. Such as using the utf8 option if you have foreign characters in your filenames.

Last edited by jschiwal; 11-21-2005 at 08:13 PM.
 
Old 11-22-2005, 06:13 AM   #4
dads454
LQ Newbie
 
Registered: Nov 2005
Location: KY
Distribution: FC3
Posts: 11

Original Poster
Rep: Reputation: 0
Thanks for all of the help. I made the directory and attempted to mount the partition, but here is what I get:
mount: /dev/hdb1 already mounted or /mnt/data busy
mount: according to mtab, /dev/hdb1 is mounted on /

It appears the drive is mounted, but is doesn't appear with my other drives. Any other ideas?
(I have not modified anything in my fstab file yet)
 
Old 11-22-2005, 07:47 AM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
You need to determine how the drive is partitioned. Post the output from the command
fdisk -l /dev/hdb (that is a small L & you need to be root)
 
Old 11-22-2005, 10:51 AM   #6
dads454
LQ Newbie
 
Registered: Nov 2005
Location: KY
Distribution: FC3
Posts: 11

Original Poster
Rep: Reputation: 0
Got it. Here you go:


Disk /dev/hdb: 163.9 GB, 163928604672 bytes
240 heads, 63 sectors/track, 21175 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 11763 21175 71162280 83 Linux
/dev/hdb2 2 11694 88399080 f W95 Ext'd (LBA)
/dev/hdb3 11695 11762 514080 82 Linux swap
/dev/hdb5 2 11694 88399048+ b W95 FAT32

Partition table entries are not in disk order
Thanks again.

Last edited by dads454; 11-22-2005 at 03:00 PM.
 
Old 11-22-2005, 03:13 PM   #7
dads454
LQ Newbie
 
Registered: Nov 2005
Location: KY
Distribution: FC3
Posts: 11

Original Poster
Rep: Reputation: 0
Got it! I had to mount hdb5. I also modfied the fstab file as recommended.

Do you know why the drive doesn't show up as a drive in "Computer" like the DVD drives do? I have to access the data through the /mnt/data folder.

Thanks again!
 
Old 11-22-2005, 04:48 PM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Yes, you have to access the data through the /mnt/data folder.
Not real familar with FC3 but I assume you can add a shortcut for hdb5 to "Computer". I don't believe the "Computer" is an automatic function.

Actually, all data whether it is a CD or external drive etc is accessed via a folder under /. Removable media is typically mounted under /media or /mnt depending on the distribution. There are no seperate drives like windows c:, d: etc.

Last edited by michaelk; 11-23-2005 at 06:21 AM.
 
Old 11-23-2005, 05:03 AM   #9
dads454
LQ Newbie
 
Registered: Nov 2005
Location: KY
Distribution: FC3
Posts: 11

Original Poster
Rep: Reputation: 0
Thanks! I REALLY appreciate the help.
 
Old 07-13-2006, 07:02 AM   #10
neutrino006
LQ Newbie
 
Registered: Jul 2006
Posts: 7

Rep: Reputation: 0
Hi all! I'm really a NEWBIE, and thank's to you I discovered how to mount a fat32 partition on FC5...but I need some explanations on how to mount "unrecognizable" ntfs partitions, and why need to proceed like that? I understand that it is not implemented writing function on ntfs yet, or it is unstable function, but I need only to automount and read this partitions. THX!
 
Old 07-13-2006, 07:09 AM   #11
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
With ntfs you proceed like with fat32 but use "ntfs" instead of "vfat" as the filesystem type. I'll borrow an example from the above situation:

Code:
mkdir /mnt/data
mount -t ntfs /dev/hdb1 /mnt/data
that would mount an ntfs partition /dev/hdb1 (first partition on the 2nd harddisk) to /mnt/data, with default options (read only). If you wish to automount, add an fstab entry like

Code:
/dev/hdb1 /mnt/data ntfs auto,ro,users,umask=022 0 0
or if you don't want everybody to be able to read it, leave ,umask=022 off the line. "auto" makes it mount the drive automatically at boot; "ro" means read-only, "users" mean other users than root can unmount the drive if necessary etc..

EDIT: (at least) for 32-bit x86 there are drivers for ntfs write-support too (that ntfs driver above is read-only), but they do not function well. Data can be read, but writing is unsure (50-50 chances it succeeds..) and I recall the other method was a bit dangerous as there was a possibility for data destruction too. But for reading, you can safely use the above "ntfs". Oh yes, now I remember - one of the read-write drivers was called Captive.

Last edited by b0uncer; 07-13-2006 at 07:10 AM.
 
Old 07-13-2006, 07:14 AM   #12
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Neutrino006,
Welecome to LinuxQuestions. It would of been better if you had started your own thread. Many questions can be answered faster if you search the site first. Fedora does not include NTFS support by default. You can download the RPM from this site.
http://www.linux-ntfs.org/ It is read only. There is limited write capability in recent kernels but IMO its best not to. You can add a line in the fstab file to mount the NTFS partition just like the FAT32 except use umask=0222
 
  


Reply



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
How to format to FAT32, and how to mount my FAT32 partition. bonniehandi Linux - Newbie 16 03-05-2006 07:54 PM
How can I mount a FAT32 Partition PulsarSL Linux - Newbie 10 08-28-2005 04:43 PM
can't mount fat32 partition warpengi Slackware - Installation 6 09-17-2004 03:56 PM
mount of fat32 partition mys71 Red Hat 2 05-09-2004 02:54 PM
How to mount a new fat32 partition IceOnly Linux - Software 2 06-11-2003 01:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 07:25 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration