Summary: NEC MultiSpin 8Xe CDROM

Gerhard den Hollander (gerhard@jason.nl)
Fri, 04 Apr 1997 16:05:07 +0200 (MET DST)

As usual SunManagers gave the correct answer in less than the time it takes
to dial the Sun Helpdesk ..

The problem:

Solaris 2.4 machine does not recognise my CDROm

The cause:

Sun can only read from (by default) drives that are configured for 512
bytes/block.

The solution (for Solaris 2.4)

Compile the following program

#include <unistd.h>
#include <sys/fcntl.h>
#include <sys/cdio.h>
#include <stdio.h>

#define CDROM "/dev/rdsk/c1t6d0s2"

main()
{
int fd;

fd = open(CDROM, O_RDONLY|O_EXCL);
if (fd < 0) {
perror(CDROM);
exit(1);
}
if (ioctl(fd, CDROMSBLKMODE, 512)) {
perror("CDROMSBLKMODE");
exit(1);
}
return 0;
}

Move it to /sbin/fixcd

Make the following changes to /etc/rc2.d/S92volmgt

case "$1" in
'start')
if [ -f /etc/vold.conf -a -f /usr/sbin/vold ] ; then
+ echo "Fixing CD-rom problem"
+ echo "this fails if there is *NO* CD in the CDRom"
+ /sbin/fixcd
echo "volume management starting."
/usr/sbin/vold 1>/dev/console 2>&1 &
fi
;;

For more info
http://www.aball.de/~wpv/sun/faq/cdrom.html

Thanks to all who replied