Bug 152513

Summary: usb flash drive can hotplug only once a session
Product: [Fedora] Fedora Reporter: Leslie Katz <lesliek>
Component: halAssignee: David Zeuthen <davidz>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3CC: mclasen
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-03-31 15:04:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Leslie Katz 2005-03-29 22:30:03 UTC
Description of problem: As per summary, if I hotplug usb flash drive, then 
unmount and unplug it, then attempt to hotplug it again before reboot, no icon 
for it re-appears, whether in the "Computer" window or on the desktop.


Version-Release number of selected component (if applicable): I've chosen hal 
as the relevant component at the suggestion of Bill Nottingham: see his most 
recent comment in Bug 119140, in response to mine. I have just installed FC3 
and have not yet had the chance of updating anything, so that the version of 
hal I have is the one which was included in the distribution of FC3 using the 
Linux kernel 2.6.9_1.667.


How reproducible: easily; it happens each time I try to hotplug the drive a 
second time before rebooting.


Steps to Reproduce:
1. unmount previously hotplugged usb flash drive;
2. unplug it;
3. plug it in again before rebooting
  
Actual results: no icon for drive appears, whether in "Computer" window or on 
desktop


Expected results: automatic remounting on second and subsequent attempts to 
hotplug before reboot


Additional info: My ignorance of Linux is effectively total. I found bug 119140 
and hoped that it would provide the solution to my problem. However, Bill 
Nottingham pointed out to me that that bug fix related to FC2, not FC3. I have 
googled for a possible solution and posted in a fedora forum, both without 
success. If I should be providing more information, I will, of course, happily 
attempt to provide it on request, within the (unfortunately substantial) limits 
of my competence.

Comment 1 David Zeuthen 2005-03-29 22:43:22 UTC
OK, I need some information

1. Reboot your box without the USB key
2. Take a look at /etc/fstab
3. Plug in the USB key
4. Take a look at /etc/fstab - a new entry should have appeared, did it?
5. Unmount the USB key (e.g. unmount /dev/sda1 or what /dev-file is mentioned in
the new entry in step 4.)
6. Pull out the USB key - the entry from point 4. should disappear, did it?

Repeat steps 3.-6. a few times.


Comment 2 Leslie Katz 2005-03-30 02:22:42 UTC
(In reply to comment #1)
> OK, I need some information
> 1. Reboot your box without the USB key

I did that (a cold boot).

> 2. Take a look at /etc/fstab

I did that. There was no entry for /dev/sda1. I then closed /etc/fstab.

> 3. Plug in the USB key

I did that.

> 4. Take a look at /etc/fstab - a new entry should have appeared, did it?

I opened /etc/fstab and found a new entry, one for /dev/sda1. I then 
closed /etc/fstab. For completeness, I mention that the entry I found was as 
follows: /dev/sda1 /media/usbdisk vfat 
pamconsole,noatime,sync,exec,noauto,managed 0 0.

> 5. Unmount the USB key (e.g. unmount /dev/sda1 or what /dev-file is 
mentioned in
> the new entry in step 4.)

I did that (using mouse clicks, not the command line). I then 
opened /etc/fstab. The entry for /dev/sda1 was still present. I then 
closed /etc/fstab.

> 6. Pull out the USB key - the entry from point 4. should disappear, did it?

I pulled out the usb key. I opened /etc/fstab. The /dev/sda1 entry had 
disappeared. I closed /etc/fstab.

> Repeat steps 3.-6. a few times.

When I tried to repeat steps 3-6 a few times, I couldn't. After plugging in 
the key on each occasion, I opened /etc/fstab, but there was no entry in it 
for /dev/sda1. Nor did any iconic representation of the flash drive appear, 
either on the desktop or in the "Computer" window.

I suppose the only thing I'd add is that the plugging in and unplugging of the 
key during my attempted repeats did have some effect, in that on each occasion 
the hard disk immediately whirred noticeably for a short time. 



Comment 3 David Zeuthen 2005-03-30 02:29:14 UTC
After pulling out the USB key (after step 6), what is the output of 'ps aux|grep
hald'?

Comment 4 Leslie Katz 2005-03-30 02:50:26 UTC
(In reply to comment #3)
> After pulling out the USB key (after step 6), what is the output of 'ps 
aux|grep
> hald'?

I get two lines, each of which begins with "root" and ends with "hald". I say 
that only because I doubt that I can set the lines out as they're formatted on 
the screen. Here they are:

root 2218 0.3 1.4 6412 3800 ? Ss 12:40 0:00 hald
root 3264 0.0 0.2 4932 660 pts/1 S+ 12:44 0:00 grep hald


Comment 5 David Zeuthen 2005-03-30 02:54:49 UTC
OK, could you try applying at least the hal and udev updates from FC3 and test
again?

Thanks,
David

Comment 6 Leslie Katz 2005-03-30 03:51:08 UTC
(In reply to comment #5)
> OK, could you try applying at least the hal and udev updates from FC3 and 
test
> again?
> Thanks,
> David

I've run into a problem.

I went to a Fedora download site and was told the latest udev and hal were as 
follows:

hal-0.4.7-1.FC3.i386.rpm
udev-039-10.FC3.7.i386.rpm

I already had that version of udev, because I'd downloaded and installed it in 
the last day or two while still trying on my own to see if there was a 
solution to my problem.

However, I did not have that hal. I therefore downloaded it to the computer 
I'm using right now, copied it to my wretched flash drive and then copied it 
from the flash drive to the computer running FC3. (That's how I had dealt with 
the udev update too.)

I then tried to install the newest hal, but have just got this message:

Package not found
The following package could not be found on your system. Installation cannot 
continue until it is installed.
Unlocatable package Required by
kernel              ('hal', '0.4.7', '1.FC3')

I'm now very much out of my depth. I'm not sure that I understand precisely 
what it is I'm said to be lacking, how to get it and what unintended adverse 
consequences might flow from my installing it.

I know that it's no part of your role to be spoonfeeding someone like me, but 
rather to deal with knowledgeable users who are reporting genuine bugs. If, in 
the circumstances, you think it best not to pursue this problem of mine any 
further, I'll understand perfectly. Thank you in any event for the trouble 
you've already taken.


Comment 7 David Zeuthen 2005-03-30 15:36:56 UTC
Doing 'yum update hal udev' should do the trick. Try googling for it.

Comment 8 Leslie Katz 2005-03-31 09:36:31 UTC
(In reply to comment #7)
> Doing 'yum update hal udev' should do the trick. Try googling for it.

This reply will consist effectively of apologies.

First, I apologise for not having responded sooner. I have, however, been able 
now to get yum working using Australian mirrors and to download and install via
(the latest version of) yum the latest versions of hal and udev (as well as 
the latest version of the kernel, which I needed to be able to download and 
install the latest version of hal).

Secondly, after the installation of those updates, I can now repeat your steps 
3-6 a number of times, with the results being the expected ones on each 
occasion. I apologise for having troubled you with my flashdrive problem 
before installing those updates. I obviously made the wrong choice about what 
problem to try to tackle first.

Thank you again for dealing with my already-fixed bug.

Comment 9 David Zeuthen 2005-03-31 15:04:23 UTC
Oh, OK, good to hear it's working as intended.

Thanks,
David