Bug 120486 - (PCMCIA IDE) /sbin/ide_info not installed (required by /etc/pcmcia/ide)
Summary: (PCMCIA IDE) /sbin/ide_info not installed (required by /etc/pcmcia/ide)
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: pcmcia-cs
Version: 4
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Pete Zaitcev
QA Contact:
URL:
Whiteboard:
: 123376 135240 160604 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-04-09 09:48 UTC by Michael Opdenacker
Modified: 2007-11-30 22:10 UTC (History)
15 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-01-03 14:52:08 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
/etc/pcmcia/ide with ide_info replaced by hdparm and sed (1.92 KB, text/plain)
2004-08-09 04:42 UTC, Paul Dickson
no flags Details
Candidate #1 (543 bytes, patch)
2005-05-14 06:50 UTC, Pete Zaitcev
no flags Details | Diff
Candidate #2 - throw it all away (2.12 KB, patch)
2005-05-16 19:56 UTC, Pete Zaitcev
no flags Details | Diff

Description Michael Opdenacker 2004-04-09 09:48:09 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040312

Description of problem:
Hello,

When I insert my pcmcia cf card adapter, I get the below warning
in /var/log/messages:

Apr  9 10:58:40 localhost cardmgr[1745]: socket 0: ATA/IDE Fixed Disk
Apr  9 10:58:42 localhost kernel: hde: SAMSUNG CF/ATA, CFA DISK drive
Apr  9 10:58:42 localhost kernel: ide2 at 0x100-0x107,0x10e on irq 5
Apr  9 10:58:43 localhost kernel: hde: max request size: 128KiB
Apr  9 10:58:43 localhost kernel: hde: 253952 sectors (130 MB) w/1KiB
Cache, CHS =496/16/32
Apr  9 10:58:43 localhost udev[3193]: creating device node '/udev/hde'
Apr  9 10:58:43 localhost kernel:  hde: hde1 < hde5 >
Apr  9 10:58:43 localhost udev[3202]: creating device node '/udev/hde1'
Apr  9 10:58:43 localhost udev[3211]: creating device node '/udev/hde5'
Apr  9 10:58:43 localhost kernel: Module ide_cs cannot be unloaded due
to unsafe  usage in include/linux/module.h:516
Apr  9 10:58:43 localhost kernel: ide-cs: hde: Vcc = 3.3, Vpp = 0.0
Apr  9 10:58:43 localhost cardmgr[1745]: executing: './ide start hde 2>&1'
Apr  9 10:58:43 localhost cardmgr[1745]: + ./ide: line 1:
/sbin/ide_info: No suc h file or directory

This is true: /sbin/ide_info doesn't exist, while it was available
in FC1 in the kernel-pcmcia-cs package.

This is not blocking, as I can still mount my CF card afterwards.

However, as the /etc/pcmcia/ide script requires /sbin/ide_info,
it should be available (or /etc/pcmcia/ide should be modified).

Thanks for everything.

Cheers,

Michael.


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


How reproducible:
Always

Steps to Reproduce:
1. Insert a pcmcia storage card (or pcmcia/cf adaptor)
2. or look at the /etc/pcmcia/ide script
    

Additional info:

Comment 1 Michael Opdenacker 2004-04-28 15:10:31 UTC
Hello,

Just to confirm that this issue is still there in FC2 T3.

Cheers,

Michael.

Comment 2 Michael Opdenacker 2004-04-28 15:11:05 UTC
Changing version to test3

Comment 3 Alan Cox 2004-05-03 12:30:45 UTC
Looks like it just needs adding to the spec file. PCMCIA uses it to
try and do smart stuff about what and where to mount disks.


Comment 4 Michael Opdenacker 2004-05-11 08:25:42 UTC
/sbin/ide_info is still missing on May 10, after installing all
available updates, while /etc/pcmcia/ide still requires this
script.

Forget me not...

;-)

Michael.

Comment 5 Philip Balister 2004-05-12 12:33:44 UTC
Nag, Nag, Nag.

I was about to bugzilla this too, fortunately it was easy to find this
report.

Philip

Comment 6 Michael Opdenacker 2004-05-25 08:31:31 UTC
Hello,

This bug is still there in FC2 final.
Don't forget...

:-)

Michael.

Comment 7 John Marshall 2004-07-14 13:27:24 UTC
Still present in FC3 test 1.

/sbin/ide_info is in fact explicitly removed by the spec file, which 
says "scsi_info and ide_info are obsoleted by hdparm".

Seems to me that either this needs rethinking, or

