LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-26-2003, 04:22 PM   #1
CletusJones
Member
 
Registered: Oct 2003
Location: Chicago
Distribution: debian, ubuntu
Posts: 48

Rep: Reputation: 15
Mount fat32 partition?


Okay, I did a search of the forum and couldn't find anything to help me out...

I'm trying to edit my fstab file so that it'll automount a fat32 partition on my other hdd without any luck.

I'm trying to mount a partition that would be hda2 (linux runs on hdb) and i'm getting an invalid mount point error. Any suggestions?

I can post the fstab file and error messages if necessary.

Thanks!
 
Old 12-26-2003, 04:26 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
The mount command should be
mount -t vfat /dev/hdb /mnt/win
where /mnt/win is an empty directory. /etc/fstab line would be
/dev/hda2 /mnt/win vfat defaults 0 0
 
Old 12-26-2003, 05:33 PM   #3
dibblethewrecke
Member
 
Registered: Nov 2003
Location: UK
Distribution: Arch Linux
Posts: 210

Rep: Reputation: 30
Wink

I'm actually using vector but i have what look like a few weird directories in my /mnt - i've got win, linux and a few others, would these be left over from the "compilation" of my vector ISO? Their not refered to in fstab so is it safe to delete them?

also my terminal says my slocate dbase needs updating and shows me files that don't exist in my hard disk, in /mnt/win for example...

oh, and another thing, i added user in the fstab entry for my windows partitions but i can't get into them as a regular user. should i be able to? or do i need to change the permissions....ah, hang on a sec, i created the directories as root, that'd stop me looking at them, right? bloody complicated business this! hang on i have to create the directories as root - so i have to set permissions for them?

ok. i don't get this at all. i've seen how i can use chmod and chown but i don't actually know what i should change the permissions to - should i have the same permissions as i do for the floppy and cdrom? i tried to use chown to change the owner to user but it said operation not permitted

i want my mp3s!

Last edited by dibblethewrecke; 12-26-2003 at 07:48 PM.
 
Old 12-26-2003, 11:28 PM   #4
Skyline
Senior Member
 
Registered: Jun 2003
Distribution: Debian/other
Posts: 2,104

Rep: Reputation: 45
Quote:
oh, and another thing, i added user in the fstab entry for my windows partitions but i can't get into them as a regular user. should i be able to? or do i need to change the permissions....ah, hang on a sec, i created the directories as root, that'd stop me looking at them, right? bloody complicated business this! hang on i have to create the directories as root - so i have to set permissions for them?
For FAT32 make sure you've got

umask=000

as one of the options in the relevant entry in the 4th field of /etc/fstab

For NTFS make sure youve got

umask=0222

as one of the options in the relevant entry in the 4th field of /etc/fstab

Last edited by Skyline; 12-26-2003 at 11:32 PM.
 
Old 12-27-2003, 03:16 AM   #5
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
You can use any of the existing unused mount points to mount the FAT partition. Or make a new mount point:
mkdir /mnt/newmountpoint
then try
mount /dev/hda2 /mnt/newmountpoint
to see if it works, then edit fstab accordingly. The thing is that you can't mount to a mount point hat doesn't exist.
About slocate, do
slocate -u
to 'update' the database. This will create data base that includes everything currently mounted. If you want to exclude a directory then do this:
slocate -u -e /somedir
 
Old 12-27-2003, 05:27 AM   #6
dibblethewrecke
Member
 
Registered: Nov 2003
Location: UK
Distribution: Arch Linux
Posts: 210

Rep: Reputation: 30
slocate -u and umask=000 both worked a treat, cheers for that.

What's the umask all about? I had a howto on mounting and it didn't mention it at all, glad i didn't mess around with the permission, thought i was something in fstab...

found a bit about it. it's about setting default file permissions when the files are mounted? i only found instructions for using it on the command line tho.

Last edited by dibblethewrecke; 12-27-2003 at 05:31 AM.
 
Old 12-27-2003, 09:04 AM   #7
CletusJones
Member
 
Registered: Oct 2003
Location: Chicago
Distribution: debian, ubuntu
Posts: 48

Original Poster
Rep: Reputation: 15
Thanks guys! All seems to be well.

I've learned more in the past 2 days (between reading online and in books) with slack, than i did in 6 months with RH.
 
Old 12-27-2003, 02:10 PM   #8
CletusJones
Member
 
Registered: Oct 2003
Location: Chicago
Distribution: debian, ubuntu
Posts: 48

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by Skyline
For FAT32 make sure you've got

umask=000

as one of the options in the relevant entry in the 4th field of /etc/fstab

For NTFS make sure youve got

umask=0222

as one of the options in the relevant entry in the 4th field of /etc/fstab
So, using this umask=000 command in my fstab file so that other users can access the mounted vfat partition, the whole line would look like this, correct?

/dev/hda2 /mnt/win vfat umask=000 0 0

