[Grml] Unlocking CD drive

Michael Prokop mika at grml.org
Mon Nov 13 21:51:51 CET 2006


* Michael Schierl <schierlm at gmx.de> [20061113 21:47]:

> sometimes I booted grml, started a job there (like using dd to zero a
> partition) and then have to leave (but let it try continuing the
> zeroing). So I want to remove the CD (and risk a panic later when a file
> from it is accessed). But that is no problem since I do not run anything
> new after the CD is removed, so everything needed is already in cache.
> For these cases I have a perl script on my USB pendrive:

> #!/usr/bin/perl -w
> open(H, "</dev/cdrom") or die("Can't open: $!");
> ioctl(H, 0x5329 , 0) or die("Can't ioctl: $!");
> close(H) or die("Can't close: $!");

> That one works well - if I have my pendrive with me. My question: Is
> there a way inside grml to do the same thing (without memorizing the
> whole script or the ioctl number)? Something in /proc or /sys? Or a
> script? (Using the hardware eject "hole" of the CD drive does not count,
> since it requires a paper clip ;-) )

I'm running out of coffee, but are you searching for
http://grml.org/faq/#remove_cd ?

regards,
-mika-
-- 
 http://grml.org/            # Linux for texttool-users and sysadmins
 http://wiki.grml.org/       # share your knowledge
 http://grml.supersized.org/ # the grml development weblog
 #grml @ irc.freenode.org    # meet us on irc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://ml.grml.org/pipermail/grml/attachments/20061113/cfb74da8/attachment-0003.pgp>


More information about the Grml mailing list