Red Hat Bugzilla – Bug 155351
Cannot automatically mount a flash drive that is DOS formatted
Last modified: 2007-11-30 17:11:04 EST
Description of problem:
Even though hotplug recognizes my flash drive and inserts an entry into
/etc/fstab for it, I am unable to mount it without manually editting the fstab
entry. The 'managed' keyword is not recognized by the DOS filesystem, and so it
fails to mount.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Plug in flash drive
2. Verify /etc/fstab entry:
/dev/sda /media/FLASH vfat
user,exec,noauto,iocharset=utf8,noatime,sync,managed 0 0
3. Attempt to mount
$ mount /media/FLASH/
mount: wrong fs type, bad option, bad superblock on /dev/sda,
or too many mounted file systems
4. Check dmseg
FAT: Unrecognized mount option "managed" or missing value
Unable to mount drive
Able to mount
I have gotten this to work by modifying the dos filesystem - I think modified
the fat_tokens entries in fs/fat/inode.c to include "managed", and then stuck a
check for it in the case statement in parse_options() just below, but it's been
a while, so I can't remember for certain. Perhaps there's a simpler method to
fix this though.
I'm puzzled why you added that to your fstab if it works without it ?
I didn't - hotplug does. And it puts the managed entry in so it knows to pull
it out of fstab when the device is removed.
mount is broken.
It should be stripping out 'managed' before it even gets passed to the kernel.
You need a sufficiently new version of util-linux for this; 2.12a-16 (as shipped
with FC3) or later is known to work.