Click to See Complete Forum and Search --> : CD won't eject after being mounted


AdamZ
11-05-2004, 09:08 PM
I'm running Debian unstable on a Dell inpiron 600m, kernel 2.6.8.1 (more on this later). Here's what cdrecord has to say about my cd drive.

Device type : Removable CD-ROM
Version : 0
Response Format: 2
Capabilities :
Vendor_info : 'HL-DT-ST'
Identifikation : 'RW/DVD GCC-4243N'
Revision : 'A102'
Device seems to be: Generic mmc2 DVD-ROM.
Using generic SCSI-3/mmc CD-R/CD-RW driver (mmc_cdr).
Driver flags : MMC-3 SWABAUDIO BURNFREE

If the drive has not been mounted since bootup, the drive will eject using the eject command (run as a normal user), or by pressing the button on the drive:

adam@cobalt:~$ eject -v
eject: using default device `cdrom'
eject: device name is `cdrom'
eject: expanded name is `/dev/cdrom'
eject: `/dev/cdrom' is a link to `/dev/hdc'
eject: `/dev/hdc' is not mounted
eject: `/dev/hdc' is not a mount point
eject: `/dev/hdc' is a multipartition device
eject: trying to eject `/dev/hdc' using CD-ROM eject command
eject: CD-ROM eject command succeeded

However, after the drive has been mounted once, it will no longer eject, when eject is run by a normal user:

adam@cobalt:~$ eject -v
eject: using default device `cdrom'
eject: device name is `cdrom'
eject: expanded name is `/dev/cdrom'
eject: `/dev/cdrom' is a link to `/dev/hdc'
eject: `/dev/hdc' is not mounted
eject: `/dev/hdc' is not a mount point
eject: `/dev/hdc' is a multipartition device
eject: trying to eject `/dev/hdc' using CD-ROM eject command
eject: CD-ROM eject command failed
eject: trying to eject `/dev/hdc' using SCSI commands
eject: SCSI eject failed
eject: trying to eject `/dev/hdc' using floppy eject command
eject: floppy eject command failed
eject: trying to eject `/dev/hdc' using tape offline command
eject: tape offline command failed
eject: unable to eject, last error: Invalid argument

If I run eject -v as root, I get exactly the same message. However, it pauses after saying "trying to eject /dev/hdc using SCSI commands", and the drive ejects. eject then continues spitting out the rest of the error messages.

I remember that there are issues with cd burning as a user since 2.6.8, so I booted into 2.6.7 and tried the same things. Everything is the same, except the drive ejects when I run eject as a user. It still does it after the SCSI command though, and I still get the error messages.

After I've successfully ejected the cd, it will eject the (now empty) cd normally and successfully again, until it is mounted again.

I'm running gnome, and it mounts cds automatically for me. However, lsof does not show any program using the cd drive, so I don't think that's the problem (as well, I just switched from the method using magicdev to the other method, I ithnk involving things called dbus and hal. I had the eject issues under both systems). Any other ideas/things I should try?

gehidore
11-05-2004, 09:59 PM
Did you try unmounting it?

AdamZ
11-05-2004, 10:11 PM
Yes. It was unmounted when I tried to eject it.

gehidore
11-06-2004, 12:07 AM
Originally posted by blargety
Yes. It was unmounted when I tried to eject it.
Did you unmount it? or did eject say it unmounted it?

pickarooney
11-06-2004, 10:50 AM
Throw your fstab up and let's see. Is supermount activated?

AdamZ
11-06-2004, 12:22 PM
Originally posted by gehidore
Did you unmount it? or did eject say it unmounted it?

I've tried both. It happens either way. If I try to eject it while it's still mounted, eject properly unmounts it first.

Here's my fstab:


# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hda3 /data vfat defaults,rw,fmask=0111,dmask=0000 0 2
/dev/hda2 /windows ntfs defaults,ro,fmask=0333,dmask=0222 0 2
/dev/hda6 none swap sw 0 0
/dev/hda5 /boot ext3 defaults,noatime 0 2
/dev/hda7 / reiserfs defaults,noatime 0 1
/dev/hda8 /home reiserfs defaults,noatime 0 2
/dev/hdc /media/cdrom auto ro,user,noauto 0 0
/dev/hdc /cdrom auto ro,user,noauto 0 0
/dev/usbkey1 /mnt/usb auto rw,user,noauto 0 0


No supermount, it's not installed.

I just noticed the double cdrom line. I commented one out, but it still does the same thing.

soulestream
11-06-2004, 01:54 PM
did you umount both mount points


/dev/hdc /media/cdrom auto ro,user,noauto 0 0

/dev/hdc /cdrom


it wont eject otherwise



soule

AdamZ
11-06-2004, 02:05 PM
Originally posted by soulestream
did you umount both mount points
it wont eject otherwise


Yeah, they're both unmounted. I actually commented out the /cdrom mount point as I was posting that. It still does the same thing (no matter which one is commented out). If both are commented out, it won't mount at all (surprise).

camelrider
11-06-2004, 03:00 PM
It appears the 'eject' command is looking for '/dev/cdrom', which is not where you are mounting the device.
The simplest way to go may be to mkdir /dev/cdrom, add that line to /etc/fstab, then comment out the other two cdrom lines and see what happens.

AdamZ
11-06-2004, 03:13 PM
I tried that, same problem. Actually, it already knew to try /dev/hdc. Recall:


eject: using default device `cdrom'
eject: device name is `cdrom'
eject: expanded name is `/dev/cdrom'
eject: `/dev/cdrom' is a link to `/dev/hdc'

soulestream
11-06-2004, 07:52 PM
have you tried hitting or swearing at it?



soule

blobaugh
11-06-2004, 08:41 PM
very large hammers also work well

AdamZ
11-07-2004, 02:27 PM
have you tried hitting or swearing at it?
A couple of times.

very large hammers also work well
Not quite there yet...

Searching for the error message mostly returns a bunch of mailing list messages, none of them actually solving the problem. Some say it's a bug in either the kernel, or debian's version of fam.

gehidore
11-07-2004, 05:39 PM
Originally posted by blargety
I tried that, same problem. Actually, it already knew to try /dev/hdc. Recall:


eject: using default device `cdrom'
eject: device name is `cdrom'
eject: expanded name is `/dev/cdrom'
eject: `/dev/cdrom' is a link to `/dev/hdc'


I have to ask, did you try adding a specific device to eject?

eg eject /dev/hdc or eject /dev/hdd (just an idea)


df

run that, look at what is mounted.

AdamZ
11-07-2004, 07:36 PM
Yep, trying a specific device gives the same result. df only shows the partitions on hda and a tmpfs on /dev/shm

Alex Cavnar, aka alc6379
11-11-2004, 12:19 PM
If you're running SCSI emulation, try linking /dev/cdrom to /dev/scd0 . Or, try

eject -v /dev/scd0

AdamZ
11-11-2004, 02:02 PM
/dev/scd0 doesn't exist. I'm not using SCSI emulation, and I have udev installed. That's what's actually really weird about it. When I try to eject it when it hasn't been mounted, it uses the CD-ROM eject method. But when it's been mounted, it has to use the SCSI eject command.