# CDRW script fails

## supernov

Hi all,

I've followed the howto on installing the kiki cdrw script for packet-writing for my cd-writer. However, after it tries to start packet-writing (ok) it fails.

Here's my cdrecord scanbus:

```

Cdrecord-Clone 2.01 (i686-pc-linux-gnu) Copyright (C) 1995-2004 Jörg Schilling

cdrecord: Warning: Running on Linux-2.6.10-gentoo-r6

cdrecord: There are unsettled issues with Linux-2.5 and newer.

cdrecord: If you have unexpected problems, please try Linux-2.4 or Solaris.

scsidev: 'ATAPI'

devname: 'ATAPI'

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

Warning: Using ATA Packet interface.

Warning: The related Linux kernel interface code seems to be unmaintained.

Warning: There is absolutely NO DMA, operations thus are slow.

Using libscg version 'schily-0.8'.

scsibus0:

        0,0,0     0) 'HP      ' 'CD-Writer+ 9100 ' '1.0c' Removable CD-ROM

        0,1,0     1) 'HP      ' 'DVD Writer 300n ' '3.00' Removable CD-ROM

        0,2,0     2) *

        0,3,0     3) *

        0,4,0     4) *

        0,5,0     5) *

        0,6,0     6) *

        0,7,0     7) *

```

I have no scsi emulation and didn't set the append command hdc=ide-scsi, because the manual stated that isn't necessary with kernel 2.6.10 (I have r6). I do have support for packet writing in the kernel.

Here's my /etc/fstab:

```

/dev/hdb1               /boot           ext2            defaults,noatime        1 2

/dev/hdb4               /               reiserfs        noatime                 0 1

/dev/hdb3               /home           reiserfs        noatime                 0 0

/dev/hdb2               none            swap            sw                      0 0

/dev/hdc                /mnt/cdrom/     udf,iso9660     noauto,owner,kudzu,ro,exec      0 0

/dev/pktcdvd0           /mnt/cdrw/      udf,iso9660     noauto,noatime,rw,user          0 0

/dev/hdd                /mnt/dvd/       udf,iso9660     noauto,owner,kudzu,ro,exec      0 0

/dev/fd0                /mnt/floppy/    vfat            noauto,owner,ro,exec            0 0

# NOTE: The next line is critical for boot!

none                    /proc           proc            defaults                0 0

none                    /proc/bus/usb   usbfs           defaults                0 0

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for

# POSIX shared memory (shm_open, shm_unlink).

# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will

#  use almost no memory if not populated with files)

# Adding the following line to /etc/fstab should take care of this:

none                    /dev/shm        tmpfs           defaults                0 0

```

Hope someone is able to help a hand.

Cheerz, Vincent

----------

## supernov

No-one has had this problem?

----------

## Cintra

you may not have set up your packet device correctly.. I would suggest starting at page 3 of the following thread https://forums.gentoo.org/viewtopic-t-173263-postdays-0-postorder-asc-start-50.html and checking what you've got..

```
To setup device I use

Code:

#pktsetup cdwri /dev/cdrom

the above command should create directory /dev/pktcdvd and two files in there you can check it:

Code:

/dev/pktcdvd/ll

brw-r-----  1 root root 254,  0 Dec 18 21:00 cdwri

crw-r--r--  1 root root  10, 63 Dec 18 20:25 control

As I've mentioned above you need to use the same name in fstab: <<<<<<<<<<

Code:

/dev/pktcdvd/cdwri         /mnt/cdrw        udf        noauto,noatime,rw,users 0 0 

```

mvh

----------

## supernov

Thanx for replying.

Right, I did it all from start again and now the pksetup worked and I have a pktcdvd directory containing the 2 files. I changed my /etc/fstab:

```

/dev/hdc                /mnt/cdrom/     udf,iso9660     noauto,owner,kudzu,ro,exec      0 0

/dev/pktcdvd/cdwri      /mnt/cdrw/      udf             noauto,noatime,rw,users         0 0

```

And my /etc/conf.d/cdrw:

```

cdrw_list="/dev/pktcdvd/cdwri"

```

But...  :Smile:  ... when rebooting the message still appears, it's trying to get packet writing for pktcdvd/cdwri, but fails.

Boehoe, It's probably something simple, but I can't figure out what I forgot.

----------

## supernov

Right! Solved it.

That's what I love about Linux, when you think logical, it could very well work (while with windows you should think ilogical)!  :Smile: 

I was thinking, well, how should Linux link my hdc device to the pktcdvd directory when I don't mention it anywhere. duh So changing the cdrw to hdc solved it.

Thanx

----------

## Cintra

Great! Welcome to the land of packet-writing  :Smile: 

Let us know how it goes.. btw, I found Krusader to be an excellent file manager for copying music files to dvd+rw, and Kdar works well with packet writing too.

Mvh

----------

## supernov

Hi Cintra,

Thanks for the great support man!

