Red Hat Bugzilla – Bug 247446
RHEL4-U5: "cdrom open failed" message in /var/log/messages on every reboot
Last modified: 2010-10-22 12:11:06 EDT
Description of problem:
Installed RHEL-4.5 on PE1800.When we check /var/log/messages we find the below
error: kernel: cdrom: open failed.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Install RHEL-4.5 (kernel-2.6.9-55.ELsmp) on PE1800
2. Reboot and check the /var/log/messages.
3. Error messages are shown in /var/log/messages.
kernel: cdrom: open failed.
"kernel: cdrom: open failed" message is seen in /var/log/messages.
"kernel: cdrom: open failed" message should not be seen in /var/log/messages.
Will this be fixed in RHEL 4.6?
No, it is not planned to be included in 4.6 at this time.
Since you found and recently asked about bz247466, I was wondering if
you could help me get it resolved.
What I need from you is for you to get the source to RHEL4 and recompile
the cdrom driver (drivers/cdrom/cdrom.c) with ERRLOGMASK set to
"CD_WARN | CD_OPEN" at least. I would like to see the debug messages
that result when CD_OPEN is defined.
There appear to be two patches upstream that deal with this area. One
adds a call to cdo->drive_status() before the call to cdrom_count_tracks().
I would hope that a call to cdo->drive_status() would update ret so the
cleanup_and_return error path is not taken. This patch was added in the
The other patch just changes the debug level on the offending message from
CD_WARN to CD_OPEN. This was added more recently.
Obviously, the first patch is preferable but if that doesn't work for a
pe1800 I suppose the second will have to do. If you could get the output
from changing ERRLOGMASK, perhaps this would show which patch should be
If re-compiling is not possible, I could build rpms with the first patch
and perhaps you could test it. If that doesn't work, then the same
could be done with the second patch.
Thanks in advance for whatever help you can provide. It is appreciated.
Created attachment 207221 [details]
/var/log/messages after the required changes have been done to the driver code.
Created attachment 207231 [details]
driver file with changes
Great! Thanks so much, Srinivas.
From the output it looks like the "first patch" isn't the solution. The
cdo->driver_status() call returned a value of 1 (CDS_NO_DISC). This value
is then compared to CDS_TRAY_OPEN which fails and then the else if is to
see if it is NOT CDS_DISC_OK. Thus, ret goes to -ENOMEDIUM and the code
gotos clean_up_and_return where the error message in question is displayed.
The "first patch" would add a call to cd0->drive_status() just before the
check for CDS_DISC_OK but in this case, there is no disk and nothing has
been done to add one so regardless of whether cd0->drive_status() is called
again, there still would be no disk. Thus the patch won't help this bugzilla.
The solution is to change the level of the printk to a informational
level from a warning level. It is not an error to have no cd in the drive.
I will make this fix and build rpms and if I can impose upon you again to test
them, that would be great.
The built rpms with the proposed fix can be found in
Srinivas, could you do me one additional favor? Would you make sure that
this error message is written to /var/log when there is no CD in the
device and isn't written if there is. As I tried to explain above, the
status return indicates there is no CD so I would just like to confirm that.
Let me try to type the link for the rpms one more time. I had a typo
in the previous attempt.
The built rpms with the proposed fix can be found in
Any luck downloading the rpms specified in comment #9? The link works for
fptr = fopen("/dev/hdc", "r");
printf("CD rom open success\n");
printf("CD rom open Fail\n");
This is Vijayakumara Moteth from HP. I'm also facing the same issue logging
"cdrom open failed" messages whenever i try to check for device existence.
In Comment#11 i wrote a simple program. If i execute this, logs the message into
I have tried your proposed fix with 2.6.9 kernel. It works fine. but the same i
tried with 2.6.5 also (facing the same problem here also). but the result is
I have also tested by restarting machine with 2.6.9 kernel. After applying
proposed fix and restart "cdrom open failed" messages disappeared.
I think this issue is present with 2.6 kernel. Is there any common patch for the
all the machines with 2.6 kernel.
Yes, John. I have verified your fix. This issue is fixed in the proposed
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release. Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products. This request is not yet committed for inclusion in an Update
Committed in 68.19.EL . RPMS are available at http://people.redhat.com/vgoyal/rhel4/
Verified. The kernel 2.6.9-68.20 fixes this issue.
~ Attention: ~ Feedback requested regarding this **High Priority** bug.
A fix for this issue should be included in the latest packages contained in
RHEL4.7-Snapshot1--available now on partners.redhat.com.
After you (Red Hat Partner) have verified that this issue has been addressed,
submit a comment describing the passing results of your test in appropriate
detail, along with which snapshot and package version tested. The bugzilla will
be updated by Red Hat Quality Engineering for you when this information has been
If you believe this issue has not properly fixed or you are unable to verify the
issue for any reason, please add a comment describing the most recent issues you
are experiencing, along with which snapshot and package version tested.
If you believe the bug has not been fixed, change the status of the bug to ASSIGNED.
If you are receiving this message in Issue Tracker, please reply with a message
to Issue Tracker about your results and bugzilla will be updated for you.
If you need assistance accessing ftp://partners.redhat.com, please contact your
Red Hat QE Partner Management
Correction: This bug is **Low Priority**. Sorry.
Verified. The issue is fixed with RHEL4.7 beta code drop.
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.
Partners, I would like to thank you all for your participation in assuring the
quality of this RHEL 4.7 Update Release. My hat's off to you all. Thanks.