LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   User eject/mount of next CD-ROM? (https://www.linuxquestions.org/questions/linux-general-1/user-eject-mount-of-next-cd-rom-395825/)

dunkel 12-22-2005 11:38 PM

User eject/mount of next CD-ROM?
 
I need to develop a software installation from two CDs. MS Windows can do it. The installer started from the first CD can eject the CD from which it was started and it can mount the next CD.

But on Linux, the installer cannot eject the CD from which is was started, while it is running:

# eject
umount: /mnt/cdrom: device is busy
eject: unmount of `/dev/cdrom' failed

Any idea how to change the CD while the installer is running? ThanX

timmeke 12-23-2005 03:53 AM

Have you tested why the device is busy (ie which program is accessing the cd-rom)?
Commands like "lsof" and "fuser" may help you.

Note also that, if the present working directory of the installer program is on the cdrom, then
the installer itself causes the "device is busy" error. To avoid this, and still remember where your
present working directory (PWD) was, try the following sequence:
cd / #change directory so device is no longer "busy" by the installer
eject #eject/unmount
mount #mount new cdrom (maybe automatically done when cd is inserted)
cd - #go back to the directory where you were before the "cd /"


All times are GMT -5. The time now is 05:30 AM.