Ok, everything seems to be configured correctly. However cdrecord doesn't want to format my cd, I downloaded X-cd-roast as a graphical shell because I thought "well, that way I know for sure I can't make mistakes in the commands for cdrecord", but it turns out almost the same as my shell experience. The communication is working, but I suspect cdrecord has a problem with my 2.6.x kernel which doesn't need scsi simulation:

```

bash-2.05b# cdrwtool -d /dev/hdc -q

using device /dev/hdc

4085KB internal buffer

setting write speed to 12x

Settings for /dev/hdc:

        Fixed packets, size 32

        Mode-2 disc

I'm going to do a quick setup of /dev/hdc. The disc is going to be blanked and formatted with one big track. All data on the device will be lost!! Press CTRL-C to cancel now.

ENTER to continue.

Initiating quick disc blank

wait_cmd: Input/output error

Command failed: a1 01 00 00 00 00 00 00 00 00 00 00 - sense 05.30.00

blank disc: Illegal seek

```

----------

## Cintra

Thats sad, on the other hand one learns from the errors..

Porthole shows I'm using app-cdr/cdrtools

Installed versions:

	Slot 0: 2.01.01_alpha01-r1

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

tho it certainly worked for me on an earlier version

Might be an idea to re-emerge udftools & the latest cdrtools and (if you have a dvd writer)

the latest dvd+rw-tools

http://fy.chalmers.se/~appro/linux/DVD+RW/

Installed versions:

	Slot 0: 5.21.4.10.8

oops, have to break off - having an optical migraine session  :Sad: 

mvh

edit: btw, I'm using development-sources 2.6.11

----------

## supernov

Oh yes, that's why I didn't go for Mandrake. I want to learnnnn.  :Smile: 

Couldn't the problem still be that I've created the pktcdvd device, but mention dev=hdc in cdrw? Or does the cdrw script take care of that.

----------

## Cintra

 *supernov wrote:*   

> Oh yes, that's why I didn't go for Mandrake. I want to learnnnn. 
> 
> Couldn't the problem still be that I've created the pktcdvd device, but mention dev=hdc in cdrw? Or does the cdrw script take care of that.

 

Mine contains

```
# List the CD-Rom drives you wish to enable packet writing on here. 

# Some examples follow: 

#cdrw_list="/dev/hdd" 

#cdrw_list="/dev/sr0 /dev/sr1 /dev/sr2" 

#cdrw_list="/dev/cdroms/cdrom0 /dev/cdroms/cdrom1" 

#cdrw_list="/dev/cdroms/cdrom0"

cdrw_list="/dev/hdc"
```

You do have cdrw in rc-update default level..? (rc-status -a)

and if you do 'top' you do have pktcdvd0..?

Btw, what media are you using?

mvh

----------

## supernov

Yep, it's starting up normally and enables the packet-writing on dev/hdc.

I'm not behind my system, but I'll try top later on. I use cd-r media for now and want to use dvd's when this is working.

What confuses me a bit is, the packet-writing is enabled for the hdc device. But what about pktcdvd? Is it enough to just copy a file into /mnt/cdrw? Probably, but then I'd need the format-cd option to work first.

----------

## Cintra

There's your problem then.. you need cd-rw media  :Wink: 

verbatim's good

I made a device icon called 'dvdwri' on the desktop with device properties '/dev/pktcdvd/dvdwri' and start my day by right-click mounting it - you MUST unmount before doing a reboot/shutdown otherwise you can damage the media contents. I've done that a couple of times now.. 

Using krusader I simply drag&drop music folders or whatever onto /mnt/dvdrw.. its dead fast!

mvh

----------

## supernov

Riiiiiight.  :Smile:  Missed that requirement. Quite logical indeed, since packet-writing mimics a floppy.

However, shouldn't cdrecord still be able to format my cd-r? Or does that indeed need scsi emulation..

----------

## Cintra

 *supernov wrote:*   

> Riiiiiight.  Missed that requirement. Quite logical indeed, since packet-writing mimics a floppy.
> 
> However, shouldn't cdrecord still be able to format my cd-r? Or does that indeed need scsi emulation..

 

This came from some chalmers page, so perhaps I'm wrong about packet-writing to a cd-r, I'll try it and see.. 

 *Quote:*   

> Packet Write 
> 
> This method writes data in smaller chunks than session and track, It writes data in packets (64 KB for UDF2.0) Because data can be deleted and written in units of files, this method enables you to use CD-R/CD-RW discs like floppy disks. In terms of packet writing software, two types are available. One type uses a proprietary format while the other type is based on the UDF standard which is compatible with DVD. 

 

However, ref cd-r, you don't need to format them, just burn what you want onto them and away you go.

If you have a dvd+rw burner, I'ld hop straight on to using that. cd-rw gets filled up damn quick...

So, you should be packet-writing soon then!

mvh

Edit: No its not possible to mount cd-r media.. so the above statement must have been wrong.

----------

## unstable_geek

does this mean then that one needs to use the SCSI emulation to burn normal CDRs?

----------

