Bug 138301 - Hal fails to mount USB Flash Disc
Hal fails to mount USB Flash Disc
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: hal (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: David Zeuthen
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-11-07 15:57 EST by Douglas Furlong
Modified: 2013-03-05 22:42 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-11-08 14:37:55 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
/etc/fstab as requested. (1.25 KB, text/plain)
2004-11-08 14:18 EST, Douglas Furlong
no flags Details

  None (edit)
Description Douglas Furlong 2004-11-07 15:57:57 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3)
Gecko/20040913 Firefox/0.10.1

Description of problem:
I have a USB flash disc that fails to be mounted when it is plugged in
to the PC.

Below is the information that HAL picks up about the device.

----------------------------------------------------
udi = '/org/freedesktop/Hal/devices/block_4183-9C1C'
  volume.mount_point = ''  (string)
  volume.policy.mount_option.noatime = true  (bool)
  volume.policy.mount_option.sync = true  (bool)
  volume.policy.mount_option.fscontext=system_u:object_r:removable_t =
true  (bool)
  volume.policy.desired_mount_point = 'SILVERSTICK'  (string)
  volume.policy.mount_filesystem = 'vfat'  (string)
  volume.policy.should_mount = true  (bool)
  info.udi = '/org/freedesktop/Hal/devices/block_4183-9C1C'  (string)
  volume.partition.msdos_part_table_type = 11  (0xb)  (int)
  volume.size = 261632000  (0xf983000)  (uint64)
  volume.block_size = 512  (0x200)  (int)
  volume.num_blocks = 511000  (0x7cc18)  (int)
  volume.partition.number = 1  (0x1)  (int)
  volume.is_partition = true  (bool)
  volume.is_mounted = false  (bool)
  volume.is_disc = false  (bool)
  volume.uuid = '4183-9C1C'  (string)
  volume.label = 'SILVERSTICK'  (string)
  volume.fsversion = 'FAT16'  (string)
  volume.fsusage = 'filesystem'  (string)
  volume.fstype = 'vfat'  (string)
  info.product = 'SILVERSTICK'  (string)
  block.storage_device = '/org/freedesktop/Hal/devices/block_8_0'
(string)
  block.minor = 1  (0x1)  (int)
  block.major = 8  (0x8)  (int)
  info.capabilities = 'block volume'  (string)
  info.category = 'volume'  (string)
  info.parent = '/org/freedesktop/Hal/devices/block_8_0'  (string)
  block.device = '/dev/sda1'  (string)
  block.is_volume = true  (bool)
  block.have_scanned = false  (bool)
  block.no_partitions = false  (bool)
  linux.sysfs_path_device = '/sys/block/sda/sda1'  (string)
  linux.sysfs_path = '/sys/block/sda/sda1'  (string)
  info.bus = 'block'  (string)
-------------------------------------
The only bit that I can see from here that looks questionable is the
below.
  volume.mount_point = ''  (string)

I have tried using fstab-sync to add the UDI manually, but I get this
error message

fstab-sync -v --
add='/org/freedesktop/Hal/devices/block_4183-9C1C'
6799: mount_root='/media'
6799: use_managed=1
6799: managed primary='managed'
6799: managed secondary='kudzu'
6799: Line ended prematurely
6799: Could not parse data from '/etc/fstab'

This is my fstab.
cat /etc/fstab 
# This file is edited by fstab-sync - see 'man fstab-sync' for details
/dev/VolGroup00/LogVol00 /                       ext3    defaults
1 1
LABEL=/boot             /boot                   ext3    defaults
1 2
none                    /dev/pts                devpts  gid=5,mode=620
0 0
none                    /dev/shm                tmpfs   defaults
0 0
none                    /proc                   proc    defaults
0 0
none                    /sys                    sysfs   defaults
0 0
/dev/VolGroup00/LogVol01 swap                    swap    defaults
0 0
/dev/VolGroup00/Movies  /media/Movies           ext3    rw,acl
1 2
/dev/VolGroup00/TV_Episodes     /media/TV_Episodes      ext3    rw,acl
1 2
/dev/VolGroup00/Music   /media/Music            ext3    rw,acl
1 2
/dev/VolGroup00/Music   /media/Software         ext3    rw,acl
1 2