or did I add that statement in the wrong order?

thanks again...
 
Old 12-27-2003, 02:20 PM   #9
jsmarshall85
Member
 
Registered: Aug 2003
Posts: 386

Rep: Reputation: 30
i have the same setup, win xp on hda and slack on hdb. here is what is in my fstab to mount my fat32 partition hda5

/dev/hda5 /share vfat noauto,user,rw 1 0

with that i also logged in as root and changed the permissions for the /share directory to 777 and changed the owner and group to my username and the group to users (they are defaulted to root, root)

hope that helps
 
Old 12-27-2003, 06:30 PM   #10
Skyline
Senior Member
 
Registered: Jun 2003
Distribution: Debian/other
Posts: 2,104

Rep: Reputation: 45
Quote:
So, using this umask=000 command in my fstab file so that other users can access the mounted vfat partition, the whole line would look like this, correct?

/dev/hda2 /mnt/win vfat umask=000 0 0
also add

defaults

as another option in the 4th field - ie

/dev/hda2 /mnt/win vfat umask=000,defaults 0 0
 
Old 12-28-2003, 01:49 PM   #11
CletusJones
Member
 
Registered: Oct 2003
Location: Chicago
Distribution: debian, ubuntu
Posts: 48

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by Skyline
also add

defaults

as another option in the 4th field - ie

/dev/hda2 /mnt/win vfat umask=000,defaults 0 0
I'll give it a try, thanks!

what do the last two numbers mean? (the 0 0 at the end) I noticed that i've got a few entries in there that have 1 0 instead....
 
Old 12-28-2003, 03:05 PM   #12
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Fifth field in /etc/fstab is used by dump (not many people use it now), sixth by fsck during boot - 0 means the filesystem is not checked, value different from 0 tells when it will be checked (order).
 
Old 12-28-2003, 03:48 PM   #13
CletusJones
Member
 
Registered: Oct 2003
Location: Chicago
Distribution: debian, ubuntu
Posts: 48

Original Poster
Rep: Reputation: 15
cool, thanks for the info. I must say that everyone here has been very helpful! thanks again everyone.
 
Old 12-28-2003, 06:29 PM   #14
thegeekster
Member
 
Registered: Dec 2003
Location: USA (Pacific coast)
Distribution: Vector 5.8-SOHO, FreeBSD 6.2
Posts: 513

Rep: Reputation: 34
A note about the umask option

Setting a umask=000 on a vfat partition will effectively allow anyone to do anything to that partition. When mounting vfat from /etc/fstab, the owner and group for it is root (for both). If you have users that you may want to restrict to say reading files and subdirectories only and restrict write permissions, you can mount the vfat for a particular group id (gid= ) and set the umask to read 'umask=002'.

For example, if you want to allow the wheel group full permissions and restrict the normal user group to read only, find the group id number for the wheel group in /etc/group (in my slack box it is 10) and add something like this line in /etc/fstab:

/dev/hda1 /mnt/win vfat defaults,umask=002,gid=10 0 0

This will set the owner to root and the group to wheel with full permissions to both, and only allow the others' permission read and execute, like so:

drwxrwxr-x root wheel

Just be sure to replace the correct values for your partition, mount point and group id you want to use.

I do this as a security precaution in case of a compromised OS. My login id also belongs to the wheel group (to allow su'ing if needed) as well as belonging the regular user group (which can't su to root). Maybe a bit paranoid, but I see it as better safe than sorry.
 
Old 12-28-2003, 06:46 PM   #15
CletusJones
Member
 
Registered: Oct 2003
Location: Chicago
Distribution: debian, ubuntu
Posts: 48

Original Poster
Rep: Reputation: 15
Re: A note about the umask option

Quote:
Originally posted by thegeekster
Setting a umask=000 on a vfat partition will effectively allow anyone to do anything to that partition. When mounting vfat from /etc/fstab, the owner and group for it is root (for both). If you have users that you may want to restrict to say reading files and subdirectories only and restrict write permissions, you can mount the vfat for a particular group id (gid= ) and set the umask to read 'umask=002'.
I don't have any users except myself, but I could see where this could come in handy in a multi-user environment.

Quote:
Originally posted by thegeekster
I do this as a security precaution in case of a compromised OS. My login id also belongs to the wheel group (to allow su'ing if needed) as well as belonging the regular user group (which can't su to root). Maybe a bit paranoid, but I see it as better safe than sorry. [/B]
Compromised OS? I don't see that as being a huge problem, and if my pc is compromised, there's really nothing on it that would be of value to anyone. Besides, ATM, I'm connected to the web via dialup and when I move (in just about 4 months) I'll be behind a cisco pix firewall... I think I'll be pretty safe.
 
  


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
Can't mount FAT32 partition EcceVery Debian 5 09-13-2004 05:53 AM
How to mount a new fat32 partition IceOnly Linux - Software 2 06-11-2003 01:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:38 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