Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm sure that this is a simple problem, but I can't seem to find an answer that works for me.
I can't seem to eject CD's.
The problem:
Code:
$ eject /dev/scd0
eject: unable to eject, last error: Inappropriate ioctl for device
Code:
$ sudo eject /dev/scd0
eject: unable to eject, last error: Inappropriate ioctl for device
When using sudo eject, i still get the device error, but the CD ejects anyways.
I have had this problem before... but I fixed it by mounting/unmounting the CD-Rom. Not sure why that worked, but it doesn't this time.
Any Ideas? I'd rather not have to sudo eject every time i want my cds back.
Solutions I've seen around various forums:
-Am I a member of group "cdrom" -yes.
-Are the permissions set correctly? -yes. i even did a chmod 777 /dev/scd0
$ eject -v /dev/scd0
eject: device name is `/dev/scd0'
eject: expanded name is `/dev/scd0'
eject: `/dev/scd0' is mounted at `/media/cdrom0'
eject: unmounting `/dev/scd0'
eject: `/dev/scd0' is not a multipartition device
eject: trying to eject `/dev/scd0' using CD-ROM eject command
eject: CD-ROM eject command failed
eject: trying to eject `/dev/scd0' using SCSI commands
eject: SCSI eject failed
eject: trying to eject `/dev/scd0' using floppy eject command
eject: floppy eject command failed
eject: trying to eject `/dev/scd0' using tape offline command
eject: tape offline command failed
eject: unable to eject, last error: Inappropriate ioctl for device
Calling that with a "sudo" in front of it lists out the same thing, but it stalls at "...using SCSI commands" and then ejects, and says "SCSI eject failed"
I'll be interested to see if that works. The manpage explicitly says:
Code:
The device corresponding to <name> is ejected. The name can be a device file or mount point, either a full path or with the leading "/dev", "/media" or "/mnt" omitted. If no name is specified, the default name "cdrom" is used.
But of course, maybe that's not quite right.
Original poster: Was there any information in /var/log/messages? It's odd that root is succeeding here where you do not.
calling eject /media/cdrom0 just gives the same errors, because they reference the same thing.
What i find exceptionally weird is that root ejects the CD, but still echoes the errors. What could cause that?
From messages:
Quote:
Sep 16 13:22:53 localhost kernel: cdrom: open failed.
Sep 16 13:24:25 localhost kernel: UDF-fs: No VRS found
Sep 16 13:25:11 localhost kernel: program eject is using a deprecated SCSI ioctl, please convert it to SG_IO
Sep 16 13:27:45 localhost kernel: program eject is using a deprecated SCSI ioctl, please convert it to SG_IO
Sep 16 13:34:28 localhost kernel: UDF-fs: No VRS found
Sep 16 13:35:02 localhost kernel: program eject is using a deprecated SCSI ioctl, please convert it to SG_IO
Sep 16 13:36:49 localhost kernel: program eject is using a deprecated SCSI ioctl, please convert it to SG_IO
Sep 16 13:37:20 localhost last message repeated 2 times
Sep 16 13:38:21 localhost kernel: program eject is using a deprecated SCSI ioctl, please convert it to SG_IO
Sep 16 13:40:15 localhost kernel: UDF-fs: No VRS found
Sep 16 13:41:00 localhost kernel: program eject is using a deprecated SCSI ioctl, please convert it to SG_IO
Sep 16 13:40:15 localhost kernel: UDF-fs: No VRS found
Sep 16 13:41:00 localhost kernel: program eject is using a deprecated SCSI ioctl, please convert it to SG_IO
Sep 16 13:44:39 localhost kernel: program eject is using a deprecated SCSI ioctl, please convert it to SG_IO
Sep 16 13:44:41 localhost last message repeated 2 times
Sep 16 13:47:04 localhost kernel: program eject is using a deprecated SCSI ioctl, please convert it to SG_IO
Sep 16 13:47:04 localhost kernel: UDF-fs: No VRS found
Sep 16 13:51:54 localhost kernel: program eject is using a deprecated SCSI ioctl, please convert it to SG_IO
Sep 16 14:12:44 localhost kernel: program eject is using a deprecated SCSI ioctl, please convert it to SG_IO
Sep 16 14:13:26 localhost kernel: UDF-fs: No VRS found
Sep 16 14:15:14 localhost kernel: program eject is using a deprecated SCSI ioctl, please convert it to SG_IO
Sep 16 14:15:17 localhost last message repeated 2 times
Sep 16 14:15:56 localhost kernel: UDF-fs: No VRS found
Sep 16 14:17:16 localhost kernel: program eject is using a deprecated SCSI ioctl, please convert it to SG_IO
ejecting with sudo produces this in the message log:
Quote:
Sep 17 18:05:32 localhost kernel: program eject is using a deprecated SCSI ioctl, please convert it to SG_IO
Sep 17 18:15:24 localhost kernel: program eject is using a deprecated SCSI ioctl, please convert it to SG_IO
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.