LinuxQuestions.org
Review your favorite Linux distribution.
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 03-18-2005, 02:28 AM   #1
cquedugdylp
LQ Newbie
 
Registered: Dec 2004
Posts: 3

Rep: Reputation: 0
How to mount FAT partitions under Linux automatically


Dear everyone,

I installed two OS on my PC, Win2000 and RH8.0, and want to share files between these two OS. As I know, I can mount a FAT32 partition under linux using the following command:
mount -t vfat /dev/hda... /mnt/... -o charset=cp936

But, to do so, I have to login using 'root' account first.
I want to know, are there any method let the PC mount FAT32 partitions automatically when linux is booting?
Thank you
 
Old 03-18-2005, 02:38 AM   #2
linmix
Senior Member
 
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993
Blog Entries: 1

Rep: Reputation: 46
by adding the entries to fstab
 
Old 03-18-2005, 03:49 AM   #3
dom_lochet
LQ Newbie
 
Registered: Dec 2004
Location: Belgium
Distribution: Mandrake 10.0
Posts: 13

Rep: Reputation: 0
To be a little more explicit, what you have to do is to add a line like:

/dev/hda4 /mnt/windows vfat defaults,rw,user,uid=0,gid=6,umask=002 0 0

in /etc/fstab.

For more info on the options, just type "man fstab" on the command line.
 
Old 03-18-2005, 04:37 PM   #4
linmix
Senior Member
 
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993
Blog Entries: 1

Rep: Reputation: 46
yeah, just didn't have mine available then. Anyway there a couple of hundred posts on this matter to learn from as well.

Also, 'rw' is included in 'defaults' (man mount!) so it isn't necessary.

BTW my fstab entry is: /dev/hda7 /mnt/windows/f vfat uid=500,gid=500,umask=000,exec,dev,suid,rw 0 0
 
Old 03-18-2005, 10:47 PM   #5
cquedugdylp
LQ Newbie
 
Registered: Dec 2004
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks! I have confirmed this problem.

Last edited by cquedugdylp; 03-18-2005 at 10:49 PM.
 
Old 03-19-2005, 01:07 AM   #6
penguinlnx
Member
 
Registered: Mar 2005
Location: Ice Station Alert AFB
Distribution: Gentoo
Posts: 166

Rep: Reputation: 30
Regarding mounting drives...

probably another dumb question, but do you have to mount the drives 1st,
and then say, format them and add a file-system like 'reiser',
or do you have to use some partition utility outside of your Linux OS/GUI...
THEN mount the drives?

I have an extra partition I was going to use for Windows till I found I couldn't install it
after installing Gentoo. (I am not going to install Gentoo over again without a damn good reason)
I tried partitioning it NTFS using Win2000 floppies but It's just wasted space right now.

How should I proceed?
 
Old 03-19-2005, 03:44 AM   #7
linmix
Senior Member
 
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993
Blog Entries: 1

Rep: Reputation: 46
You can only resize partitions if they're not mounted, and I suppose it would be better not to have them mounted when you make a filesystem change. Try a prog like qtparted for both.

As for windows. if you really need it there's no reason why you shouldn't be able to install it after linux. You'll simply have to reinstall the bootloader when you complete the installation (would be a good idea to create a boot floppy for linux to make things easier)

I'd go with a fat32 partitioning and if you wish to use ntfs later windows should be able to do that for you either during or after installation.
 
Old 03-23-2005, 08:29 AM   #8
bonito
Member
 
Registered: Mar 2005
Posts: 117

Rep: Reputation: 15
Read/Write Windows Partition (fat32)

Quote:
Originally posted by linmix
BTW my fstab entry is: /dev/hda7 /mnt/windows/f vfat uid=500,gid=500,umask=000,exec,dev,suid,rw 0 0 [/B]

Wow, whats up with all those options??

Im trying to get Linux to Mount the windows (fat32) partition was read/write.
Right now, All my Linux Users can see the Windows partition, but only the Root can write to it.

Any Thoughts?
 
Old 03-23-2005, 04:12 PM   #9
linmix
Senior Member
 
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993
Blog Entries: 1

Rep: Reputation: 46
The short answer to that would be "read the man page", but I'll be a little more specific:

"defaults" will do if you only want to be able to 'see' the partition. umask=000 sets file and folder permissions to 777 (umask numbers are the inverse of permission numbers)

By adding "uid=500,gid=500" I ensure that I am the only user (except for root of course) who has read-write access.

According to man mount, defaults = rw, suid, dev, exec, auto, nouser, and async. Since I have specified a user I don't need nouser anymore so it's no longer specified.
 
Old 03-23-2005, 10:14 PM   #10
bonito
Member
 
Registered: Mar 2005
Posts: 117

Rep: Reputation: 15
duh!!!

Quote:
Originally posted by linmix
"defaults" will do if you only want to be able to 'see' the partition. umask=000 sets file and folder permissions to 777 (umask numbers are the inverse of permission numbers)
lol

now how was i supposed to figure that umask option out???
Did you really figure that out all by yourself?? or did someone tell you? = ]

but thank you for the Best Explanation i've come across yet.

but actually, after letting your explanation soak in, ive realized its all about the "umask" option.

"gid=100,umask=003,exec,dev,suid,rw"
works just as well.
The Owner (has read/Write),
and everyone in the 100 group has read/Write as well.
Everyone else, gets Read only.

You see? Quite Simple.

Thank You for Enlightening me.
 
  


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
can mount C not D FAT: invalid media value (0x45) mount: wrong fs type, bad option Emmanuel_uk Linux - Newbie 10 11-29-2005 02:47 AM
windows share automatically mount on linux box emailssent Linux - Networking 11 11-01-2004 03:02 AM
how do i automatically mount partitions when system starts coolinuxguy246 Linux - Newbie 3 04-25-2004 09:38 AM
Can we mount linux /fat 32 onto solaris juby Solaris / OpenSolaris 3 02-05-2004 08:43 AM
Mount a FAT HD onto linux. piglingz Linux - Hardware 2 02-13-2003 09:27 PM

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

All times are GMT -5. The time now is 06:08 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration