Under Linux, is there any way to get a yes/no answer to whether or a CD/DVD drive contains a disc which isn't mounted but which can be mounted or written to?
You can use blkid to get the info of a possible mounted block device:
It will output something like:
/dev/sr0: UUID="2013-05-31-23-04-19-00" LABEL="Blah" TYPE="iso9660" PTTYPE="dos" [root@arch32-vm ~]# echo $? 0
If empty will output 2.
If there is just one drive, you could call
cdrecord -v -minfo
If there is a medium inside, you get the media information.
If there is no medium inside, you get an error message with no media.
If you have more than one drive, you need to specify the
dev= parameter, see man page: http://schilytools.sourceforge.net/man/man1/cdrecord.1.html