Imported Upstream version 1.1.11
[platform/upstream/cdrkit.git] / doc / READMEs / README.ATAPI.setup
1 Howto setup an ATAPI CD-RW/DVD+-RW recorder on Debian/Ubuntu
2 ============================================================
3
4 This guide should be applicable to most kernel 2.6 using distributions of
5 GNU/Linux. For installations with kernel 2.4, continue reading below.
6
7 Kernel 2.6.*
8 ============
9
10 If you have just one CD writer in your computer, CD-writing should work out of
11 the box. There should be a symbolic link /dev/cdrw which points to your actual
12 CD-Writer's device (e. g. /dev/hdb). If the link is not present (eg.  the
13 system is not using udev/devfs) or if you want to use a different device as
14 default, you can configure the device in /etc/wodim.conf:
15
16   CDR_DEVICE=/dev/hdd
17
18 would configure the default device to be /dev/hdd, i. e. the slave
19 device on the secondary IDE bus.
20
21 You can always override this default setting with wodim's "dev"
22 option:
23
24     wodim dev=/dev/hdc ...
25
26 Only users part of the system group "cdrom" are able to write CDs.
27 If you wish to allow non-root users to write CDs then add your users to the
28 cdrom group ("adduser user cdrom") and let the user completely logout and
29 re-login.
30 Note: with certain kernel versions wodim can fail with this message:
31 "wodim: Operation not permitted. Cannot send SCSI cmd via ioctl"
32 In this case it still does need the suid bit - please send patches if you have
33 identified the reason of that problem.
34
35 Kernel 2.4.* (for 2.5/2.6, see above)
36 =====================================
37
38 Where we start:
39    Linux: Kernel 2.4.20-bf2.4 (Debian package kernel-image-2.4.20-bf2.4)
40    Distribution: Debian Woody 3.0r2, i386
41    Devices: one CDRW-Writer, one CDROM-drive, both ATAPI
42
43 1. Become root, try "grep hd.: /var/log/kern.log" to find out where your
44    ATAPI-devices are connected to (hd?-names).
45 2. Edit your boot configuration file, eg. /etc/lilo.conf if you use
46    lilo or the batch-file if you boot via loadlin.
47 3. Find a line where you can append additional kernel parameters, eg.
48    "append=" in lilo.conf or the loadlin-line in the batch file.
49 4. Append sth. like this: "hdb=ide-scsi hdc=ide-scsi max_scsi_luns=1"
50    The hdX-parameters defines devices that should be mapped to SCSI
51    latter. You may do it with non-writers too, since the emulation layer
52    is almost complete. Or omit some so the devices will use their
53    native drivers (eg. ide-cd).
54 5. Save the file, reinstall the bootloader (ie. running "/sbin/lilo")
55 6. Call "modconf" in a console or xterm, enter the section 
56    "kernel/drivers/scsi", load "sg" and "ide-scsi"
57 7. Reboot Debian, watch while booting, you should see a line like this:
58    "Detected scsi CD-ROM sr0 at scsi0, channel 0, id 0, lun 0".
59    Your old ATAPI devices virtually don't exist any longer, you cannot refer to
60    /dev/hd* as CDROM drives. Use the SCSI equivalents instead, /dev/sr*.
61 8. Become root, setup devices:
62       cd /dev
63       MAKEDEV sg scd
64       ln -s scd0 cdrom # NOTE: or cdrw, first check which drive is here
65       ln -s scd1 cdrw  # NOTE: see above, maybe cdrom
66    Check the new SCSI settings:
67       wodim -scanbus
68    Setup wodim's environment - edit /etc/wodim.conf:
69       CDR_DEVICE=cdrw
70       cdrw=1,0,0        4       8m
71       cdrom=1,2,0       0       0m
72    Insert the right values, the fields are described in the manpage
73    of wodim. Alternatively, you may use these values as
74    wodim-parameter or take a frontend with an own configuration
75    scheme, then you don't need to modify /etc/wodim.conf.
76    The columns must be separated by tabs.
77 9. It's done! Insert a CD and try "wodim -v -toc". To create your first CD-ROM, try:
78    
79    mkisofs -v -r -J /directory/to/be/written | wodim -v -dummy -
80
81    (read wodim(1), "man 1 wodim", for details)
82
83 10. If you wish to allow non-root users to write CDs, you must give them 
84     permissions to do so. Set suid-root permissions on the executable,
85     then add your users to the cdrom group ("adduser user cdrom") and
86     let the user completely logout and re-login.
87