Giving up on scratched CDs and ejecting mounted CDs

Dag Rune Sneeggen contactus at
Thu Oct 6 16:57:05 CDT 2005

Are we reinventing 'umount -l /mnt/cdrom && eject' here?
A lazy umount will quite simply detach the device from the filesystem without further considerations,
and clean up the references as soon as it's not busy. Thereby, nothing will "lock" the device,
and 'eject'(or pressing the physical eject button) should work...

Dag Rune Sneeggen(nix-dev at

Tapper Package Manager ( --> Do you want to miss the fun? :o

Martin Pitt wrote:
> Hi!
> Matt Zimmerman [2005-10-06 11:17 -0700]:
>>On Thu, Oct 06, 2005 at 06:18:48PM +0530, Pankaj kaushal wrote:
>>>Found an interesting question on my local mailing list. I have also
>>>encountered the same, why does pressing the eject button on a cdrom
>>>drive not work like taking out a usb flash disk? Being a read only
>>>device only makes it much simpler to achive this, does it not?
>>Not all CD-like devices are read-only these days, but perhaps this is worth
>>an experiment.  Perhaps someone could do some tests with unlocking the CD
>>tray and see what the effects are.
> Nothing overly bad actually. Nautilus and gnome-vfs instantly notice
> this and regard the CD as unmounted.
> Only the kernel does not notice it, so the CD is still mounted. It
> should not be too hard to extend our USB auto-unmounting magic to
> CD-ROMs, but I didn't check yet.
> Martin

More information about the ubuntu-devel mailing list