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! |
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 |
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! |
Quote:
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 |
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 |
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...:D 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. |
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. :D |
Quote:
/dev/hda2 /mnt/win vfat umask=000 0 0 or did I add that statement in the wrong order? thanks again... |
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 |
Quote:
defaults as another option in the 4th field - ie /dev/hda2 /mnt/win vfat umask=000,defaults 0 0 |
Quote:
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.... |
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).
|
cool, thanks for the info. I must say that everyone here has been very helpful! thanks again everyone. :D
|
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. :) |
Re: A note about the umask option
Quote:
Quote:
|
All times are GMT -5. The time now is 05:28 AM. |