1. /etc/pcmcia/ide needs to use hdparm instead of ide_info
2. the pcmcia-cs pkg needs to get a dependency on the hdparm pkg
3. possibly hdparm needs a new option to output the needed
   information in an easily digestible format.

Comment 8 Paul Dickson 2004-08-09 04:42:33 UTC
Created attachment 102508 [details]
/etc/pcmcia/ide with ide_info replaced by hdparm and sed

This is a possible example of using sed and hdparm instead of the missing
ide_info  command.  It could be formatted better, but it works.

Comment 9 Bill Nottingham 2004-09-08 06:54:26 UTC
Well....

Removable device configuration in all honesty shouldn't be being done
in the PCMCIA scripts anyway - this should be done in udev, g-v-m, etc.

Comment 10 Bill Nottingham 2004-09-08 06:55:20 UTC
*** Bug 123376 has been marked as a duplicate of this bug. ***

Comment 11 Bill Nottingham 2004-10-11 15:24:47 UTC
*** Bug 135240 has been marked as a duplicate of this bug. ***

Comment 12 Charles R. Anderson 2004-11-05 00:49:42 UTC
Problem still exists in FC3rc5.  The fix mentioned in comment #8 works
great.  An icon appears on the desktop and the volume is mounted
automatically when a PCMCIA ATA flash card is inserted.


Comment 13 Bill Nottingham 2004-11-05 02:27:50 UTC
Mounting of disks should be done through hal and fstab-sync in FC3.

