# packet writing doubt....

## sobers_2002

i am very confused on how to format my cdrw........

```
cdrwtool -d /dev/scd0 -q
```

 how is this command given at quite a lot of places supposed to work........my cd drive is /dev/cdrom/cdrom0.........so should i replace this to it??........the last time i did that i got a bunch of some errors......and then the cd drive just kept writing and the cpu usage became 100%......i had to hard boot to get cd out  :Sad: ..........plz plz some1 guide me on this issue........i have built in udf and packet writing in the kernel

----------

## NeddySeagoon

sobers_2002,

Which kernel are you using? 

Are you useing SCSI emulation for your writer ?

The /dev/.. looks wrong.

Are you aware of the mailing list at packet-writing@suse.com ?

----------

## sobers_2002

kernel - 2.6.9-nitro4

scsi emulation - yes

what should the dev be like???

and i don't know about the mailing list.......

plz guide me on how to get this going...

thnx

Saurabh

----------

## NeddySeagoon

sobers_2002,

Did you patch your own kernel or does kernel - 2.6.9-nitro4  come pre-patched ?

Anyway, from the patch file (packet-2.6.8.patch) earlier patches do not work with 2.6.8 and later kernels:-

 *Quote:*   

> +
> 
> +- Select packet support in the block device section and UDF support in
> 
> +  the file system section.
> ...

 

You can read it all in usr/src/linux/Documentation/cdrom/packet-writing.txt.

man cdrwtool is also useful, it suggests /dev/sr0

dmesg | grep scsi suggests that /dev/sg0 may be right on gentoo

It looks like scsi emulation is no longer required too.

Can you write CDs normally ?

----------

## sobers_2002

yes the kernel came prepatched.......also i hav no problems in writind cd's normally.herez what happens when i dp cdrwtool -d /dev/hdc -q

```
dennis ~ # cdrwtool -d /dev/hdc -q                                            ~

using device /dev/hdc

5424KB 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

Disc capacity is 295264 blocks (590528KB/576MB)

Formatting track

start=0, blocks=16, type=RESERVED 

start=16, blocks=3, type=VRS 

start=19, blocks=237, type=USPACE 

start=256, blocks=1, type=ANCHOR 

start=257, blocks=31, type=USPACE 

start=288, blocks=32, type=PVDS 

start=320, blocks=32, type=LVID 

start=352, blocks=32, type=STABLE 

start=384, blocks=1024, type=SSPACE 

start=1408, blocks=293568, type=PSPACE 

start=294976, blocks=31, type=USPACE 

start=295007, blocks=1, type=ANCHOR 

start=295008, blocks=160, type=USPACE 

start=295168, blocks=32, type=STABLE 

start=295200, blocks=32, type=RVDS 

start=295232, blocks=31, type=USPACE 

start=295263, blocks=1, type=ANCHOR 

Writing UDF structures to disc

wait_cmd: Input/output error

Command failed: 2a 00 00 00 00 00 00 00 20 00 00 00 - sense 02.04.07

wait_cmd: Input/output error

Command failed: 2a 00 00 00 01 00 00 00 20 00 00 00 - sense 02.04.07

wait_cmd: Input/output error

Command failed: 2a 00 00 00 01 20 00 00 20 00 00 00 - sense 02.04.07

wait_cmd: Input/output error

Command failed: 2a 00 00 00 01 40 00 00 20 00 00 00 - sense 02.04.07

wait_cmd: Input/output error

Command failed: 2a 00 00 00 01 60 00 00 20 00 00 00 - sense 02.04.07

wait_cmd: Input/output error

Command failed: 2a 00 00 00 05 80 00 00 20 00 00 00 - sense 02.04.07

wait_cmd: Input/output error

Command failed: 2a 00 00 00 05 a0 00 00 20 00 00 00 - sense 02.04.07

wait_cmd: Input/output error

Command failed: 2a 00 00 00 05 c0 00 00 20 00 00 00 - sense 02.04.07

wait_cmd: Input/output error

Command failed: 2a 00 00 00 05 e0 00 00 20 00 00 00 - sense 02.04.07

wait_cmd: Input/output error

Command failed: 2a 00 00 00 06 00 00 00 20 00 00 00 - sense 02.04.07

wait_cmd: Input/output error

Command failed: 2a 00 00 04 80 40 00 00 20 00 00 00 - sense 02.04.07

wait_cmd: Input/output error

Command failed: 2a 00 00 04 81 00 00 00 20 00 00 00 - sense 02.04.07

wait_cmd: Input/output error

Command failed: 2a 00 00 04 81 20 00 00 20 00 00 00 - sense 02.04.07

wait_cmd: Input/output error

Command failed: 2a 00 00 04 81 40 00 00 20 00 00 00 - sense 02.04.07

wait_cmd: Input/output error

Command failed: 35 02 00 00 00 00 00 00 00 00 00 00 - sense 02.04.07

Quick setup complete!

can't unlock door

dennis ~ #

```

