Question : Eject CD in POST, which was used for Kickstart boot

I boot from CD, use Kickstart to load the system, then at the end I'd like to eject the CD before rebooting. I've tried the obvious eject statements, specifying device, etc., but it won't eject. Probably related to the fact that it booted from the CD that I'm trying to eject. Anybody know how to force it to eject the CD? This happens to be RedHat Enterprise 4, but I don't think that will probably matter.

Answer : Eject CD in POST, which was used for Kickstart boot

You have to unmount /tmp/cdrom before you can eject it. Mounting a CD locks the door - this is not true of all programs that use a CD (such as workbone) but it is true of mount. There is no particular magic to ejecting - /usr/bin/eject works fine on an unmounted CD (you need to be root to use it or make it setuid).
Your real problem may well be in unmounting the CD. This requires that no processes are using it, including no processes have their current working directory (CWD) on it. After the system has booted, use fuser or lsof to check if any processes are using the mounted CD.
Random Solutions  
 
programming4us programming4us