Bug 155351 - Cannot automatically mount a flash drive that is DOS formatted
Cannot automatically mount a flash drive that is DOS formatted
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: util-linux (Show other bugs)
3
All Linux
medium Severity medium
: ---
: ---
Assigned To: Karel Zak
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-04-19 09:55 EDT by AJ Lewis
Modified: 2007-11-30 17:11 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-04-25 06:12:51 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description AJ Lewis 2005-04-19 09:55:34 EDT
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):
kernel 2.6.10-1.770_FC3smp

How reproducible:
Every time

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
  
Actual results:
Unable to mount drive

Expected results:
Able to mount

Additional info:
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.
Comment 1 Dave Jones 2005-04-19 20:59:22 EDT
I'm puzzled why you added that to your fstab if it works without it ?
Comment 2 AJ Lewis 2005-04-20 10:11:12 EDT
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.
Comment 3 Dave Jones 2005-04-20 15:24:58 EDT
mount is broken.
It should be stripping out 'managed' before it even gets passed to the kernel.
Comment 4 David Zeuthen 2005-04-20 15:37:20 EDT
You need a sufficiently new version of util-linux for this; 2.12a-16 (as shipped
with FC3) or later is known to work.

Note You need to log in before you can comment on or make changes to this bug.