Posted by: isaraffee | August 9, 2009

Burning CDs in Linux (Kernel version 2.4.3)

Burning CDs in Linux (Kernel version 2.4.3)

You have to make sure that the cdrecord package is installed in your system..

# rpm -qa | grep cdrecord

cdrecord-devel-1.9-6mdk

cdrecord-1.9-6mdk

cdrecord-cdda2wav-1.9-6mdk

To find out more about each cdrecord packages, type:

# rpm -qi cdrecord-devel-1.9-6mdk

Name : cdrecord-devel Relocations: /usr

Version : 1.9 Vendor: MandrakeSoft

Release : 6mdk Build Date: Wed 18 Apr 2001 06:40:30 AM SGT

Install date: Thu 05 Jul 2007 08:10:21 AM SGT Build Host: bi.mandrakesoft.com

Group : Development/C Source RPM: cdrecord-1.9-6mdk.src.rpm

Size : 321877 License: GPL

Packager : Linux-Mandrake Team <bugs@linux-mandrake.com>

URL : http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdrecord.html

Summary : The libschily SCSI user level transport library

Description :

The cdrecord distribution contains a SCSI user level transport

library. The SCSI library is suitable to talk to any SCSI device

without having a special driver for it.

Cdrecord may be easily ported to any system that has a SCSI device

driver similar to the scg driver.__

# rpm -qi cdrecord-1.9-6mdk

Name : cdrecord Relocations: /usr

Version : 1.9 Vendor: MandrakeSoft

Release : 6mdk Build Date: Wed 18 Apr 2001 06:40:30 AM SGT

Install date: Wed 01 Jan 1997 12:33:46 AM SGT Build Host: bi.mandrakesoft.com

Group : Archiving/Cd burning Source RPM: cdrecord-1.9-6mdk.src.rpm

Size : 616786 License: GPL

Packager : Linux-Mandrake Team <bugs@linux-mandrake.com>

URL : http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdrecord.html

Summary : A command line CD/DVD-Recorder

Description :

Cdrecord allows you to create CDs on a CD-Recorder (SCSI/ATAPI).

Supports data, audio, mixed, multi-session and CD+ discs etc.!_

# rpm -qi cdrecord-cdda2wav-1.9-6mdk

Name : cdrecord-cdda2wav Relocations: /usr

Version : 1.9 Vendor: MandrakeSoft

Release : 6mdk Build Date: Wed 18 Apr 2001 06:40:30 AM SGT

Install date: Mon 31 Jul 2006 08:35:02 AM SGT Build Host: bi.mandrakesoft.com

Group : Sound Source RPM: cdrecord-1.9-6mdk.src.rpm

Size : 413079 License: GPL

Packager : Linux-Mandrake Team <bugs@linux-mandrake.com>

URL : http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdrecord.html

Summary : CD-Audio to .wav converter

Description :

cdda2wav reads audio CDs, outputting a wav file.

But of course the last package cdrecord-cdda2wav is a package for conversion of audio files to wav file.

In Linux Let’s take a look at the /var/log/messages and grep for the strings hdc

in Linux you have to enable scsi emulation so that your IDE CD-Writer or DVD Writer can burn disk and data.

This is achieved in two configurtion files, namely the /etc/lilo.conf and the /etc/modules.conf. In the following section I will explain in detail how to configure these files.

EXTRA NOTES

To scan to see if your CD-Writer is configured correctly, you would type the cdrecord command. The output below shows that the /etc/lilo.conf and /etc/modules.conf, have not been configured to identify the CD-Wrtiter

# cdrecord -scanbus

Cdrecord 1.9 (i586-mandrake-linux-gnu) Copyright © 1995-2000 Jörg Schilling

scsidev: ‘ATAPI’

devname: ‘ATAPI’

scsibus: -2 target: -2 lun: -2

cdrecord: No such file or directory. Cannot open SCSI driver.

cdrecord: For possible targets try ‘cdrecord -scanbus’. Make sure you are root.

XXX

# more /var/log/messages | grep hdc

Jul 30 07:40:46 venus kernel: ide1: BM-DMA at 0xf008-0xf00f, BIOS settings: hdc:pio, hdd:pio

Jul 30 07:40:46 venus kernel: hdc: CDRW-8432i, ATAPI CD/DVD-ROM drive

Jul 30 07:40:46 venus kernel: hdc: ATAPI 32X CD-ROM CD-R/RW drive, 2048kB Cache, DMA

Jul 30 08:39:57 venus kernel: ide1: BM-DMA at 0xf008-0xf00f, BIOS settings: hdc:pio, hdd:pio

Jul 30 08:39:57 venus kernel: hdc: CDRW-8432i, ATAPI CD/DVD-ROM drive

Jul 30 08:39:57 venus kernel: hdc: ATAPI 32X CD-ROM CD-R/RW drive, 2048kB Cache, DMA

EXTRA NOTES

If you insert a thumbdrive and run the cdrecord command, you would get the following output. The following shows the otput of cdrecord with the USB thumbdrive inserted.

# cdrecord -scanbus

Cdrecord 1.9 (i586-mandrake-linux-gnu) Copyright © 1995-2000 Jörg Schilling

Linux sg driver version: 3.1.17