Comment 14 Pete Zaitcev 2005-05-14 06:48:43 UTC
Bill is right about mounting, but the bug is not about mounting.
The bug is about an error reported to /var/log/messages.
I propose we accept the first segment of the patch (well,
Paul forgot to make a patch, but it's no big deal).
I reject the updfstab bits because, in my testing, hal updates
fstab just fine. I am able to mount the device in in Nautilus.


Comment 15 Pete Zaitcev 2005-05-14 06:50:03 UTC
Created attachment 114377 [details]
Candidate #1

Comment 16 Bill Nottingham 2005-05-16 17:04:11 UTC
I suppose one question here is how much of /etc/pcmcia/ide functionality should
realistically be maintained; it a different scheme from the 'normal'
HAL/hotplug/udev framework.

Comment 17 Pete Zaitcev 2005-05-16 19:56:22 UTC
Created attachment 114439 [details]
Candidate #2 - throw it all away

Comment 18 Pete Zaitcev 2005-05-16 20:03:00 UTC
I don't care either way. I have verified that with the candidate patch #2
everything works, the volume can be mounted and umounted from Nautius,
"cardctl eject" works with unmounted and when mounted (in which case HAL
unmounts fine). It's a pity to throw away Paul's handiwork, but I need
to have Michael's complaint fixed.

[Some 2.6.11 kernels oops on eject, I have one with Bartolomej's fixes.
Please, do not attempt to mutate this bug into a kernel bug.]


Comment 19 Dan Williams 2005-06-18 01:22:02 UTC
*** Bug 152140 has been marked as a duplicate of this bug. ***

Comment 20 Paul Wouters (this account to be phased out) 2005-06-20 21:00:25 UTC
This bug is still present on FC4 (system upgraded from FC2->3->4

Comment 21 Eli 2005-08-01 23:47:59 UTC
An this bug is still present on FC3 fully updated via yum.  Furthermore, I 
can't even manually mount the device; it shows up, then I try to mount, and it 
disappears, with mount complaining  "mount: special device /dev/hde1 does not 
exist" 
 
 

Comment 22 Philip Balister 2005-08-02 00:11:06 UTC
I think an update must have broke mounting compact flash recently. I just
received the same error as comment #21 today. I have successfully used the
compact flash in the pcmcia slot until now with minimal hassle.

How about someone just fix the problem? This bug has turned into a sstanding joke.

Philip

Comment 23 Jarosław Wypychowski 2005-08-04 17:52:29 UTC
Some more funny info:
FC3 - fully updated
After inserting CF -> /sbin/ide_info missing.
Applied patch #1
After inserting CF -> no errors.
/media/idedisk added
#mount /media/idedisk
    mount: special device /dev/hde1 does not exist
#grep /dev/hde1 /etc/fstab
    /dev/hde1 /media/idedisk auto pamconsole,exec,noauto,noatime,sync,managed 0 0
changed fs type auto to vfat
#grep /dev/hde1 /etc/fstab
    /dev/hde1 /media/idedisk auto pamconsole,exec,noauto,noatime,sync,managed 0 0
and now mount /media/idedisk works !

Comment 24 Jarosław Wypychowski 2005-08-04 17:55:00 UTC
sorry for a typo - in the last comment at the last grep there should be of course:
#grep /dev/hde1 /etc/fstab
    /dev/hde1 /media/idedisk vfat pamconsole,exec,noauto,noatime,sync,managed 0 0

Comment 25 Kevin Wang 2005-08-14 07:45:04 UTC
I've looked into creating a /etc/hotplug/block.agent to auto-mount/unmount the
device as it's made available to the system.  However, there's a major problem
(FC3, full updates as of 2005/08/14).  Issuing a command like 'hdparm -i
/dev/hdc' or "mount /dev/hdc1 /mnt/cf" causes the block script to be rerun
(remove and then add events) for hdc1.  That's very bad, as it means that during
the "normal" use of a device, it's going to be loaded and unloaded dozens of
times.  

Now in theory, I might ignore hdc events that aren't preceeded by a pcmcia
insert, but that's awfully restrictive.  what about usb drives? (actually, I
think they show up as scsi), but there are other possibilities too.  firewire?
(hm, there is a ieee1394.agent already).

in any case, for now, hotplug just doesn't seem viable to me.

Comment 26 Kevin Wang 2005-08-14 07:51:41 UTC
(In reply to comment #25)
> I've looked into creating a /etc/hotplug/block.agent to auto-mount/unmount the
> device as it's made available to the system.  However, there's a major problem
> (FC3, full updates as of 2005/08/14).  Issuing a command like 'hdparm -i
> /dev/hdc' or "mount /dev/hdc1 /mnt/cf" causes the block script to be rerun
> (remove and then add events) for hdc1.  That's very bad, as it means that during
> the "normal" use of a device, it's going to be loaded and unloaded dozens of
> times.  
> 
> Now in theory, I might ignore hdc events that aren't preceeded by a pcmcia
> insert, but that's awfully restrictive.  what about usb drives? (actually, I
> think they show up as scsi), but there are other possibilities too.  firewire?
> (hm, there is a ieee1394.agent already).
> 
> in any case, for now, hotplug just doesn't seem viable to me.


correction. I'm seeing the same bug as mentioned in #21 "can't mount" and the
cause seems to be that hotplug is removing /dev/hdc1 when I try and mount it! 
that seems to be separate from this issue, and I will hunt around for that bug
and add to it instead of adding further to this bug.  I will revisit this when I
can once again mount my cf cards...

Comment 27 Kevin Wang 2005-08-14 18:35:48 UTC
so I think I've figured this out.

mkdir /var/log/hotplug
touch /var/log/hotplug/events
# make sure that hotplug.d/default/default.agent logs things to the above log file
mv /etc/hotplug/block.agent /etc/hotplug/block.agent.O
# turn off pcmcia ide script
mv /etc/pcmcia/ide /etc/pcmcia/ide.O
cat >/etc/pcmcia/ide <<'_EOF_'
#!/bin/sh
exit 0
_EOF_
chmod +x /etc/pcmcia/ide

cardctl eject

tail -f /var/log/hotplug/events&

cardctl insert


You should see in the log:
add for pcmcia
remove for module /module/ide_cs
remove for module drivers /bus/pcmcia/drivers/ide-cs
add for module /module/ide_cs
add for module drivers /bus/pcmcia/drivers/ide-cs
(pause as pcmcia scripts run)
add for ide
add for block (hdc)
add for block (hdc1)
remove for block (hdc1)
add for block (hdc1)

and I'm not trying to mount the drive or anything.  hotplug just seems to
excessively thrash on the adding and deleting of hdc1.  here's some more
strangeness:

# ls -al /dev/hdc1 ; mount -v /dev/hdc1 /mnt/cf ; ls -al /dev/hdc1
brw-rw----  1 root disk 22, 1 Aug 14 11:30 /dev/hdc1
mount: you didn't specify a filesystem type for /dev/hdc1
       I will try all types mentioned in /etc/filesystems or /proc/filesystems
Trying vfat
mount: special device /dev/hdc1 does not exist
ls: /dev/hdc1: No such file or directory

and simultaneously you will see a remove/add for hdc1 pair. so the act of
mounting causes a remove? That sure is strange.

however, mount specifying -t vfat seems to work, but only because it seems to
beat hotplug to the punch.  note that the trailing ls still fails to find the
device, because it's been removed by the same hotplug remove/add pair that you
saw above:

# ls -al /dev/hdc1 ; mount -v -t vfat /dev/hdc1 /mnt/cf ; ls -al /dev/hdc1
brw-rw----  1 root disk 22, 1 Aug 14 11:33 /dev/hdc1
/dev/hdc1 on /mnt/cf type vfat (rw)
ls: /dev/hdc1: No such file or directory

so I guess this is currently more of a hotplug bug?  can someone point me in the
right direction?

Comment 28 Kevin Wang 2005-08-14 19:31:06 UTC
found it. hotplug seems to be broken as of a recent fc3: bug # 130232

Comment 29 Eli 2005-10-29 16:08:51 UTC
This is still broken with a fully updated FC3 as of 2005-10-29.

*poke* *poke* :)

Comment 30 Pete Zaitcev 2005-10-29 18:41:37 UTC
Poke poke what, Eli? You didn't tell me if patch #2 suits you, so no action
could be taken.

Nothing was heard from Michael either.


Comment 31 Eli 2005-10-31 01:38:20 UTC
Pete, I missed that you needed that tested; sorry.

With patch #2:
insert CF card into PCMCIA slot, then
# mount /dev/hde1 /media/card
mount: special device /dev/hde1 does not exist
# tail /var/log/messages
Oct 30 19:37:17 pegasus last message repeated 2 times
Oct 30 19:38:26 pegasus cardmgr[2958]: socket 0: ATA/IDE Fixed Disk
Oct 30 19:38:26 pegasus kernel: hde: SanDisk SDCFB-128, CFA DISK drive
Oct 30 19:38:27 pegasus kernel: ide2 at 0x100-0x107,0x10e on irq 3
Oct 30 19:38:27 pegasus kernel: hde: max request size: 128KiB
Oct 30 19:38:27 pegasus kernel: hde: 250880 sectors (128 MB) w/1KiB Cache,
CHS=980/8/32
Oct 30 19:38:27 pegasus kernel: hde: cache flushes not supported
Oct 30 19:38:27 pegasus kernel:  hde: hde1
Oct 30 19:38:27 pegasus kernel: ide-cs: hde: Vcc = 3.3, Vpp = 0.0
Oct 30 19:38:39 pegasus kernel:  hde: hde1

However,
# mount -t vfat /dev/hde1 /media/card/
does work.. it also worked before the patched /etc/pcmcia/ide though...

What else do I need to check?

Thanks for looking at this.


Comment 32 Kevin Wang 2005-11-02 07:15:38 UTC
Eli - the mount issue is separate from this bug. it's a kernel/hotplug problem,
as described in bug # 130232

Comment 33 Andrew Meredith 2006-01-27 15:21:20 UTC
As of FC4 with pcmcia-cs-3.2.8-4.12 /etc/pcmcia/ide line 34

  eval `/sbin/ide_info /dev/$DEVICE` || usage

As /sbin/ide_info does not exist, ide exits ungracefully.

This means I cannot hotplug anything.

Should this bug report not be updated to FC4 and actioned ?


Comment 34 Pete Zaitcev 2006-01-27 17:27:05 UTC
Andrew, what do you mean by "cannot hotplug anything"? Please provide a more
substantial report with exact commands you typed and unedited messages
(please do not try to "save someone's time" by cutting, attach whole instead).

Hotplug works just fine for me. The legacy scripts are not used anymore.
In fact, FC5 will come out without pcmcia-cs at all.


Comment 35 Andrew Meredith 2006-01-27 18:02:44 UTC
I wasn't saving people's time. The script I cited, at the line given, has a
reference to a program that is no longer there. The program dies at that line.

I didn't go into specifics as what didn't hotplug, as nothing hotplugs. ie
anything mountable that I plug in to the PCMCIA slot, does not mount.

But then, as long as it works for you, I guess there isn't a problem.


Comment 36 John Thacker 2006-10-29 23:03:42 UTC
*** Bug 160604 has been marked as a duplicate of this bug. ***

Comment 37 John Thacker 2006-10-29 23:14:03 UTC
pcmcia-cs is obsolete and has been removed from Fedora Core.  It is not present
in FC5 or FC6, the only fully supported versions of Fedora Core.  (FC3 and FC4
are supported by Fedora Legacy for security fixes only.)  It has been replaced
by pcmciautils.  Due to the change in codebase, can you please retest this bug
against pcmciautils in FC5 or FC6?  If the bug is still present there, please
change the Component to pcmciautils and the version appropriately.  Thanks!

If there is no response within several weeks, the bug will be closed.

Comment 38 John Thacker 2007-01-03 14:52:08 UTC
Per the previous comment, closing bug since pcmcia-cs is no longer supported. 
If a similar bug still exists in pcmciautils, the replacement for pcmcia-cs,
please reopen the bug or file a new one.


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