SDB:CD changers
Aim:
You plan to use a CD changer on your Linux system.
How to proceed:
You have to separate SCSI and ATAPI changes.
SCSI
Normally a LUN (Logical Unit Numnber) is assigned to each CD. LUNs are a device identification scheme for SCSI IDs.
Lets assume we use a 5 CD changer which has been assigned SCSI-ID 5. The first CD would be 5:0.
Well, first you have to configure the LUN support in the kernel sources. This can be done either with the kernel driver itself (e.g. while configuring a kernel) or via a LILO parameter.
This parameter is max_scsi_luns
. It accepts values from 1 (default) up to 8. In our example this should be enough:
max_scsi_luns=5
This parameter is assigned as LILO boot promt or (permanently) in the append
line of /etc/lilo.conf
.
Now the kernel should recognize the different sub CDs. But how to access them?
The classical way via the CD-ROM device files /dev/scdX
As the predefined /dev/scd0
and /dev/scd1
are not enough we need to create more:
for i in 2 3 4; do mknod /dev/scd$i b 11 $i; done
Now you may try (just a test):
mount /dev/scd3 /mnt
to mount the 4th CD to /mnt
. (don't forget to unmount it!). Now you should enter these new file systems into /etc/fstab
and assing mountpoints for them. Entries in /etc/fstab
:
/dev/scd0 /cdrom/0 iso9660 ro,noauto 0 0 /dev/scd1 /cdrom/1 iso9660 ro,noauto 0 0 /dev/scd2 /cdrom/2 iso9660 ro,noauto 0 0 /dev/scd3 /cdrom/3 iso9660 ro,noauto 0 0 /dev/scd4 /cdrom/4 iso9660 ro,noauto 0 0
Assign the mountpoints:
mkdir /cdrom for i in 0 1 2 3 4; do mkdir /cdrom/$i; done
So now start and try to mount /cdrom/3
. The changer should now start to spin and to mount the filesystem on the 4th CD. All of the CDs may be mounted separately. Here you do not need to change the CDs while changing them. Well, accessing the changer from lots of different programs may damage your cd changer.
<keyword>changer,scsi,atapi,CD-Wechsler,wechsler,CDROM,mounten,wechseln</keyword>