Using libscg version ‘schily-0.1’

scsibus0:

0,0,0 0) ‘USB ‘ ‘Flash Disk ‘ ‘1.12’ Removable Disk

0,1,0 1) *

0,2,0 2) *

0,3,0 3) *

0,4,0 4) *

0,5,0 5) *

0,6,0 6) *

0,7,0 7) *

TROUBLESHOOTING IN CONFIGURING CDRW

SCSI-IDE EMULATION

As mentioned earlier we need to edit the /etc/lilo.conf file by adding the following one line

append=”hdc=ide-scsi”

You may find this line at the first few lines.

In my case, my /etc/lilo.conf looks like this:

# more /etc/lilo.conf

boot=/dev/hda

map=/boot/map

install=/boot/boot.b

default=linux

keytable=/boot/us.klt

lba32

prompt

timeout=50

message=/boot/message-graphic

menu-scheme=wb:bw:wb:bw

image=/boot/vmlinuz

label=linux

root=/dev/hda4

append=”hdc=ide-scsi” <– This line is edited

vga=788

read-only

image=/boot/vmlinuz

label=linux-nonfb

root=/dev/hda4

read-only

image=/boot/vmlinuz

label=failsafe

root=/dev/hda4

append=” failsafe”

read-only

other=/dev/hda1

label=windows

table=/dev/hda

other=/dev/fd0

label=floppy

unsafe

After editing the lilo.conf file, you have to type lilo to compile the kernel. Just a word of caution, if you run lilo and there are errors, youmust fix the errors. This is to say that you have make some typo errors while editing your lilo cnfiguration file. If there are errors, your system may not boot up. So you must prepare a Linux emergency boot disk. To do that follow the steps in the “How to prepare a Linux Emergency boot disk” section

So now you have edit the /etc/lilo.conf file, run the lilo command and your output should look like this:

# lilo

Added linux *

Added linux-nonfb

Added failsafe

Added windows

Added floppy

The next step is to edit the /etc/modules.conf file.

Editing the /etc/modules.conf file

Edit the /etc/modules.conf to add the following lines

# more /etc/modules.

pre-install pcmcia_core CARDMGR_OPTS=-f /etc/rc.d/init.d/pcmcia start

alias usb-interface usb-uhci

alias eth0 8139too

alias sound-slot-0 sb

#I added another time

#alias scd0 sr_mod

alias scsi_hostadapter ide-scsi <–I added this line

#options ide-cd ignore=hdc

After you have edited these wo configuration files, reboot the system.

LOOKING AT DMESG

After you have reboot the system run dmesg to look see if the kernel has detected the scsi-ide emulation.

# dmesg | grep hdc

Kernel command line: auto BOOT_IMAGE=linux ro root=304 hdc=ide-scsi

ide_setup: hdc=ide-scsi

ide1: BM-DMA at 0xf008-0xf00f, BIOS settings: hdc:pio, hdd:pio

hdc: SAMSUNG CD-R/RW DRIVE SW-252F, ATAPI CD/DVD-ROM drive_

# dmesg | grep scsi

Kernel command line: auto BOOT_IMAGE=linux ro root=304 hdc=ide-scsi

ide_setup: hdc=ide-scsi

scsi0 : SCSI host adapter emulation for IDE ATAPI devices

scsi1 : SCSI emulation for USB Mass Storage devicesÔÝ@

Scanning for the CD-Writer/DVD-Writer

After you have reboot the system, type the following comman:

# cdrecord -scanbus

Cdrecord 1.9 (i586-mandrake-linux-gnu) Copyright © 1995-2000 Jörg Schilling

Linux sg driver version: 3.1.17

Using libscg version ‘schily-0.1’

scsibus0:

0,0,0 0) ‘SAMSUNG ‘ ‘CD-R/RW SW-252F ‘ ‘R801’ Removable CD-ROM

0,1,0 1) *

0,2,0 2) *

0,3,0 3) *

0,4,0 4) *

0,5,0 5) *

0,6,0 6) *

0,7,0 7) *_

Now that the device is properly configured, try blanking a disc

Blank the disc using the command:

# cdrecord blank=fast dev=0,0,0

Cdrecord 1.9 (i586-mandrake-linux-gnu) Copyright © 1995-2000 Jörg Schilling

scsidev: ‘0,0,0’

scsibus: 0 target: 0 lun: 0

Linux sg driver version: 3.1.17

Using libscg version ‘schily-0.1’

Device type : Removable CD-ROM

Version : 0

Response Format: 1

Vendor_info : ‘SAMSUNG ‘

Identifikation : ‘CD-R/RW SW-252F ‘

Revision : ‘R801’

Device seems to be: Generic mmc CD-RW.

Using generic SCSI-3/mmc CD-R driver (mmc_cdr).

Driver flags : SWABAUDIO

cdrecord: Drive needs to reload the media to return to proper status.

Starting to write CD/DVD at speed 4 in write mode for single session.

Last chance to quit, starting real write in 1 seconds.

[root@venus /root]#

The CD is now blank. You can verify this by inserting the disc into your Windows laptop/PC to check its contents.

Eject the disc from the tray by typing the command:

# eject /dev/scd0

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: