Mount Usage


Table of Contents

how to mount a writable dos drive 
how to mount a writable dos drive 
how to mount a writable dos drive 
How to mounting the DOS file system 
Mount FAT32 vol in read/write for non-root users? 
ISO Extraction 

how to mount a writable dos drive 

Newsgroups: comp.os.linux.setup
:i used the command:
:
:mount -t vfat -o rw /dev/hda1 /mnt
:
:to mount my C: drive to linux, and was able to read it.
:
:The "mount" command gives me:
:
:/dev/hda1 on /mnt type vfat (rw)
:
:But the problem is that I can't write to it (permision denied). Why? How
:to solve? thanks

See `man 8 mount` and pay particular attention to the UID, GID, and UMASK options. The vfat file system doesn't have the notion of ownership, or UNIX-style permissions, so the kernel has to fake something based on who issued the 'mount' command and the options used.

Bob Nichols

how to mount a writable dos drive 

supply a umask, that should solve your problem read man mount for more detailed info

mount -t vfat -o rw,umask=0007 /dev/hda1 /mnt/C

BTW. I'd advise you to use a directory inside mnt to mount to. so mkdir /mnt/C. This way you can mount multiple filesystems in an standard way (/mnt/floppy, /mnt/cdrom, /mnt/C etc)

Eric

how to mount a writable dos drive 

Good advice.

Also check /var/log/dmesg and verify that your dos drive is being correctly detected. I have a 20GB IDE LBA Maxtor HDD that shows up as an 8GB drive in dmesg, although cylinders, heads and sectors are displayed correctly (2489/255/63). I think this may be due to how Linux is calculating capacity - and treating it as a 'LARGE' IDE drive instead of 'LBA'? Is this a sign that Linux isn't mounting/reading the drive correctly?

Also check /var/log/messages to make sure that there isn't some kernel error that puts the FS back into read-only mode! I am running samba 2.0.3 under redhat 6.0. Whenever use the drive for a few hours, the drive switches to read-only mode and I see the following errors in /var/log/messages.

Arnim

documented on: 2000.05.25