I have #! 9.04 on USB drive and felt annoying the ejection of CD drive at shutdown/ reboot.
In folder /etc/init.d there's a file named 'casper'. By making disabled line 82 of this file, i.e. 'eject -p -m /cdrom >/dev/null 2>&1' with # in front of the line the problem went away. The solution, if it is one,
has worked after two shutdowns now.