<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Oct 20, 2015 at 4:53 AM, Joachim Backes <span dir="ltr">&lt;<a href="mailto:joachim.backes@rhrk.uni-kl.de" target="_blank">joachim.backes@rhrk.uni-kl.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">2. sudo mount /dev/sr0 /mnt<br>

then the CD will be inserted, but immeditaly after it inserted, an error message appears:<br>

mount: no medium found on /dev/sr0<br></blockquote></div><br><a href="https://github.com/torvalds/linux/blob/master/drivers/cdrom/cdrom.c">https://github.com/torvalds/linux/blob/master/drivers/cdrom/cdrom.c</a><br><br></div><div class="gmail_extra">When you try to mount the drive, &quot;<span class="">open_for_data&quot; is called.  If the tray is open, the kernel will try to close it.  It will then check to see if there is a disc in the drive.  What happens at that point varies from drive to drive.  Most drive, I believe, and certainly the ones I have access to, will not respond to the status request until they finish checking for media.  On those drives, a single mount command will succeed.  If your drive responds to the status request before it finishes scanning for media, then the mount command will fail.  It&#39;s not a kernel bug, it&#39;s your drive.<br><br></span></div><div class="gmail_extra"><span class="">You can work around that by calling &quot;eject -t &lt;device&gt;&quot; before mounting the drive.  You might also need a delay after calling that command, since your drive seems to respond before it finishes scanning for media.<br></span></div></div>