# NFS Shares
corrig:/home            /home                   nfs
/dev/scd0               /media/cdrecorder       auto
pamconsole,fscontext=system_u:object_r:removable_t,ro,exec,noauto,managed
0 0
/dev/hdc                /media/cdrom            auto
pamconsole,fscontext=system_u:object_r:removable_t,ro,exec,noauto,managed
0 0
/dev/fd0                /media/floppy           auto
pamconsole,fscontext=system_u:object_r:removable_t,exec,noauto,managed 0
0

Please let me know if I can do any thing to help trouble shoot this.

Version-Release number of selected component (if applicable):
hal-0.4.0-10

How reproducible:
Always

Steps to Reproduce:
1. Plug in USB Flash Drive
2. Wait for it to be mounted.
3. watch it not get mounted.
    

Actual Results:  Device is not mounted.

Expected Results:  Device is mounted

Additional info:
Comment 1 David Zeuthen 2004-11-08 14:09:02 EST
Hi - please attach the copy of your /etc/fstab file as an attachment.

Thanks,
David
Comment 2 Douglas Furlong 2004-11-08 14:18:14 EST
Created attachment 106297 [details]
/etc/fstab as requested.
Comment 3 David Zeuthen 2004-11-08 14:22:36 EST
Your /etc/fstab file seems to have a syntax error in it; that's why
fstab-sync refuses to modify it. Line 15, this one:

corrig:/home            /home                   nfs

is missing fs_mntops, fs_freq and fs_passno. Does it work if you
correct this error?

Thanks,
David
Comment 4 Douglas Furlong 2004-11-08 14:27:30 EST
Hi David,

I have not corrected the error, but I did remove the trailing tab
after nfs, which has resolved the problem, so even though I am still
missing those settings it is now working.

I assume the mount works fine because NFS has a set of defaults that
it uses.

It doesn't seem right that fstab-sync has a problem due to a trailing
TAB though does it?
Comment 5 David Zeuthen 2004-11-08 14:37:55 EST
Hi Douglas,

Well, according to the man page of fstab (in section five of the man
pages) you do need all six fields (without trailing tabs); I'm not
sure why fstab-sync accepts lines with only 4 fields; that may be a
minor bug. Anyway, since correcting this made it work I'm going to
close this as NOTABUG.

Btw, I think it's OK for fstab-sync to be paranoid about the file
format; we don't really want to corrupt the /etc/fstab file as it can
render the system unbootable.

Thanks,
David
Comment 6 Douglas Furlong 2004-11-08 14:42:20 EST
I agree about being paranoid with regards to fstab sync.

Do you not think it may be an idea to have a "sub" fstab where things
like removable media mount points are stored?

On a slightly seporate note, that has little to do with this bug, I
guess...
When I plugged in the device there was no information pumped to the
screen or to the usual log files saying there was a problem with the
fstab or any thing along those lines.

Would it not be possible for some thing to be logged in these sorts of
situations?

Just some thing for future thought as I doubt it would be easy to
implement.

Feel free to close this, and if there is an option for PEBKAC then be
my guest to file it under that :)

Thanks for your quick response.
Comment 7 David Zeuthen 2004-11-08 14:54:25 EST
> I agree about being paranoid with regards to fstab sync.
> 
> Do you not think it may be an idea to have a "sub" fstab where things
> like removable media mount points are stored?

Yeah, that might make sense; however, many things depend on the
/etc/fstab file to show the available filesystems - such as desktop
environments like GNOME, KDE and possibly also file managers, toolkits
and other abstractions (such as Java, OpenOffice.org, Mozilla, Wine
etc.). 

Ideally I want to not modify the /etc/fstab file at all but rather
integration hal support into e.g. gnome-vfs, KDE's kio stuff and so on
(that software would speak directly to the hal daemon). That would
also make a ton of sense taking stateless linux into account (e.g.
read-only /etc).

> On a slightly seporate note, that has little to do with this bug,
> I guess...
> When I plugged in the device there was no information pumped to the
> screen or to the usual log files saying there was a problem with the
> fstab or any thing along those lines.
>
> Would it not be possible for some thing to be logged in these sorts
> of situations?

This should have been logged to the syslog, I agree with that.

Cheers,
David

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