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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
11-21-2005, 05:37 PM
|
#1
|
LQ Newbie
Registered: Nov 2005
Location: KY
Distribution: FC3
Posts: 11
Rep:
|
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.
|
|
|
11-21-2005, 06:26 PM
|
#2
|
Senior Member
Registered: May 2001
Location: Indiana
Distribution: Gentoo, Debian, RHEL, Slack
Posts: 1,555
Rep:
|
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.
|
|
|
11-21-2005, 08:11 PM
|
#3
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
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.
|
|
|
11-22-2005, 06:13 AM
|
#4
|
LQ Newbie
Registered: Nov 2005
Location: KY
Distribution: FC3
Posts: 11
Original Poster
Rep:
|
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)
|
|
|
11-22-2005, 07:47 AM
|
#5
|
Moderator
Registered: Aug 2002
Posts: 26,753
|
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)
|
|
|
11-22-2005, 10:51 AM
|
#6
|
LQ Newbie
Registered: Nov 2005
Location: KY
Distribution: FC3
Posts: 11
Original Poster
Rep:
|
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.
|
|
|
11-22-2005, 03:13 PM
|
#7
|
LQ Newbie
Registered: Nov 2005
Location: KY
Distribution: FC3
Posts: 11
Original Poster
Rep:
|
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!
|
|
|
11-22-2005, 04:48 PM
|
#8
|
Moderator
Registered: Aug 2002
Posts: 26,753
|
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.
|
|
|
11-23-2005, 05:03 AM
|
#9
|
LQ Newbie
Registered: Nov 2005
Location: KY
Distribution: FC3
Posts: 11
Original Poster
Rep:
|
Thanks! I REALLY appreciate the help.
|
|
|
07-13-2006, 07:02 AM
|
#10
|
LQ Newbie
Registered: Jul 2006
Posts: 7
Rep:
|
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!
|
|
|
07-13-2006, 07:09 AM
|
#11
|
LQ Guru
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131
Rep: 
|
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.
|
|
|
07-13-2006, 07:14 AM
|
#12
|
Moderator
Registered: Aug 2002
Posts: 26,753
|
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
|
|
|
All times are GMT -5. The time now is 04:52 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|