and the drive keeps blinking in writing mode.......  :Sad:   :Sad: 

----------

## NeddySeagoon

sobers_2002,

You cannot use /dev/hdc if you are using scsi emulation. You need to try the scsi device names I quoted.

You can drop scsi emulation very quickly by changing your kernel line in grub. I actually have two, so I can choose at boot time, thus:-

```
title=Kernel 2.6.8 Emulated SCSI

root (hd0,0)

kernel (hd0,0)/2.6.8-gentoo-r1 root=/dev/hda5 hdc=ide-scsi hdd=ide-scsi vga=ask

title=Kernel 2.6.8 ATAPI CD Writing

root (hd0,0)

kernel (hd0,0)/2.6.8-gentoo-r1 root=/dev/hda5
```

Drop the ide-scsi entries. Both of these grub.conf run the same kernel, one uses scsi emulation the other doesn't.

----------

## sobers_2002

i am sorry for being mistaken but i thought that just compiling the scsi emulation inside the kernel was enough:oops: .......so since i don't have those entries in my grub i (also dmesg|grep scsi give no result) so i am not using scsi emulation...............then /dev/hdc should be working??

----------

## NeddySeagoon

sobers_2002,

Yes,  /dev/hdc should work for you.

Do you have an old cdrwtools ?

Check the web, not portage

----------

## sobers_2002

i had emerged them just 2 days back.....but i will certainly check them out on web too........still what could be the problem?????

----------

## NeddySeagoon

sobers_2002,

Major changes at 2.6.8

----------

## Kraymer

Hi there!

Packet writing is a very interesting thing and increases usability a lot  :Smile:   I'm thinking of trying it myself but.. I use cdrw so seldomly nowadays so I'm more interested in patches for packet writing on dvd media - would be soo cool.  :Cool: 

I searched for it a while ago but there were some (unsolveable?) issues about it. Anybody knows if that changed yet?

It's one of the things that linux users (at least me *g) begrudge windows users for. Like softwaresuspend, too. Luckily that one is making good progress..

Thanks for any info

Sebastian

edit: Couldn't resist searching again   :Wink:    Actually, there seems to be something in the going: http://w1.894.telia.com/~u89404340/patches/packet/2.6/ChangeLog

----------

## NeddySeagoon

smash032,

Packet writing on DVD+ is reported to work but its not required there anyway. You just format your DVD+RW disc as UDF and it just works, sort of.

This page is a good starting point http://fy.chalmers.se/~appro/linux/DVD+RW/ Don't let the name put you off.

----------

## Kraymer

 *NeddySeagoon wrote:*   

> Packet writing on DVD+ is reported to work but its not required there anyway. You just format your DVD+RW disc as UDF and it just works, sort of.

 

I'm just back from an attempt to write some files to my dvd+rw media.. First it seemed to work, but the copying progress stalled somewhere at 150M out of 1.5G and my system became very much unresponding so that only the magic keys helped to boot  :Confused:   Between, I saw around 90% wa in `top` so I guess the problem is lying there somehow (buffering?!)..

I never thought that mkudffs and a special mount would enable all this! But wait, I did have to patch the kernel for packet writing. Now, with my older kernel (without patch), mkudffs doesn't work  :Sad: 

Can it be (didn't get specific info on that) that my dvd device has to run under scsi emulation? Examples (from the webpage) use scsi devices but they don't say if it is essential.. pktsetup doesn't work with and without patch and ATAPI support.

Are you using udf-rw?

 *Quote:*   

> 
> 
> This page is a good starting point http://fy.chalmers.se/~appro/linux/DVD+RW/ Don't let the name put you off.

 

Yesyes I remember that page from times when I had my new dvdrw and k3b didn't support dvd burning   :Wink:   It's a good page, always worth a bookmark.

Sebastian

----------

## NeddySeagoon

smash032,

I don't use pktsetup for udf on DVD+RW. Just UDF writing.

Under 2.4 kernels there is a horrible buffering problem trying to write more than will fit into physical memory. Under 2.6, its suppoesed to be fixed. I have not put it to the test (I have 1Gb now as opposed to 256Mb)

I think it works with emulated scsi and ATAPI too but old habits die hard, so I still use emulated scsi.

----------

## Kraymer

Ok, thanks for the info anyways  :Smile: 

I've to learn for an exam at the moment (and should do things like applying patches, recompile the kernel, try new features *g) but I'll get back to it in october. Must get it to work then  :Wink: 

Sebastian

----------

