Tips Linux Explorers   All Things Linux Forum   Great Linux Links   LinuxClues.com   Hometown   Email 



CDRECORD and KERNEL 2.6


( If you want you can skip the intro and go to the "nutshell" at the bottom )

QUOTE (Warly @ Mandrakesoft)

Mandrakelinux 10.0: to Burn or not to Burn

The linux kernel 2.6, the default one in Mandrakelinux 10.0, has introduced some changes in the way burning is done.

A release note was published to explain the new behavior, but it seems not explicit enough to explain what changed and what is now the best way to burn under Mandrakelinux 10.0.

First, let have some technical facts. Basically all the burners have the same interface, which is a SCSI one, because the IDE commands are just too basic to do anything with a burner. However SCSI interface is not as widely available as IDE one, and is more expensive because you need an extra adapter ; so nowadays most of the burner sold have an IDE interface. To be able to send complex SCSI command over the IDE bus, the ATAPI standard has been developed.

This ATAPI standard just described how to send SCSI commands via an IDE bus, however under the linux kernel 2.4 the ATAPI support was not present into the default IDE driver, but into the ide-scsi one, specifically developed for that matter.

As far as burning programs are concerned, under Mandrakelinux the burning tools are either cdrecord or dvd+rw-tools. All the graphical burning interfaces, k3b, xcdroast, or others are using either cdrecord or dvd+rw-tools in background. Until recently, the more versatile and used has been cdrecord, but the free version only allow to burn CD-R and CD-RW, however I have been able to maintain an extra patch to be able to burn any kind of DVD media, DVD-R, DVD-RW, DVD+R and DVD+RW. To burn with cdrecord you need to specify the interface and the device you want to use on the command line, for example dev=sg:1,0,1 (or just dev=1,0,1) to burn on the SCSI bus 1, target 0, lun 1 (each SCSI device is defined with these 3 numbers).

This SCSI emulation under linux 2.4 was the reason of this 'hdc=ide-scsi' thing you must have met into your bootloader command line if you once wanted to burn under a GNU/Linux system with an ATAPI burner. cdrecord also supported to burn without this SCSI emulation with the 'dev=ATAPI:1,0,0', but unfortunately this method does not allow to use Direct Memory Access (DMA), which impacts the performances and basically does not allow to burn at anything faster than 16x speed. So we were stuck and had to use this ide-scsi emulation to be able to correctly burn under GNU/Linux.

This is now past! With the linux kernel 2.6 a new ATAPI interface has been developed and directly available with the IDE driver. This interface is shortly known as the ATA interface, which is also supported by cdrecord. So forget about this SCSI emulation, ATAPI interface or whatever, just now use the more logical way you would have first imagine, which is to just specify the device name of your burner, for example dev=/dev/hdc, if your burner is the first device on the second IDE bus of your computer.

You can scan your buses with "cdrecord -scanbus" to know which devices are detected, note that the Mandrakelinux cdrecord automatically default to the new ATA interface if the SCSI interface does not find anything, you can check that with the "scsidev: 'ATA'" line in the scanbus command output. If you want to be sure to scan only the ATA bus, just use "cdrecord dev=ATA -scanbus".

To specify the device, you can use 'dev=/dev/hdc' or something like 'dev=ATA:1,0,0' from the scanbus output. These both syntax are internally the same thing, and the new ATA interface will be used (and allow DMA burning and the maximum speed of your burner).

To conclude, with the new Mandrakelinux 10.0, just forget about anything you know about burning with this SCSI emulation, and just remember that you only need to know one thing, the name of the device representing your burner (you can easily find this out with a "cat /proc/sys/dev/cdrom/info" or "dmesg | grep CD" commands). So be careful not to use this ATAPI interface under your favorite burning tool, and do not take care about their messages regarding SCSI emulation, they are outdated (xcdroast has been patched to be able to use the ATA interface, I am not sure about k3b).





So in a nutshell:
In Mandrake 10, and probably soon in other distro's with the 2.6 kernel, first do:

CODE
# dmesg | grep CD

to see what /dev/hd?? your burner is located . . and then:

CODE
# cdrecord  dev=/dev/hdc  filename.iso

That is all . . . . ( So no more "cdrecord --scanbus" like you were used to with kernel 2.4 !! )

K3b and other GUI burning tools will already be adapted to the new kernel and cdrecord software.


Bruno


-- May 20 2004 ( Revised Dec 10 2005 ) --


Tips Linux Explorers   All Things Linux Forum   Great Linux Links   LinuxClues.com   Hometown   Email