This section applies to the following types of CD-writers: SCSI, IDE/ATAPI and the devices for the parallel port. USB CD-writers are not supported as of March 2000. Non-SCSI writers require compatibility drivers, which make them appear as if they were real SCSI devices. On the one side such a unifying strategy is easy ("everything is SCSI"), because on the application level you can share your knowledge with other users regardless of their kind of CD-writer. On the other side, you have to reconfigure applications like audio CD players or the mount utility to reflect the change of the driver name. For example, if you accessed your ATAPI CD-writer through the device file /dev/hdc before, you will have to access it through /dev/scd0 after activating the SCSI compatibility drivers.
Once you succeed setting up your hardware and the rest of your Linux-system,
the command cdrecord -scanbus
shows you a list of devices
on your SCSI busses.
The goal of this section is to guide you in setting
up your Linux-system, so that you finally end up seeing something like:
shell> cdrecord -scanbus
Cdrecord release 1.7a1 Copyright (C) 1995-1998 Jörg Schilling
scsibus0:
0,0,0) 'Quantum ' 'XP34300 ' 'F76D' Disk
0,1,0) 'SEAGATE ' 'ST11200N ' '8334' Disk
0,2,0) *
0,3,0) 'TOSHIBA ' 'MK537FB/ ' '6258' Disk
0,4,0) 'WANGTEK ' '5150ES SCSI 36 ' 'ESB6' Removable Tape
0,5,0) 'EXABYTE ' 'EXB-8500-85QUE ' '0428' Removable Tape
0,6,0) 'TOSHIBA ' 'XM-3401TASUNSLCD' '3593' Removable CD-ROM
0,7,0) *
scsibus1:
1,0,0) 'Quantum ' 'XP31070W ' 'L912' Disk
1,1,0) *
1,2,0) *
1,3,0) 'TEAC ' 'CD-R55S ' '1.0H' Removable CD-ROM
1,4,0) 'MATSHITA' 'CD-R CW-7502 ' '4.02' Removable CD-ROM
1,5,0) *
1,6,0) 'YAMAHA ' 'CDR400t ' '1.0d' Removable CD-ROM
1,7,0) *
Listing: Detecting devices on your SCSI bus
The example was provided by Jörg Schilling and shows a total of four CD-writers. Please note that -scanbus also reports other devices, e.g. regular CD-ROMs and hard disk drives. The last column gives the SCSI description of the device, from which you cannot clearly distinguish ordinary CD-ROM drives from those with burning capability. But the product identification (middle column) often has hints about the feature in form of a R, -R or -RW.
This section is an attempt to provide an fast and easy description of the configuration. Not all possible setups are coverd, but please go and figure yourself. First of all, check the version number printed by the command uname. It should be something like 2.0.X or 2.2.Y, where X is higher than 36 and Y is higher than 11. If you run older things or 2.1.* or 1.*.*, you are on your own. The listing below shows a set of commands you could start with. The commands create device file entries under /dev and attempt to load some modules.
test `whoami` = 'root' || echo "You must be root to execute the commands."
cd /dev/
umask -S u=rwx,g=rwx,o-rwx
./MAKEDEV loop || for i in 0 1 2 3 4 5 6 7; do mknod loop$i c 7 $i; done
./MAKEDEV sg || for i in 0 1 2 3 4 5 6 7; do mknod sg$i c 21 $i; done
for i in ide-scsi scsi_mod sg sr_mod loop
do
modprobe $i || grep loop /proc/modules || echo "Module $i missing."
done
cdrecord -scanbus
Listing: creating of devicefiles and loading of modules
Hardware access is usally implemented through device files under Linux. So before any other thing you make sure the necessary entries do exists in the directory /dev. Still nobody could give me a compelling reason why this has not been automated through techniques like the device filesystem (devfs). The devfs is available for years know, brings safer (!) and far clearer naming of devices and makes the device entries appear automatically under /dev. Some people argue devfs is not the perfect solution, but they do not come up with anything better, not even something comparable and last but least nothing available and tested now. Lets start to use devfs!
Please read the next chapter if modules are reported to be missing on your system or consult the documentation of your Linux-distribution. If you are in text mode (console), the loading of modules may cause some messages to be printed on your screen. If you are in graphics mode (X11, KDE, Gnome), you can print this messages with the command dmesg. To have the modules loaded, you should either list them in a configuration file like /etc/modules or run the daemons kerneld or kmod, which both load the required modules automatically for you when the kernel sees a needs for them.
People with a SCSI-writer can skip the rest of this section, because cdrecord will most likely already detect their hardware. If not, then please send me an email with some information about your setup, so I can improve the section about SCSI-writers.
Now to the people with CD-writers for IDE/ATAPI. As written in the previous chapter, you have to load the compatibility driver ide-scsi. But this driver can only access your CD-Writer, if no other driver has already done so. In other words, you have to tell the regular IDE driver to leave your CD-writer unrecognized, so the ide-scsi driver can grab it.
hda = IDE bus/connector 0 master device
hdb = IDE bus/connector 0 slave device
hdc = IDE bus/connector 1 master device
hdd = IDE bus/connector 1 slave device
Table: device file names of IDE/ATAPI devices
The table above shows the relation of device file names and the placing of devices on the IDE busses. The device file name representing your CD-Writer has to be passed to the driver in the Linux kernel. Example: hdb=ide-scsi. This setting should be placed into lilo.conf or chos.conf if the driver is statically compiled into your kernel, which is the most common setup. The next two listings show example configurations. All other variants like hdb=ignore or hdb=none will not do what you need. "Ignore" just means "no autoprobing" and "none" will even block access to the device for ide-scsi.
image=/boot/zImage-2.2.14
label=Linux
read-only
append="hdb=ide-scsi"
Listing: Example configuration for lilo (/etc/lilo.conf)
linux "Linux 2.1.14" {
image=/boot/zImage-2.0.37
cmdline= root=/dev/hda5 readonly hdb=ide-scsi
}
Listing: Example configuration for chos (/etc/chos.conf)
If the driver for IDE/ATAPI CD-ROMs is loaded as a module, then the above won't make any difference to you, but make sure you include the options-line from the next listing. The last three lines of that listing are generally suggested to further automate the loading of the required modules. If you do not run the kernel daemon to trigger module loading automatically, then add the names of the modules to the files /etc/modules (or whatever strategy your Linux distribution uses).
options ide-cd ignore=hdb # tell the ide-cd module to ignore hdb
alias scd0 sr_mod # load sr_mod upon access of scd0
pre-install sg modprobe ide-scsi # before sg, load ide-scsi
pre-install sr_mod modprobe ide-scsi # before sr_mod, load ide-scsi
Listing: Example configuration for /etc/modules.conf
Remember you have to access your CD-writer through the device file /dev/scd× where ×=0,..,8. You may want to change the symbolic name cdrom to point to your actual device file name. The listing below shows the command to achieve this with the example scd0.
cd /dev && rm cdrom && ln -s scd0 cdrom
Listing: Making cdrom a symbolic name for scd0
The Linux kernel can be equipped with drivers for various features. You can compile the drivers into the kernel image statically or you can compile them as a module for on-demand loading. The last method is preferred for drivers not essential for bringing your Linux-system into life, because your kernel will be smaller and faster then. However, some drivers are essential for the system to come up and you shouldn't compile them as a module. Example: if your system lives on an IDE hard disk, you must have the driver for IDE hard disks in the kernel -- not as a module.
There are three different types of CD-writers: SCSI, IDE/ATAPI and external writers that work through the parallel port. The table shows how to configure the Linux kernel for those hardware types. The first column of the table is the section of the kernel configuration menu, where you can find the setting. The second column is the description of the feature (taken from the kernel configuration menu, too). The third column gives the name of the resulting module. The columns named SCSI, IDE and PP contain the necessary options for the associated hardware (PP = parallel port).
Sect. Description Module SCSI IDE PP
------------------------------------------------------------
BLOCK Enhanced IDE/MFM/RLL... Y
BLOCK IDE/ATAPI CDROM ide-cd M
BLOCK SCSI emulation support ide-scsi M
BLOCK Loopback device loop M M M
PARIDE Parallel port IDE device paride Y/M
PARIDE Parallel port ATAPI CD-ROMs M
PARIDE Parallel port generic ATAPI M
PARIDE (select a low-level driver) Y
SCSI SCSI support scsi_mod Y/M Y/M
SCSI SCSI CD-ROM support sr_mod Y/M Y/M
SCSI Enable vendor-specific Y Y
SCSI SCSI generic support sg Y/M Y/M
SCSI (select a low-level driver) Y
FS ISO 9660 CDROM filesystem iso9660 Y/M Y/M Y/M
FS Microsoft Joliet cdrom... joliet Y Y Y
Table: driver selection for different writer types
Y stands for yes and means you should put the beast into the kernel. M stands for module and means you should or must compile this feature as a module. Y/M gives you the option to decide between either (order indicates choices with less potential problems). Empty settings don't need to be modified and not changing them increases the chance that the resulting kernel will work for you (if it did before...). Especially in environments where SCSI and ATAPI devices are mixed, you better build most things as modules.
Compiling loopback device is optional. It allows you to test the image before writing it to the media. If you want to be able to read CD-ROMs, you need support for the ISO 9660 filesystem. This driver automatically includes RockRidge Extensions. The Microsoft Joliet CD-ROM extensions have to be explicitly added to the ISO 9660 filesystem. In any case, you need a low-level driver for your hardware. Low-level refers to the driver, which interacts directly with the hardware. For SCSI and the parallel port, there are a lot of low-level drivers available.
Installing the resulting Linux-kernel is beyond the scope of this HOWTO. Please consult the documentation of your Linux-distribution.
Users of RedHat Linux be aware that you have to compile in the features "Ramdisk support" and "Initial ramdisk". Furthermore, you have to generate a new ramdisk with the new modules by issuing a command like "mkintrd --preload ide-cd initrd-2.2.14.img 2.2.14".
Up to kernel version 2.2.9, don't enable CONFIG_SCSI_MULTI_LUN ('probe for multiple luns') and ide-scsi support at the same time, there is an ide-scsi bug that prevents this.
Some users reported conflicts with pre-compiled binaries and the 2.2-release. This is a problem with the Linux kernel. Possible solutions:
Please make sure that your writer is recognized by the BIOS of your computer. It makes no sense to proceed if your computer does not accept the hardware (the fact that it doesn't spit it out should not be interpreted as a sign of confirmation; a message on the screen is required).
If you plan to connect your SCSI through the parallel port (not to confuse with the IDE drives for the parallel port), you need a special active cable and a special kernel driver. Read http://www.torque.net/parport/parscsi.html to learn more about this option.
I have no clue about this, sorry. Please read http://www.torque.net/parport/paride.html or your local file /usr/src/linux/Documentation/paride.txt.
A more detailed survey of tools related to produce CD-ROMs is available from http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdb.html.
One of the following packages are required to generate images of CD-Rs (only required for data CD-ROMs):
ftp://tsx-11.mit.edu/pub/linux/packages/mkisofs/ (mkisofs)ftp://ftp.ge.ucl.ac.uk/pub/mkhfs (mkhybrid)
To write images to the CD-R, you need one of the following software packages:
ftp://ftp.fokus.gmd.de/pub/unix/cdrecord/ (cdrecord)http://www.ping.de/sites/daneb/cdrdao.html (cdrdao)
Don't trust the man page of (old) mkisofs
which states you need
version 1.5 of cdwrite
. Just use cdrecord and you are fine.
Please note that newer versions of cdrecord ship with an enhanced version
of mkisofs and some extra tools in the subdirectory misc/ (readcd, isosize)
not found elsewhere.
Front-ends are really front-ends under Linux. That means, you still have to install the command-line utilities, but you access them in a better looking manner.
X-CD-Roast is a program package dedicated to easy CD creation under
Linux. It combines command line tools like cdrecord
and
mkisofs
into a nice graphical user interface.
http://www.fh-muenchen.de/home/ze/rz/services/projects/xcdroast/e_overview.html
BurnIT is a JAVA front-end to cdrecord, mkisofs and cdda2wav-0.95 making it a complete package for burning CDs on the Unix platform. It is available from
http://sunsite.auc.dk/BurnIT/
CD-Tux is a character based frontend for the programs mkisofs and cdrecord. "It creates an easy to use enviroment for doing almost anything to a CD in full color through the use of the (in)famous NCURSES Library. And it does all this whith an executable of under 75K."
http://www.datadictator.co.za/cdtux/